Forum Discussion
surensaluka
Feb 08, 2022Copper Contributor
UWP SDK version issue (Your project does not reference "UAP,Version)
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.
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.0The 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.
- RupeshKokalCopper ContributorYou 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/- surensalukaCopper ContributorHi,
All the SDKs are installed. This is a VS issue.- RupeshKokalCopper Contributor
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.0The 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.