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.

Question Installing Visual Studio 2022 with IL2CPP support on Unity

Discussion in 'Editor & General Support' started by Darkgaze, Nov 10, 2022.

  1. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    376
    Hi. I'm not able to make builds on Unity anymore when I uninstalled Visual Studio 2019. I only left 2022 which was working perfectly and suddently my IL2CPP builds don't work.

    Of course, the IL2CPP module is added to Unity (using 2022.1.201f)

    I get an error message saying that it doesn't find any compatible VS version to compile. That I haven't the C++ building tools and Windows 10 SDK (???) I never had to install that. I added those modules using the "Visual Studio Installer" app that comes with the installation of any VS version. But it still tells me the same thing. I ended up adding the Windows Platform modules but still no luck.

    But I'm not sure EXACTLY which modules I have to install. I have Windows Platform modules, I have C++ tools for Desktop... but Windows SDK is not added by default, so I added that too... I ended up adding more than I needed and the build didn't show any errors but I got a lot of C++ compile errors (internal of the libraries). Thinking that maybe the versions are not correct or compatible?

    I have friends who have VS2019 installed and 2022 too, and they have some module additions to 2019 and then others in 2022.
     
  2. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    376
  3. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    376
    It is related and theres a solution at the end, but still wondering WHICH modules on VS i have to install to make it choose 2022 as a valid version of Visual Studio.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,530
    This should be enough:
    upload_2022-11-10_13-20-5.png

    Windows 10 SDK should be included automatically once you select it:
    upload_2022-11-10_13-20-37.png
     
    Arnienet and Darkgaze like this.
  5. Darkgaze

    Darkgaze

    Joined:
    Apr 3, 2017
    Posts:
    376
    I checked and, at least for VS2022, it's not necessary to install Windows Platform module. (the one on the right).
    You save a bunch of Gbs if you remove that ;-)