nneonneo / Il2CppVersions

Build scripts & historical header files for every available minor version of Unity's Il2Cpp project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failure for group 1

djkaty opened this issue · comments

commented

Output:

F:\Source\Repos\Il2CppVersions>"F:\Source\Repos\Il2CppVersions\group1\\il2cpp-5.3.0f4\build\il2cpp.exe" --generatedcppdir "F:\Source\Repos\Il2CppVersions\output\5.3.0f4\il2cpp" --compile-cpp --platform=WindowsDesktop --architecture=x64 --outputpath "F:\Source\Repos\Il2CppVersions\output\5.3.0f4\libil2cpp-x64.dll" --configuration=Release --cachedirectory="F:\Source\Repos\Il2CppVersions\output\5.3.0f4\cache"
il2cpp.exe didn't catch exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Unity.IL2CPP.Building.ToolChains.MsvcToolChain.ToolChainIncludePaths()
   at Unity.IL2CPP.Building.CppProgramBuilder.Build()
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Unity.IL2CPP.Building.ToolChains.MsvcToolChain.ToolChainIncludePaths()
   at Unity.IL2CPP.Building.CppProgramBuilder.Build()
   at il2cpp.Program.Run(String[] args)
   at il2cpp.Program.Main(String[] args)
======================= FAILED =======================

Looking at the decompilation of il2cpp.exe and its DLLs, this seems to be something to do with not being able to set up the MsvcToolChain properly. The Visual Studio debugger was basically useless in finding out more.

Make sure that you have VS 2015 and VS 2017 installed, not VS 2019 (per the instructions). If that's the case, then something else is going on. I used dnSpy to debug issues with Il2Cpp.

commented

I do have Visual Studio 2017 installed but I found this in the decompilation:

static MsvcInstallation()
        {
            MsvcInstallation._installations = new Dictionary<Version, MsvcInstallation>();
            Version version = new Version(10, 0);
            Version version1 = new Version(12, 0);
            Version version2 = new Version(14, 0);

Seems like it's looking for Visual Studio 2010, 2013 or 2015 (weirdly, not 2012). So Visual Studio 2017 is too new.

I'm going to need to free up some disk space.... I'll report back.

commented

Installing Visual Studio 2015 Community Edition with just the C++ language support (toolset 14.16) seems to have solved this. Uninstalling support from Visual Studio 2019 was not necessary :)