Workaround for building with IL2CPP with Visual Studio 2022 17.4

UPDATE: The fix is included in Unity 2020.3.42f1, 2021.3.14f1, 2022.1.23f1, 2022.2.0b16 and 2023.1.0a19.

Visual Studio 2022 17.4 update has introduced a breaking change in their standard C++ headers which causes parts of IL2CPP runtime fail to compile if you upgrade to this version of Visual Studio:

[111/231    3s] C_Win64_VS2022 Library/Bee/artifacts/WinPlayerBuildProgram/ei6vj/5dkl_c_vm6.lump.obj
##### CommandLine
"C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.34.31932/bin/Hostx64/x64/cl.exe" /Oi /D_WIN64 /D_AMD64_ /FC "Library\Bee\artifacts\WinPlayerBuildProgram\ei6vj\ij4c_vm6.lump.cpp" /MT /c /bigobj /utf-8 /cgthreads2 /Ox /Gw /Zo /Oy- /d2ssa-cse- /TP /EHs /GR- /Gy /nologo /GF /Z7 /GS- /W3 /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /wd4200 /wd4834 /wd4722 /DUNICODE /D_UNICODE /D_SECURE_SCL=0 /D_ITERATOR_DEBUG_LEVEL=0 /D_HAS_ITERATOR_DEBUGGING=0 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP /DWIN32 /DWINDOWS /D_WINDOWS /DBASELIB_INLINE_NAMESPACE=il2cpp_baselib /DBASELIB_USE_DYNAMICLIBRARY=1 /DIL2CPP_MONO_DEBUGGER_DISABLED /DRUNTIME_IL2CPP /DIL2CPP_ENABLE_WRITE_BARRIERS=1 /DIL2CPP_INCREMENTAL_TIME_SLICE=3 /DGC_NOT_DLL /DWIN32_THREADS /DIL2CPP_DEFAULT_DATA_DIR_PATH=Data /DWINDOWS_SDK_BUILD_VERSION=22621 /DNOMINMAX /DNDEBUG /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_WINSOCK_DEPRECATED_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DNOMINMAX /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /I"." /I"E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\pch" /I"E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp" /I"E:\Builds\2021.3.10f1\Editor\Data\il2cpp\external\baselib\Include" /I"E:\Builds\2021.3.10f1\Editor\Data\il2cpp\external\baselib\Platforms\Windows\Include" /I"E:\Builds\2021.3.10f1\Editor\Data\il2cpp\external\bdwgc\include" /I"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31932\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" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt" /Fo"Library\Bee\artifacts\WinPlayerBuildProgram\ei6vj\5dkl_c_vm6.lump.obj" /D_HAS_AUTO_PTR_ETC=1 /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /D_SILENCE_ALL_CXX20_DEPRECATION_WARNINGS /Zc:__cplusplus /std:c++17
##### Custom Environment Variables
PATH=C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31932\bin\Hostx64\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64
_MSPDBSRV_ENDPOINT_=7360085491879648213
##### ExitCode
2
##### Output
ij4c_vm6.lump.cpp

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2039: 'hash_compare': is not a member of 'stdext'

C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31932\include\iterator(1426): note: see declaration of 'stdext'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2065: 'hash_compare': undeclared identifier

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(71): error C2275: 'Key': expected an expression instead of a type

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(38): error C2976: 'Il2CppReaderWriterLockedHashMap': too few template arguments

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(38): error C2974: 'Il2CppReaderWriterLockedHashMap': invalid template argument for 'HashFcn', type expected

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(38): error C2955: 'Il2CppReaderWriterLockedHashMap': use of class template requires template argument list

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(47): error C2955: 'Il2CppReaderWriterLockedHashMap': use of class template requires template argument list

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'

E:\Builds\2021.3.10f1\Editor\Data\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> &'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(385): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(385): note: Conversion requires a second user-defined-conversion operator or constructor

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(90): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::TryGet'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(385): note: while trying to match the argument list '(Il2CppClass *, Il2CppClass **)'

E:\Builds\2021.3.10f1\Editor\Data\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> &'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(438): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(438): note: Conversion requires a second user-defined-conversion operator or constructor

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(102): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::Add'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(438): note: while trying to match the argument list '(Il2CppClass *, Il2CppClass *)'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1135): error C2955: 'Il2CppReaderWriterLockedHashMap': use of class template requires template argument list

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(75): note: see declaration of 'Il2CppReaderWriterLockedHashMap'

E:\Builds\2021.3.10f1\Editor\Data\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> &'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1135): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1135): note: Conversion requires a second user-defined-conversion operator or constructor

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(121): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedBegin'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1135): note: while trying to match the argument list '()'

E:\Builds\2021.3.10f1\Editor\Data\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> &'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1135): note: Reason: cannot convert from 'PointerTypeMap' to 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1135): note: Conversion requires a second user-defined-conversion operator or constructor

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\utils\Il2CppHashMap.h(127): note: see declaration of 'Il2CppReaderWriterLockedHashMap<Key,T,HashFcn,EqualKey,Alloc>::UnlockedEnd'

E:\Builds\2021.3.10f1\Editor\Data\il2cpp\libil2cpp\vm\MetadataCache.cpp(1135): note: while trying to match the argument list '()'

We reported this to Microsoft but unfortunately this change was by design: Developer Community

We are currently preparing a fix in Unity for this for all supported Unity releases. I will update this thread once the fix has gone out (you can track it here: Unity Issue Tracker - [IL2CPP] Windows builds fails when using VS 2022 17.4.0 Preview). In the mean time, you can workaround this issue by adding this script to anywhere within your project:

#if UNITY_EDITOR
using System;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;

public class MsvcStdextWorkaround : IPreprocessBuildWithReport
{
    const string kWorkaroundFlag = "/D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS";

    public int callbackOrder => 0;

    public void OnPreprocessBuild(BuildReport report)
    {
        var clEnv = Environment.GetEnvironmentVariable("_CL_");

        if (string.IsNullOrEmpty(clEnv))
        {
            Environment.SetEnvironmentVariable("_CL_", kWorkaroundFlag);
        }
        else if (!clEnv.Contains(kWorkaroundFlag))
        {
            clEnv += " " + kWorkaroundFlag;
            Environment.SetEnvironmentVariable("_CL_", clEnv);
        }
    }
}

#endif // UNITY_EDITOR

UPDATE: The fix is included in Unity 2020.3.42f1, 2021.3.14f1, 2022.1.23f1, 2022.2.0b16 and 2023.1.0a19.

8553044–1143662–MsvcStdextWorkaround.cs (773 Bytes)

23 Likes

Adding one line

#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

to

il2cpp\external\google\sparsehash\internal\sparseconfig.h

before

/* The system-provided hash function including the namespace. */
#define SPARSEHASH_HASH HASH_NAMESPACE::hash_compare

is also a solution.

11 Likes

We just hit this problem with the stable 17.4 version. The official fix only works when you are building the generated IL2CPP project inside Unity.
On our HoloLens build we are generating the IL2CPP project from unity but build it as a separate build step with MSBuild outside of Unity. the solutionby @zhang296 fixed it for us

Edit: We initially moified the generated header file, but later moved to setting the environment variable when invoking MSBuild, as this seemed as a nicer solution

1 Like

Thanks for bringing this up. When writing the original workaround, I forgot about cases like that.

1 Like

UPDATE: The fix is included in Unity 2020.3.42f1, 2021.3.14f1, 2022.1.23f1, 2022.2.0b16 and 2023.1.0a19.

6 Likes

I hope this is going on someone’s quarterly performance report.

2 Likes

Well, yes, the fix should have been out by the time the Visual Studio 17.4 was released (for example in Unity 2022.1.22 and the other versions released at the same time), but Unity acted relatively quickly to provide a fix which is easy to implement, and we will only have to wait one or two weeks for a fix in the editor - this could have been handled much worse.

2 Likes

Thanks very much for posting this - trying to figure out what was going wrong was driving me crazy!

I struggled for so many hours, thank you so much for this fix !

Hi @Tautvydas-Zilys , I was having this same issue with Unity version below 2022.1.23 for release builds for Hololens 2 with VS 2022 17.4.3 and after this post I upgraded to Unity 2022.1.24 and works for for release builds.

Now when building for debug I get error when trying to deploy the sln file to H2. Is this the same issue with VS2022 as per this post?

Severity    Code    Description    Project    File    Line    Suppression State
Error    MSB3073    The command ""C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\\IL2CPP\build\deploy\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Debug -platform=WinRT -outputpath="C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\\build\bin\ARM64\Debug\GameAssembly.dll" --data-folder="C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\\build\bin\ARM64\Debug\\" -cachedirectory="C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\\build\obj\il2cppOutputProject\ARM64\Debug\\" -generatedcppdir="C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\\Source" --enable-debugger --incremental-g-c-time-slice=3 --baselib-directory="C:\Program Files\Unity\Hub\Editor\2022.1.24f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\ARM64\Debug" --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" exited with code 4.    Il2CppOutputProject    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets    45   

Severity    Code    Description    Project    File    Line    Suppression State
Error    LNK1104    cannot open file 'C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\bin\ARM64\Debug\GameAssembly.lib'    PickAndPlace    C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\PickAndPlace\LINK    1

no, this is seems like an unreleated issue. Try deleting the following folders: your build ouput folder, Temp, Library, then try to build again. Also make sure that no process locks the file in the error

I doubt it’s related, however, when copying errors from Visual Studio, always copy the contents of the “Output” folder. “Errors” are not helpful - the stuff you pasted does not allow determining what is going wrong.

Thank you, I tried @KuraiAndras suggestions but the error remains. Yes sorry @Tautvydas-Zilys , here’s the output, maybe you see something here to follow a lead, I don’t:

Build started…
1>------ Build started: Project: Il2CppOutputProject, Configuration: Debug 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\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\ARM64\link.exe
1> Msvc Compiler Path: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\ARM64\cl.exe
1>
1> Output directory: C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\bin\ARM64\Debug
1> Cache directory: C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\obj\il2cppOutputProject\ARM64\Debug
1>EXEC : error : Unity.IL2CPP.Building.BuilderFailedException: debugger-agent.c
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/metadata/metadata-internals.h(1017): warning C4018: ‘>’: signed/unsigned mismatch
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(51): error C2061: syntax error: identifier ‘MonoContextSimdReg’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(51): error C2059: syntax error: ‘;’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/arch/arm64/arm64-codegen.h(173): warning C4244: ‘initializing’: conversion from ‘__int64’ to ‘unsigned int’, possible loss of data
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/arch/arm64/arm64-codegen.h(199): warning C4244: ‘initializing’: conversion from ‘__int64’ to ‘unsigned int’, possible loss of data
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/arch/arm64/arm64-codegen.h(227): warning C4244: ‘initializing’: conversion from 'int64’ to ‘unsigned int’, possible loss of data
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(483): error C2061: syntax error: identifier ‘MonoContextSimdReg’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(490): error C2059: syntax error: ‘}’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1073): error C2143: syntax error: missing ‘)’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1073): error C2081: ‘MonoContext’: name in formal parameter list illegal
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1073): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1073): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1081): error C2143: syntax error: missing ‘)’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1081): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1081): error C2059: syntax error: ‘type’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-context.h(1081): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-stack-unwinding.h(118): error C2061: syntax error: identifier ‘MonoContext’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-stack-unwinding.h(123): error C2059: syntax error: ‘}’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(242): error C2061: syntax error: identifier ‘MonoThreadUnwindState’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(312): error C2059: syntax error: ‘}’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(315): error C2143: syntax error: missing ‘)’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(315): error C2143: syntax error: missing ‘;’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(315): error C2059: syntax error: ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(315): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(323): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(323): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(323): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(329): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(329): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(329): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(331): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(331): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(331): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(336): error C2059: syntax error: ‘}’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(345): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(345): error C2143: syntax error: missing ‘;’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(345): error C2059: syntax error: '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(345): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(345): error C2059: syntax error: ‘type’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(345): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(346): error C2059: syntax error: ‘}’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(354): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(354): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(354): error C2040: ‘gpointer’: ‘int’ differs in levels of indirection from ‘void
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(354): error C2146: syntax error: missing ‘;’ before identifier ‘user_data’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(354): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(354): error C2040: ‘user_data’: ‘int’ differs in levels of indirection from ‘void
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(357): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(357): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(357): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(368): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(368): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(368): error C2370: ‘MonoThreadInfoFlags’: redefinition; different storage class
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(199): note: see declaration of ‘MonoThreadInfoFlags’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(368): error C2146: syntax error: missing ‘;’ before identifier ‘flags’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(368): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(369): error C2054: expected ‘(’ to follow ‘flags’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(396): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(396): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(396): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(397): error C2054: expected ‘(’ to follow ‘info’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(402): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(402): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(402): warning C4142: ‘MonoNativeThreadId’: benign redefinition of type
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(33): note: see declaration of ‘MonoNativeThreadId’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(402): error C2370: ‘MonoNativeThreadId’: redefinition; different storage class
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(33): note: see declaration of ‘MonoNativeThreadId’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(402): error C2146: syntax error: missing ‘;’ before identifier ‘tid’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(402): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(403): error C2054: expected ‘(’ to follow ‘tid’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(424): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(424): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(424): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(430): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(430): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(430): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(432): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(439): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(446): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(446): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(446): error C2040: ‘MonoGCHandle’: ‘int’ differs in levels of indirection from ‘void
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(446): error C2143: syntax error: missing ‘;’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(446): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(449): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(449): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(449): error C2040: ‘MonoGCHandle’: ‘int’ differs in levels of indirection from ‘void
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(449): error C2146: syntax error: missing ‘;’ before identifier ‘gchandle’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(449): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(449): error C2040: ‘gchandle’: ‘int’ differs in levels of indirection from ‘int
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(452): error C2143: syntax error: missing ‘)’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(452): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(452): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(460): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(470): error C2143: syntax error: missing ‘{’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(479): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(486): error C2146: syntax error: missing ‘)’ before identifier ‘callback’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(486): error C2081: ‘MonoSuspendThreadCallback’: name in formal parameter list illegal
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(486): error C2061: syntax error: identifier ‘callback’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(486): error C2059: syntax error: ‘;’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(486): error C2059: syntax error: ‘,’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(486): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(489): error C2143: syntax error: missing ‘)’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(489): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(489): error C2059: syntax error: ‘type’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(519): error C2143: syntax error: missing ‘)’ before ‘
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(519): error C2143: syntax error: missing ‘{’ before '

1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(519): error C2370: ‘MonoTlsKey’: redefinition; different storage class
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-tls.h(39): note: see declaration of ‘MonoTlsKey’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(519): error C2146: syntax error: missing ‘;’ before identifier ‘key’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(519): error C2059: syntax error: ‘)’
1>C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono/utils/mono-threads.h(519): fatal error C1003: error count exceeds 100; stopping compilation
1>
1>Invocation was: Executable: “C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\ARM64\cl.exe”
1>Arguments: “C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono\mini\debugger-agent.c” /nologo /c /bigobj /W3 /Z7 /EHs /GR- /Gy /utf-8 /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /wd4200 /wd4834 /wd4722 /Od /Zc:inline /RTC1 /MDd /DWINDOWS_UWP /DUNITY_UWP /DUNITY_WSA_10_0 /DUNITY_WSA /DUNITY_WINRT /DPLATFORM_WINRT /DNET_4_0 /DUNITY_AOT /DIL2CPP_MONO_DEBUGGER=1 /DIL2CPP_DEBUGGER_PORT=56000 /DGC_NOT_DLL /DRUNTIME_IL2CPP /DPLATFORM_UNITY /DUNITY_USE_PLATFORM_STUBS /DENABLE_OVERRIDABLE_ALLOCATORS /DIL2CPP_ON_MONO=1 /DDISABLE_JIT=1 /DDISABLE_REMOTING=1 /DHAVE_CONFIG_H /DMONO_DLL_EXPORT=1 /DIL2CPP_ENABLE_WRITE_BARRIERS=1 /DIL2CPP_INCREMENTAL_TIME_SLICE=3 /DIL2CPP_DEBUG=1 /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_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS /D_DEBUG /DDEBUG /DIL2CPP_DEBUG=1 /DWINDOWS_SDK_BUILD_VERSION=22621 /D__WRL_NO_DEFAULT_LIB
/DWINAPI_FAMILY=WINAPI_FAMILY_APP /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\libil2cpp" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\libil2cpp" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\bdwgc\include" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\xxHash" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\baselib\Include" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\baselib\Platforms\UniversalWindows\Include" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\libil2cpp\pch" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\Source" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono\eglib" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono\sgen" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono\utils" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono\metadata" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\external\mono\mono\metadata\private" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\libil2cpp\os\c-api" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\libmono\config" /I"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\libil2cpp\debugger" /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\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:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\obj\il2cppOutputProject\ARM64\Debug\libil2cpp\666C3B9EA71F1BEB08EF256E1061884E.obj" /Fd"C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\obj\il2cppOutputProject\ARM64\Debug\libil2cpp\666C3B9EA71F1BEB08EF256E1061884E.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\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64
1>
1> at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) 1> at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) 1> at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, ReadOnlyCollection1 matchedAssemblyMethodSourceFiles)
1> at il2cpp.Program.DoRun(String[ ] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ““C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\IL2CPP\build\deploy\il2cpp.exe” --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Debug -platform=WinRT -outputpath=“C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\bin\ARM64\Debug\GameAssembly.dll” --data-folder=“C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\bin\ARM64\Debug\” -cachedirectory=“C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\obj\il2cppOutputProject\ARM64\Debug\” -generatedcppdir=“C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\Il2CppOutputProject\Source” --enable-debugger --incremental-g-c-time-slice=3 --baselib-directory=“C:\Program Files\Unity\Hub\Editor\2022.1.24f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\ARM64\Debug” --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” exited with code 4.
1>Done building project “Il2CppOutputProject.vcxproj” – FAILED.
2>------ Build started: Project: PickAndPlace, Configuration: Debug ARM64 ------
2>LINK : fatal error LNK1104: cannot open file ‘C:\AR-VR-Github\Unity-Robotics-Hub-H2-test\tutorials\pick_and_place\Unity-Dev-Build-H2\build\bin\ARM64\Debug\GameAssembly.lib’
2>Done building project “PickAndPlace.vcxproj” – FAILED.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
========== Elapsed 00:08.286 ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
========== Elapsed 00:08.286 ==========

As a workaround, can you try disabling the debugger in the build window in Unity and see if it allows you to proceed??

This looks like a bug in Unity, but I’m not sure what is causing it.

Hi @Tautvydas-Zilys I think by disabling the debugger in the build window in Unity it means uncheck Development build. Yes it builds and deploys with these settings. Should I file bug report? Thank you for your help!

Yes, please file a bug report. Compilation should not fail when the debugger is enabled. Thank you!

https://unity.com/releases/editor/qa/bug-reporting

Well, I can’t report it anymore @JoshPeterson @Tautvydas-Zilys , since this morning I can’t even deploy the release after building in Unity, new error. I can’t see any update on Windows11 or VS, the only thing is that I installed Hololens 2 Emulator, which I have uninstalled since but the error persits. Awaiting to hear when solved I’ll raise the bug if the issue persists.

Unity 2022.2.7f1, Visual Studio 17.4.5, cannot build an empty project to HoloLens 2 with “Script Debugging” enabled because of this same error. When debugging is not selected, the application crashes on launch with an untraceable error.

What combination of Unity and Visual Studio versions is capable of building a HoloLens 2 application?

Can you drop us a bug report for this issue?

Deleting only Library/Bee was enough for me, upgraded only from 2021.3.16 to 2021.3.19.