Search Unity

UWP il2cpp build errors on empty project

Discussion in 'Windows' started by SPIKY, May 12, 2017.

  1. SPIKY

    SPIKY

    Joined:
    Dec 19, 2008
    Posts:
    57
    I'm trying to build an empty Unity project as a Windows Store app with following settings:
    - SDK: Universal 10
    - UWP SDK: 10.0.15063.0
    - Scripting backend: IL2CPP
    - API Compatibility Level: .NET 2.0

    The Visual Studio project builds just fine, but when I open and build this one in Visual Studio 2017, I'm getting lots of errors. Mind you, this was an empty Unity project. This is the build log:

    1>------ Build started: Project: Il2CppOutputProject, Configuration: Debug x64 ------
    1>Building GameAssembly.dll with MsvcWinRtToolChain.
    1> Output directory: E:\unity_builds\uwp_test\build\bin\x64\Debug
    1> Cache directory: E:\unity_builds\uwp_test\build\obj\il2cppOutputProject\x64\Debug
    1>il2cpp.exe didn't catch exception: System.AggregateException: Er zijn één of meer fouten opgetreden. ---> System.ComponentModel.Win32Exception: Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)
    1> --- Einde van intern uitzonderingsstackpad ---
    1> bij Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    1> bij Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
    1> bij il2cpp.Program.DoRun(String[] args)
    1> bij il2cpp.Program.Run(String[] args)
    1> bij il2cpp.Program.Main(String[] args)
    1>---> (Interne uitzondering #0) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>---> (Interne uitzondering #1) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>---> (Interne uitzondering #2) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>---> (Interne uitzondering #3) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>---> (Interne uitzondering #4) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>---> (Interne uitzondering #5) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>---> (Interne uitzondering #6) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>---> (Interne uitzondering #7) System.ComponentModel.Win32Exception (0x80004005): Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<---
    1>
    1>
    1>Onverwerkte uitzondering: System.AggregateException: Er zijn één of meer fouten opgetreden. ---> System.ComponentModel.Win32Exception: Het systeem kan het opgegeven bestand niet vinden
    1> bij System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    1> bij Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    1> bij Unity.IL2CPP.Building.CompilationInvocation.Execute()
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    1> bij Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)
    1> --- Einde van intern uitzonderingsstackpad ---
    1> bij Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    1> bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    1> bij Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
    1> bij il2cpp.Program.DoRun(String[] args)
    1> bij il2cpp.Program.Run(String[] args)
    1> bij il2cpp.Program.Main(String[] args)
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""E:\unity_builds\uwp_test\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Debug -platform=winrt -outputpath="E:\unity_builds\uwp_test\\build\bin\x64\Debug\GameAssembly.dll" --data-folder="E:\unity_builds\uwp_test\\build\bin\x64\Debug\\" -cachedirectory="E:\unity_builds\uwp_test\\build\obj\il2cppOutputProject\x64\Debug\\" -generatedcppdir="E:\unity_builds\uwp_test\Il2CppOutputProject\\Source" --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT -dotnetprofile=Net20 -verbose --map-file-parser="E:\unity_builds\uwp_test\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766.
    1>Done building project "Il2CppOutputProject.vcxproj" -- FAILED.
    2>------ Build started: Project: UWPtest, Configuration: Debug x64 ------
    2>pch.cpp
    2>App.cpp
    2>Main.cpp
    2>UnityGenerated.cpp
    2>e:\unity_builds\uwp_test\uwptest\app.cpp(26): warning C4973: 'Windows::UI::ViewManagement::IApplicationView2::SuppressSystemOverlays::set': marked as deprecated
    2>e:\unity_builds\uwp_test\uwptest\app.cpp(26): note: Message: 'Use the TryEnterFullScreen method and IsFullScreenMode property instead of SuppressSystemOverlays. For more info, see MSDN.'
    2>LINK : fatal error LNK1104: cannot open file 'E:\unity_builds\uwp_test\build\bin\x64\Debug\GameAssembly.lib'
    2>Done building project "UWPtest.vcxproj" -- FAILED.
    ========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

    Anyone who has any idea where to find the solution? After a day of searching I'm not one step further...
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Which Unity version are you on? It seems it tries to invoke non-existing C++ compiler on your machine.

    If you create a brand new C++ project targeting UWP in VS2017, does that build?
     
  3. Futaba

    Futaba

    Joined:
    Mar 15, 2013
    Posts:
    1
    Happens to me as well, fresh Win10 CU(with all updates), latest Unity 5.6.1f1(all x64), latest VS 2017 Community






    1>------ Build started: Project: Il2CppOutputProject, Configuration: Debug x64 ------

    1>Building GameAssembly.dll with MsvcWinRtToolChain.

    1> Output directory: C:\Users\futaba\Documents\S***\build\bin\x64\Debug

    1> Cache directory: C:\Users\futaba\Documents\S***\build\obj\il2cppOutputProject\x64\Debug

    1>il2cpp.exe didn't catch exception: System.InvalidOperationException: Builder is unable to build using selected toolchain (MsvcWinRtToolChain) or architecture (Unity.IL2CPP.Building.x64Architecture)!

    1> at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

    1> at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)

    1> at il2cpp.Program.DoRun(String[] args)

    1> at il2cpp.Program.Run(String[] args)

    1> at il2cpp.Program.Main(String[] args)

    1>

    1>Unhandled Exception: System.InvalidOperationException: Builder is unable to build using selected toolchain (MsvcWinRtToolChain) or architecture (Unity.IL2CPP.Building.x64Architecture)!

    1> at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

    1> at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)

    1> at il2cpp.Program.DoRun(String[] args)

    1> at il2cpp.Program.Run(String[] args)

    1> at il2cpp.Program.Main(String[] args)

    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ""C:\Users\futaba\Documents\S***\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Debug -platform=winrt -outputpath="C:\Users\futaba\Documents\S***\\build\bin\x64\Debug\GameAssembly.dll" --data-folder="C:\Users\futaba\Documents\S***\\build\bin\x64\Debug\\" -cachedirectory="C:\Users\futaba\Documents\S***\\build\obj\il2cppOutputProject\x64\Debug\\" -generatedcppdir="C:\Users\futaba\Documents\S***\Il2CppOutputProject\\Source" --additional-defines=WINDOWS_UWP --additional-defines=UNITY_UWP --additional-defines=UNITY_WSA_10_0 --additional-defines=UNITY_WSA --additional-defines=UNITY_WINRT -dotnetprofile=Unity -verbose --map-file-parser="C:\Users\futaba\Documents\S***\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766.

    1>Done building project "Il2CppOutputProject.vcxproj" -- FAILED.

    2>------ Build started: Project: New Unity Project, Configuration: Debug x64 ------

    2>pch.cpp

    2>App.cpp

    2>Main.cpp

    2>c:\users\futaba\documents\S***\new unity project\app.cpp(26): warning C4973: 'Windows::UI::ViewManagement::IApplicationView2::SuppressSystemOverlays::set': marked as deprecated

    2>c:\users\futaba\documents\S***\new unity project\app.cpp(26): note: Message: 'Use the TryEnterFullScreen method and IsFullScreenMode property instead of SuppressSystemOverlays. For more info, see MSDN.'

    2>UnityGenerated.cpp

    2>LINK : fatal error LNK1104: cannot open file 'C:\Users\futaba\Documents\S***\build\bin\x64\Debug\GameAssembly.lib'

    2>Done building project "New Unity Project.vcxproj" -- FAILED.

    ========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    I'm going to look at this first thing next week. You can install VS2015 (with C++ support) to work around the issue,
     
  5. josef-shindler_asu

    josef-shindler_asu

    Joined:
    May 27, 2016
    Posts:
    3
    Has there been any update on this? I'm experiencing the same issue. Thanks
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Yes, sorry for not posting an update to this thread. I fixed it and the fix was backported to Unity 5.6.1p3, which was released last week.