Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Unable to build with Windows 11 SDK

Discussion in 'Windows' started by eduardofreire, Feb 4, 2022.

  1. eduardofreire

    eduardofreire

    Joined:
    Jan 24, 2022
    Posts:
    6
    HI, I just updated to windows 11 and when installing Visual Studio and Unity opted to install the Windows 11 SDK. Now I tried to make a PC build using IL2Cpp on a Unity 2021.1.10f1 and got the following error:


    Code (CSharp):
    1. Exception: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have one of these installed:
    2.         Visual Studio 2015 with C++ compilers and Windows 10 SDK(it cannot build C++ code because it is not installed or missing C++ workload component)
    3.         Visual Studio 2015 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry
    4.         Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
    5.         Visual Studio 2017(or newer) with C++ compilers and Windows 10 SDK(it cannot build C++ code because it is not installed or missing C++ workload component)
    6.         Visual Studio 2017(or newer) installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
    7.         Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
    8. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    Is Unity already able to use Windows 11 SDK? Maybe on a newer version? Or do I need to do something to work with W11SDK?
     
  2. eduardofreire

    eduardofreire

    Joined:
    Jan 24, 2022
    Posts:
    6
    I just understand my problem. It was missing the c++ workload, the windows 11 sdk worked after that. (I uninstalled win 10 sdk)
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,506
    Yeah, sorry for the confusing error message. It should be much improved in Unity 2021.2.
     
  4. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    522
    hmmm does that mean we need to uninstall the Windows 10 SDKs for the Windows 11 to be listed in 2020.3?
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,506
    No, both Windows 10 and Windows 11 SDKs should work and they can be installed side by side. You will only get an error if you have neither installed.
     
    soleron likes this.
  6. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    522
    Thank you!