[IL2CPP] [Standalone] LINK : fatal error LNK1181

I've got an error "LINK : fatal error LNK1181: cannot open input file 'Shell32.lib'" on the IL2CPP build attempt.
VS 2017 15.9.15
Unity 2019.1.12.f1
Scripting runtime: .NET 4.x

Error Message

[spoiler]

Failed running C:\Program Files\Unity\Hub\Editor\2019.1.12f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x64" --configuration="Release" --outputpath="C:\Users\TaosX\Documents\Final Upgrade 2019\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\TaosX\Documents\Final Upgrade 2019\Assets..\Library/il2cpp_cache" --incremental-g-c-time-slice=3 --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.12f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Users/TaosX/Documents/Final Upgrade 2019/Temp/StagingArea/Data/Managed" --generatedcppdir="C:/Users/TaosX/Documents/Final Upgrade 2019/Temp/StagingArea/Data/il2cppOutput"
stdout:
Building GameAssembly.dll with MsvcDesktopToolChain
Msvc Install Version: 15.0
Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
Msvc Linker Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe
Msvc Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe
Output directory: C:\Users\TaosX\Documents\Final Upgrade 2019\Temp\StagingArea\Data\Native
Cache directory: C:\Users\TaosX\Documents\Final Upgrade 2019\Library\il2cpp_cache
ObjectFiles: 285 of which compiled: 7
Time Compile: 8125 milliseconds FinalUpgrade15.cpp
Time Compile: 4694 milliseconds Il2CppAttributes.cpp
Time Compile: 3245 milliseconds Il2CppCompilerCalculateTypeValues2.cpp
Time Compile: 2462 milliseconds FinalUpgrade23.cpp
Time Compile: 1833 milliseconds Il2CppMetadataUsage.c
Time Compile: 778 milliseconds Il2CppCompilerCalculateTypeValuesTable.cpp
Time Compile: 732 milliseconds FinalUpgrade_CodeGen.c
Total compilation time: 8428 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe /out:"C:\Users\TaosX\Documents\Final Upgrade 2019\Library\il2cpp_cache\linkresult_A7543FAF8829F047B67C9CE38B15E4ED\GameAssembly.dll" /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /OPT:REF /OPT:ICF /HIGHENTROPYVA /DLL /NODEFAULTLIB:uuid.lib "kernel32.lib" "user32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "Shell32.lib" "Crypt32.lib" "psapi.lib" "version.lib" "MsWSock.lib" "ws2_32.lib" "Iphlpapi.lib" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64" /SUBSYSTEM:WINDOWS @"C:\Users\TaosX\AppData\Local\Temp\tmp72B1.tmp"
LINK : fatal error LNK1181: cannot open input file 'Shell32.lib'
at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet1 objectFiles, CppToolChainContext toolChainContext)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Program.DoRun(String[ ] args)
at il2cpp.Program.Run(String[ ] args)
at il2cpp.Program.Main(String[ ] args)
stderr:
Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe /out:"C:\Users\TaosX\Documents\Final Upgrade 2019\Library\il2cpp_cache\linkresult_A7543FAF8829F047B67C9CE38B15E4ED\GameAssembly.dll" /DEBUG /INCREMENTAL:NO /LARGEADDRESSAWARE /NXCOMPAT /DYNAMICBASE /NOLOGO /TLBID:1 /OPT:REF /OPT:ICF /HIGHENTROPYVA /DLL /NODEFAULTLIB:uuid.lib "kernel32.lib" "user32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "Shell32.lib" "Crypt32.lib" "psapi.lib" "version.lib" "MsWSock.lib" "ws2_32.lib" "Iphlpapi.lib" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64" /SUBSYSTEM:WINDOWS @"C:\Users\TaosX\AppData\Local\Temp\tmp72B1.tmp"
LINK : fatal error LNK1181: cannot open input file 'Shell32.lib'
at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet
1 objectFiles, CppToolChainContext toolChainContext)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at il2cpp.Program.DoRun(String[ ] args)
at il2cpp.Program.Run(String[ ] args)
at il2cpp.Program.Main(String[ ] args)
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List
1, Action1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:496)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action
1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:70)
DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:247)
DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:46)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[/spoiler]

How to fix this?

Thanks alot!

I wonder if the Windows SDK in not installed properly. I'm not sure what Shell32.lib would be missing for any other reason.

Yeah, this sounds like a bad Windows 10 SDK installation. I suggest reinstalling it.

Yes, you are right, it's the Windows 10 SDK.
I installed the SDK manually first, and the second time it was installed by the Visual Studio along with C++ package.
So, I just removed the manual installation, and everything worked.

Thank you!

Hi,
I have a similar error but with a different file:
2>LINK : fatal error LNK1181: cannot open input file 'C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\build\bin\ARM64\Release\GameAssembly.lib'

VS 2022 17.7.3
Unity 2022.3.7f1
I'm building an app for HoloLens 2 ARM64

Any idea how to fix it?
Thanks in advance.

Full output log:

Build started...
1>------ Build started: Project: Il2CppOutputProject, Configuration: Release ARM64 ------
1>Building GameAssembly.dll with MsvcWinRtToolChain
1>    Msvc Install Version: 17.0
1>    Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
1>    Msvc Linker Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\bin\HostX64\ARM64\link.exe
1>    Msvc Compiler Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\bin\HostX64\ARM64\cl.exe
1>
1>    Output directory: C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\build\bin\ARM64\Release
1>    Cache directory: C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\build\obj\il2cppOutputProject\ARM64\Release
1>EXEC : error : Unity.IL2CPP.Building.BuilderFailedException: Lump_libil2cpp_vm.cpp
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(71): error C2039: 'hash_compare': is not a member of 'stdext'
1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\iterator(1469): note: see declaration of 'stdext'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(71): error C2065: 'hash_compare': undeclared identifier
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(71): error C2275: 'Key': expected an expression instead of a type
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(38): error C2976: 'Il2CppReaderWriterLockedHashMap': too few template arguments
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(385): error C2662: 'bool Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::TryGet(const Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::key_type &,T *)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(385): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(385): note: Conversion requires a second user-defined-conversion operator or constructor
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(90): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::TryGet'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(385): note: while trying to match the argument list '(Il2CppClass *, Il2CppClass **)'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(438): error C2662: 'bool Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::Add(const Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::key_type &,const T &)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(438): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(438): note: Conversion requires a second user-defined-conversion operator or constructor
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(102): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::Add'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(438): note: while trying to match the argument list '(Il2CppClass *, Il2CppClass *)'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): error C2955: 'Il2CppReaderWriterLockedHashMap': use of class template requires template argument list
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): error C2662: 'Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::iterator Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedBegin(void)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): note: Conversion requires a second user-defined-conversion operator or constructor
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(121): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedBegin'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): note: while trying to match the argument list '()'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): error C2662: 'Il2CppHashMap<Key,T,HashFcn,EqualKey,Alloc>::iterator Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedEnd(void)': cannot convert 'this' pointer from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc> &'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): note: Conversion requires a second user-defined-conversion operator or constructor
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\utils/Il2CppHashMap.h(127): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedEnd'
1>C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\vm\MetadataCache.cpp(1135): note: while trying to match the argument list '()'
1>
1>Invocation was: Executable: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\bin\HostX64\ARM64\cl.exe"
1>Arguments: "C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\Source\lumpedcpp\Lump_libil2cpp_vm.cpp" /nologo /c /bigobj /W3 /Z7 /EHs /GR- /Gy /utf-8 /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /wd4200 /wd4834 /wd4722 /Ox /Oi /Oy- /GS- /Gw /GF /Zo /MD -d2ssa-cfg-jt- /DWINDOWS_UWP /DUNITY_UWP /DUNITY_WSA_10_0 /DUNITY_WSA /DUNITY_WINRT /DPLATFORM_WINRT /DNET_4_0 /DUNITY_AOT /DIL2CPP_MONO_DEBUGGER_DISABLED /DGC_NOT_DLL /DRUNTIME_IL2CPP /DBASELIB_INLINE_NAMESPACE=il2cpp_baselib /DIL2CPP_DEFAULT_DATA_DIR_PATH=Data/il2cpp_data /DBASELIB_USE_DYNAMICLIBRARY=1 /D_WIN32 /DWIN32 /DWIN32_THREADS /D_WINDOWS /DWINDOWS /D_UNICODE /DUNICODE /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS /DNOMINMAX /D_NDEBUG /DNDEBUG /DWINDOWS_SDK_BUILD_VERSION=22621 /D__WRL_NO_DEFAULT_LIB__ /DWINAPI_FAMILY=WINAPI_FAMILY_APP /I"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp" /I"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp" /I"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\external\bdwgc\include" /I"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\external\xxHash" /I"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\external\baselib\Include" /I"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\external\baselib\Platforms\UniversalWindows\Include" /I"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\IL2CPP\libil2cpp\pch" /I"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt" /Fo"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\build\obj\il2cppOutputProject\ARM64\Release\libil2cpp\EAA8E263566A76EAC03A8F4E42BA307F.obj" /Fd"C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\build\obj\il2cppOutputProject\ARM64\Release\libil2cpp\EAA8E263566A76EAC03A8F4E42BA307F.pdb"
1>EnvArg key: PATH value: C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64
1>
1>   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
1>   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
1>   at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
1>   at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
1>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ""C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\\IL2CPP\build\deploy\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\\build\bin\ARM64\Release\\" -cachedirectory="C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Il2CppOutputProject\\Source"  --baselib-directory="C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\Players\UAP\il2cpp\ARM64\Release" --avoid-dynamic-library-copy --dont-deploy-baselib --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-win32 -verbose --relative-data-path=Data/il2cpp_data --compiler-flags="-d2ssa-cfg-jt-"" exited with code 4.
1>Done building project "Il2CppOutputProject.vcxproj" -- FAILED.
2>------ Build started: Project: VSI_apoQlar, Configuration: Release ARM64 ------
2>pch.cpp
2>App.cpp
2>Main.cpp
2>UnityGenerated.cpp
2>LINK : fatal error LNK1181: cannot open input file 'C:\Users\lgorecki\Unity_Workspace\VSI_HoloLens\VSI_HoloLens\app2\build\bin\ARM64\Release\GameAssembly.lib'
2>Done building project "VSI_apoQlar.vcxproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 10:43 and took 04,751 seconds ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
========== Deploy started at 10:43 and took 04,751 seconds ==========

This is a known issue with some workarounds and fixes in newer Unity versions. See https://discussions.unity.com/t/898800 for details.