VS 2019 could not find SDK

Viewed 1694
2 Answers

The problem you met is a bug seemingly caused by vs installer. It happens when Visual Studio is not installed on driver C.

You can see it here: https://developercommunity2.visualstudio.com/t/HoloLens-2-build-fails-if-Windows-sdk-is/1313568

There are many ways you could do to get through this.

  1. Copy the folder [Windows Kit Root Dir]\10\Extension SDKs\WindowsMobile (For e.g., D:\Windows Kits\10\Extension SDKs\WindowsMobile) to C:\Program Files (x86)\Windows Kits\10\Extension SDKs\. Should solve all of the missing WindowMobile issues. https://developercommunity.visualstudio.com/t/msb3774-could-not-find-sdk-windowsmobile-version10/402362#T-N474809

  2. Delete the reference to the Mobile SDK in the vxcproj file. https://stackoverflow.com/a/60600054/9522354

I tried the first method and it worked for me.

I have tried to install 10.0.19041.0 through windows but it always kicks to 19041.1

For how to modify the SDKReference version, you can try following step:

By referring Section 5 of Update your C#/VB projects to use the latest Universal Windows Platform

Right-click your existing project(YourProjectName(Universal Windows)) in solution explorer, then select Unload Project. After the project is unloaded, right-click the project file again and choose to edit the .vcxproj file.

Find "SDKReference" element and change the value of version from "10.0.19041.1" to your version like "10.0.19041.0".

  <ItemGroup>
    <SDKReference Include="WindowsMobile, Version=10.0.19041.1" />
  </ItemGroup>

to

  <ItemGroup>
    <SDKReference Include="WindowsMobile, Version=10.0.19041.0" />
  </ItemGroup>

Besides, since you are using HoloLens2, it is recommended to set the Architecture in the Unity Build Setting window to x64.

Related