SOLVED

UWP SDK version issue (Your project does not reference "UAP,Version)

Copper Contributor

In UWP apps, does anyone know how to get rid of the following errors permanently? This happens when I switch between GIT branches where the source code is targeted to different Windows SDK versions.

 

Your project does not reference "UAP,Version=v10.0.18362" framework. Add a reference to "UAP,Version=v10.0.18362" in the "frameworks" section of your project.json and then re-run NuGet restore. BoardPACWinAppBO

 

NOTE: By removing bin and obj folders + cleaning the project + close and reopening VS randomly fix this issue. But this is not convenient. I'm using the latest version of VS 2022.

 

213123123.png

3 Replies
You need to install the respective Windows SDK. Refer to the below link and search for 18362. Download and install the same. This would solve the problem.
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
Hi,
All the SDKs are installed. This is a VS issue.
best response confirmed by surensaluka (Copper Contributor)
Solution

Check the path of the UAP version in the project. It would be something like:
C:\Program Files (x86)\Windows Kits\10\References\10.0.19041.0\Windows.AI.MachineLearning.MachineLearningContract\3.0.0.0

 

The version highlighted 19041 is related to the SDK. You can download it.

 

Close all visual studio applications. Delete the Bin and Obj folders from all the projects of your solution. 

 

Install that downloaded SDK.

 

Post install open the Visual Studio project. Restore Nuget packages and Build the solution and see whether the issue is resolved.

1 best response

Accepted Solutions
best response confirmed by surensaluka (Copper Contributor)
Solution

Check the path of the UAP version in the project. It would be something like:
C:\Program Files (x86)\Windows Kits\10\References\10.0.19041.0\Windows.AI.MachineLearning.MachineLearningContract\3.0.0.0

 

The version highlighted 19041 is related to the SDK. You can download it.

 

Close all visual studio applications. Delete the Bin and Obj folders from all the projects of your solution. 

 

Install that downloaded SDK.

 

Post install open the Visual Studio project. Restore Nuget packages and Build the solution and see whether the issue is resolved.

View solution in original post