Forum Discussion

surensaluka's avatar
surensaluka
Copper Contributor
Feb 08, 2022
Solved

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.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.

    • surensaluka's avatar
      surensaluka
      Copper Contributor
      Hi,
      All the SDKs are installed. This is a VS issue.
      • RupeshKokal's avatar
        RupeshKokal
        Copper 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.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.

Resources