Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug Unity visual studio UWP build errors building to xbox

Discussion in 'Windows' started by nixstudio429, Jan 16, 2023.

  1. nixstudio429

    nixstudio429

    Joined:
    Sep 10, 2020
    Posts:
    3
    Unity version 2022.1.22f, Visual studio 2019 16.11.22

    After building my unity project to UWP with il2cpp, i follow the windows xbox uwp deployment, but when i try to build it, i get errors.


    Here is the build output: 1> 1>Invocation was: Executable: "D:\Visual studio\Community 2022\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\cl.exe" 1>Arguments: "D:\Unity\MiningGame\Builds\UWP\1.0\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 /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_DISABLED /DGC_NOT_DLL /DRUNTIME_IL2CPP /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_DEBUG /DDEBUG /DIL2CPP_DEBUG=1 /DWINDOWS_SDK_BUILD_VERSION=22621 /D__WRL_NO_DEFAULT_LIB__ /DWINAPI_FAMILY=WINAPI_FAMILY_APP /I"D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\libil2cpp" /I"D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\libil2cpp" /I"D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\external\bdwgc\include" /I"D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\external\xxHash" /I"D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\external\baselib\Include" /I"D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\external\baselib\Platforms\UniversalWindows\Include" /I"D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\libil2cpp\pch" /I"D:\Visual studio\Community 2022\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"D:\Unity\MiningGame\Builds\UWP\1.0\build\obj\il2cppOutputProject\x64\Debug\libil2cpp\11A0BDF31787E9DFF371F2BC88A6BFA5.obj" /Fd"D:\Unity\MiningGame\Builds\UWP\1.0\build\obj\il2cppOutputProject\x64\Debug\libil2cpp\11A0BDF31787E9DFF371F2BC88A6BFA5.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;D:\Visual studio\Community 2022\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 (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command ""D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\IL2CPP\build\deploy\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Debug -platform=WinRT -outputpath="D:\Unity\MiningGame\Builds\UWP\1.0\build\bin\x64\Debug\GameAssembly.dll" --data-folder="D:\Unity\MiningGame\Builds\UWP\1.0\build\bin\x64\Debug\" -cachedirectory="D:\Unity\MiningGame\Builds\UWP\1.0\build\obj\il2cppOutputProject\x64\Debug\" -generatedcppdir="D:\Unity\MiningGame\Builds\UWP\1.0\Il2CppOutputProject\Source" --incremental-g-c-time-slice=3 --baselib-directory="D:\Unity\Editor\2022.1.22f1\Editor\Data\PlaybackEngines\MetroSupport\Players\UAP\il2cpp\x64\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.

    I was trying to build to the xbox, but it doesnt even make it to the visual studio pin, just fails.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    Hi,

    it seems the error is cut off. Can you copy paste the full error from the "Output" tab of Visual Studio? Also, please use code tags for better readability :).