'Unity IL2CPP GameObject.lib not found

I updated Visual Studio 2022 preview to version 4.8.04161 and now I can no longer deploy a release build of my Unity project to the HoloLens2, because GameObject.lib cannot be found. I can build and deploy debug versions to the headset but I really need the release version, which won't build. In the error list below I built in Visual Studio 2019. How can I resolve this problem?

Error List looks like this:

Severity    Code    Description Project File    Line    Suppression State
Error   C1001   Internal compiler error.    Il2CppOutputProject C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\Il2CppOutputProject\Source\il2cppOutput\mscorlib4.cpp 42640   
Error   C1001   Internal compiler error.    Il2CppOutputProject C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\Il2CppOutputProject\Source\il2cppOutput\mscorlib4.cpp 42640   
Error   MSB3073 The command ""C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\Il2CppOutputProject\\IL2CPP\build\deploy\net471\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARMv7 -configuration=Release -platform=winrt -outputpath="C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\\build\bin\ARM\Release\GameAssembly.dll" --data-folder="C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\\build\bin\ARM\Release\\" -cachedirectory="C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\\build\obj\il2cppOutputProject\ARM\Release\\" -generatedcppdir="C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\Il2CppOutputProject\\Source"  --profiler-report --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT --additional-defines=PLATFORM_WINRT -dotnetprofile=unityaot -verbose --relative-data-path=Data/il2cpp_data --map-file-parser="C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766.  Il2CppOutputProject C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets  46  
Warning C4973   'Windows::UI::ViewManagement::IApplicationView2::SuppressSystemOverlays::set': marked as deprecated ARubik  C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\ARubik\App.cpp    26  
Error   LNK1181 cannot open input file 'C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\build\bin\ARM\Release\GameAssembly.lib'   ARubik  C:\Users\Eoghan\Desktop\PhD Project\VS 2019 Community\ARubik\LINK   1   

Problem solved: I had been building for ARM fine for years, now it seems you must build for ARMx64, and it works fine :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source