'Can't create an .appx because of C++ Initialization-errors

I am relatively new to the AR topics. I successfully completed the MRTK Tutorial (Introduction to the Mixed Reality Toolkit-Set Up Your Project and Use Hand Interaction - Learn | Microsoft Docs) and deployed the .appx via SideLoading to the HoloLens2.

Now I tried to add an AR-scene to our already existing (non-ar but vr-)project. I did all the prerequisits from the tutorial installing MRTK 2.7.0 to the project and Unity 2020.3.8 could successfully build the C++-project for Visual Studio 2019 Enterprise 16.11.9.

Then I tried to create the app-package (Release, ARM64) but I get the following errors and I don't know, why they are coming and how to get rid of them:

Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler Unity.IL2CPP.Building.BuilderFailedException: Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\EXEC 1
Fehler C2440 "Initialisierung": "Matrix4x4_tE5B2302EECD50374D51724CF4477A02746A14508 *" kann nicht in "Matrix4x4_t5B627955C6D80AF8F1D97A6466CB337DCEEB3504 *" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 8125
Fehler C2440 "Initialisierung": "Matrix4x4_tE5B2302EECD50374D51724CF4477A02746A14508 *" kann nicht in "Matrix4x4_t5B627955C6D80AF8F1D97A6466CB337DCEEB3504 *" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 8131
Fehler C2440 "Initialisierung": "Matrix4x4_tE5B2302EECD50374D51724CF4477A02746A14508 *" kann nicht in "Matrix4x4_t5B627955C6D80AF8F1D97A6466CB337DCEEB3504 *" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 8137
Fehler C2440 "Initialisierung": "Matrix4x4_tE5B2302EECD50374D51724CF4477A02746A14508 *" kann nicht in "Matrix4x4_t5B627955C6D80AF8F1D97A6466CB337DCEEB3504 *" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 8143
Fehler C2440 "Initialisierung": "Vector3_t8C16CAFB16002C7A98D693B67168610FB48C11B1" kann nicht in "Vector3_t8DE19479CE3BD4C34B7AF76E89F5523A14FE37F4" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 9589
Fehler C2440 "Initialisierung": "Vector3_t8C16CAFB16002C7A98D693B67168610FB48C11B1" kann nicht in "Vector3_t8DE19479CE3BD4C34B7AF76E89F5523A14FE37F4" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 9600
Fehler C2440 "Initialisierung": "Vector3_t8C16CAFB16002C7A98D693B67168610FB48C11B1" kann nicht in "Vector3_t8DE19479CE3BD4C34B7AF76E89F5523A14FE37F4" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 10804
Fehler C2440 "Initialisierung": "Vector3_t8C16CAFB16002C7A98D693B67168610FB48C11B1" kann nicht in "Vector3_t8DE19479CE3BD4C34B7AF76E89F5523A14FE37F4" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 11017
Fehler C2440 "Initialisierung": "Vector3_t8C16CAFB16002C7A98D693B67168610FB48C11B1" kann nicht in "Vector3_t8DE19479CE3BD4C34B7AF76E89F5523A14FE37F4" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 11026
Fehler C2440 "Initialisierung": "Vector3_t8C16CAFB16002C7A98D693B67168610FB48C11B1" kann nicht in "Vector3_t8DE19479CE3BD4C34B7AF76E89F5523A14FE37F4" konvertiert werden Il2CppOutputProject C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\Source\il2cppOutput\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.cpp 12119
Fehler MSB3073 Der Befehl ""C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\\IL2CPP\build\deploy\netcoreapp3.1\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=ARM64 -configuration=Release -platform=winrt -outputpath="C:\transfer\2022_03_01\ar_prototype\\build\bin\ARM64\Release\GameAssembly.dll" --data-folder="C:\transfer\2022_03_01\ar_prototype\\build\bin\ARM64\Release\\" -cachedirectory="C:\transfer\2022_03_01\ar_prototype\\build\obj\il2cppOutputProject\ARM64\Release\\" -generatedcppdir="C:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\\Source" --baselib-directory="C:\Program Files\Unity\Hub\Editor\2020.3.8f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\ARM64\Release" --avoid-dynamic-library-copy --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:\transfer\2022_03_01\ar_prototype\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe" --compiler-flags="-d2ssa-cfg-jt-"" wurde mit dem Code 4 beendet. Il2CppOutputProject C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 46

The error messages in a more readable way: upload_2022-3-1_16-34-15.png

Essentially coming down to (translated):

"Matrix4x4_tE5B2302EECD50374D51724CF4477A02746A14508 *" can not be converted to "Matrix4x4_t5B627955C6D80AF8F1D97A6466CB337DCEEB3504 *" 

and

"Vector3_t8C16CAFB16002C7A98D693B67168610FB48C11B1" can not be converted to "Vector3_t8DE19479CE3BD4C34B7AF76E89F5523A14FE37F4"

I already tried different Unity- and also MRTK-Versions without success.

These are the installed packages:

enter image description here

The following assets are also installed but not shown in Package Manager:

  • Battlehub RuntimeEditor
  • Best HTTP
  • I2 Localization
  • Trilib
  • Mirror Networking

Can somebody help me with this please?



Sources

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

Source: Stack Overflow

Solution Source