How to fix C# uwp packaging error

Eason Iron 0 Reputation points
2025-11-11T06:41:05.6366667+00:00

I encountered this error while packaging my C# UWP project. I've tried some methods, but none of them worked. Could you please help me resolve this issue?

My visual studio version is 17.14.19.
2025-11-11 14 39 11

Compile error information:

The "GetFrameworkSdkPackages" task was not found. Check the following: 
1.) The name of the task in the project file is the same as the name of the task class. 
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 
3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64" directory.

The build error information:

2>------ Build started: Project: PowerToolboxPackage, Configuration: Release x64 ------

2>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(331,5): error MSB4036: The "GetFrameworkSdkPackages" task was not found. Check the following: 
1.) The name of the task in the project file is the same as the name of the task class. 
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 
3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64" directory.
2>Done building project "PowerToolboxPackage.wapproj" -- FAILED. 

This is solution download https://github.com/TangTony2023/toolbox/releases/download/1.0.0/PowerToolbox.zip

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Raymond Huynh (WICLOUD CORPORATION) 2,895 Reputation points Microsoft External Staff Moderator
    2025-11-11T11:02:00.3933333+00:00

    Hi Eason Iron ,

    Based on your build error, the issue is that a crucial MSBuild task (GetFrameworkSdkPackages) is missing. This typically happens when the necessary Visual Studio components for packaging Windows apps aren't fully installed.

    Please try these:

    1. Repair Visual Studio Workloads: The most common solution is to run the Visual Studio Installer, click "Modify" on your Visual Studio 2022 Enterprise, and ensure the "Universal Windows Platform development" and/or ".NET Desktop Development" workloads are installed and up-to-date. A repair might also help.
    2. Check Project Configuration: In Visual Studio, go to Build > Configuration Manager and confirm that the platform for your PowerToolboxPackage project is set correctly (e.g., x64 or x86 and not "Any CPU").

    Once you try these, attempt to rebuild the project. If the error persists, please share the error details!

    Let me know how it goes!

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.