I'm trying to add Xbox Live calls inside the project. In Unity project I call the method public static void SilentSignIn () from the Start method in a MonoBehaviour. That method is converted in Code (CSharp): extern "C" void XboxLiveManager_SilentSignIn_m576691742 (Il2CppObject * __this /* static, unused */, const MethodInfo* method) which is in Il2CppOutputProject Inside such method I must call Windows::System::User::FindAllAsync but : even if I import Windows.h I cannot resolve Windows namespace. Please help.
Generally, you shouldn't edit generated C++ code, because it will get overwritten every time you build from Unity. Generally, if you want to call into C++ code, you'd use "P/Invoke" functions in C# and then have your implementations ready as lose .cpp files in your Unity project or as .dll files (already compiled C++ code). However, are you on Unity 5.6? You can call these methods directly from C# in your scripts. No need to write anything in C++: https://docs.unity3d.com/Manual/IL2CPP-WindowsRuntimeSupport.html
Thirst: thank you for replying. Second: I switched the player to Windows Store platform and set parameters as indicated in documentation: API Compatibility Level: .NET 4.6 Compilation Overrides: Use Net Core Am I supposed, this way, to be able to use Windows namespace inside scripts? Because it doesn't work....
Yeah you should be. Just don't forget to wrap that code inside #if ENABLE_WINMD_SUPPORT/#endif. For instance: Code (csharp): #if NET_4_6 async #endif void SilentSignIn() { #if ENABLE_WINMD_SUPPORT var users = await Windows.System.User.FindAllAsync(); foreach (var user in users) ... #endif }
I'm making several tests because I'm pretty sure I'm not setting up something right. One of the error is, the script does not compile because it doesn't recognize the modifier async. Also, is it expected to show all that code in gray?
Wait, something moved.... Once I thrown in Xbox Live DLL and a custom test DLL The solution duplicated the project this way The .Player project references what I need and the code assist goes my way. I think I should find a way now to separate the code between the two project with an #if ...
Trying to build the IL2CPP project here's what I got: Error MSB3073 The command ""D:\TestXboxLive\Builds\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Debug -platform=winrt -outputpath="D:\TestXboxLive\Builds\\build\bin\x64\Debug\GameAssembly.dll" --data-folder="D:\TestXboxLive\Builds\\build\bin\x64\Debug\\" -cachedirectory="D:\TestXboxLive\Builds\\build\obj\il2cppOutputProject\x64\Debug\\" -generatedcppdir="D:\TestXboxLive\Builds\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=Net45 -verbose --map-file-parser="D:\TestXboxLive\Builds\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766. Il2CppOutputProject C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44 Full log: 1>------ Build started: Project: Il2CppOutputProject, Configuration: Debug x64 ------ 1>Building GameAssembly.dll with MsvcWinRtToolChain. 1> Output directory: D:\TestXboxLive\Builds\build\bin\x64\Debug 1> Cache directory: D:\TestXboxLive\Builds\build\obj\il2cppOutputProject\x64\Debug 1>il2cpp.exe didn't catch exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o) 1> --- End of inner exception stack trace --- 1> at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action) 1> at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) 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>---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (Inner Exception #1) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (Inner Exception #2) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (Inner Exception #3) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (Inner Exception #4) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (Inner Exception #5) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (Inner Exception #6) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (Inner Exception #7) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1> 1>Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o) 1> --- End of inner exception stack trace --- 1> at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action) 1> at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) 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 ""D:\TestXboxLive\Builds\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=Debug -platform=winrt -outputpath="D:\TestXboxLive\Builds\\build\bin\x64\Debug\GameAssembly.dll" --data-folder="D:\TestXboxLive\Builds\\build\bin\x64\Debug\\" -cachedirectory="D:\TestXboxLive\Builds\\build\obj\il2cppOutputProject\x64\Debug\\" -generatedcppdir="D:\TestXboxLive\Builds\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=Net45 -verbose --map-file-parser="D:\TestXboxLive\Builds\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766. 1>Done building project "Il2CppOutputProject.vcxproj" -- FAILED. 2>------ Build started: Project: TestXboxLive, Configuration: Debug x64 ------ 2>pch.cpp 2>App.cpp 2>Main.cpp 2>UnityGenerated.cpp 2>d:\testxboxlive\builds\testxboxlive\app.cpp(26): warning C4973: 'Windows::UI::ViewManagement::IApplicationView2::SuppressSystemOverlays::set': marked as deprecated 2>d:\testxboxlive\builds\testxboxlive\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 'D:\TestXboxLive\Builds\build\bin\x64\Debug\GameAssembly.lib' 2>Done building project "TestXboxLive.vcxproj" -- FAILED. ========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
You're using wrong define. #if NETFX_CORE will not work for il2cpp. Use #if ENABLE_WINMD_SUPPORT instead. As for that compilation error - for some reason IL2CPP cannot locate a C++ compiler on your machine. Do you use VS2017 or VS2015?
I assume you're still getting the il2сpp compilation error? Does this file exist on your machine? "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\Hostx64\x64\cl.exe"
Could you drop this DLL into <Generated_VS_solution_folder>\il2cppOutputProject\IL2CPP\build\ (you should overwrite existing file), then try to build and paste the output? I added some debug logging to figure out where it's looking for the compiler.
Here you go : 1>------ Build started: Project: Il2CppOutputProject, Configuration: Master x64 ------ 1>Building GameAssembly.dll with MsvcWinRtToolChain. 1> Output directory: D:\TestXboxLive\Builds\build\bin\x64\Master 1> Cache directory: D:\TestXboxLive\Builds\build\obj\il2cppOutputProject\x64\Master 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>Using C++ compiler at: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe 1>il2cpp.exe didn't catch exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o) 1> --- End of inner exception stack trace --- 1> at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action) 1> at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) 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>---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1>---> (Inner Exception #1) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1>---> (Inner Exception #2) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1>---> (Inner Exception #3) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1>---> (Inner Exception #4) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1>---> (Inner Exception #5) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1>---> (Inner Exception #6) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1>---> (Inner Exception #7) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<--- 1> 1> 1>Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified 1> at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> at Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data) 1> at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o) 1> --- End of inner exception stack trace --- 1> at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action) 1> at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) 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 ""D:\TestXboxLive\Builds\Il2CppOutputProject\\IL2CPP\build\il2cpp.exe" --libil2cpp-static --compile-cpp -architecture=x64 -configuration=ReleasePlus -platform=winrt -outputpath="D:\TestXboxLive\Builds\\build\bin\x64\Master\GameAssembly.dll" --data-folder="D:\TestXboxLive\Builds\\build\bin\x64\Master\\" -cachedirectory="D:\TestXboxLive\Builds\\build\obj\il2cppOutputProject\x64\Master\\" -generatedcppdir="D:\TestXboxLive\Builds\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=Net45 -verbose --map-file-parser="D:\TestXboxLive\Builds\Il2CppOutputProject\\IL2CPP\MapFileParser\MapFileParser.exe"" exited with code -532462766. 1>Done building project "Il2CppOutputProject.vcxproj" -- FAILED. 2>------ Build started: Project: TestXboxLive, Configuration: Master x64 ------ 2>LINK : fatal error LNK1181: cannot open input file 'D:\TestXboxLive\Builds\build\bin\x64\Master\GameAssembly.lib' 2>Done building project "TestXboxLive.vcxproj" -- FAILED. ========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
Hmm, it's picking up the C++ compiler from VS2015. I'll try investigating why this could happen, but in the mean time you could install C++ support into VS2015 and it should fix the error:
Do you have idea why, if I try to use wait, VS says " Assets\XboxLiveManager.cs(28,9): error CS4036: 'IAsyncOperation<IReadOnlyList<User>>' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type 'IAsyncOperation<IReadOnlyList<User>>' could be found (are you missing a using directive for 'System'?)"
I don't understand why, on Debug execution, I constantly receive this error right after splash screen: Code (CSharp): onecoreuap\xbox\devices\api\winrt\pnpapiwrapper.cpp(385)\Windows.Gaming.Input.dll!00007FFD9EE72B8C: (caller: 00007FFD9EE76470) ReturnHr(1) tid(6ea0) 8685C003 'Turtle's Quest.exe' (Win32): Loaded 'C:\Windows\System32\deviceaccess.dll'. Cannot find or open the PDB file. 'Turtle's Quest.exe' (Win32): Loaded 'C:\Windows\System32\ffbroker.dll'. Cannot find or open the PDB file. onecoreuap\xbox\devices\api\winrt\pnpdevicewatcher.cpp(503)\Windows.Gaming.Input.dll!00007FFD9EE76C72: (caller: 00007FFD9EE762AE) ReturnHr(2) tid(6ea0) 80070057 The parameter is incorrect. onecoreuap\xbox\devices\api\winrt\pnpdevicewatcher.cpp(503)\Windows.Gaming.Input.dll!00007FFD9EE76C72: (caller: 00007FFD9EE762AE) ReturnHr(3) tid(6ea0) 80070057 The parameter is incorrect. onecoreuap\xbox\devices\api\winrt\pnpdevicewatcher.cpp(503)\Windows.Gaming.Input.dll!00007FFD9EE76C72: (caller: 00007FFD9EE762AE) ReturnHr(4) tid(6ea0) 80070057 The parameter is incorrect. onecoreuap\xbox\devices\api\winrt\pnpdevice.cpp(480)\Windows.Gaming.Input.dll!00007FFD9EE73A6F: (caller: 00007FFD9EE6B619) ReturnHr(5) tid(6ea0) 80070020 The process cannot access the file because it is being used by another process. onecoreuap\xbox\devices\api\winrt\pnpdevicewatcher.cpp(503)\Windows.Gaming.Input.dll!00007FFD9EE76C72: (caller: 00007FFD9EE762AE) ReturnHr(6) tid(6ea0) 80070020 The process cannot access the file because it is being used by another process. onecoreuap\xbox\devices\api\winrt\pnpdevicewatcher.cpp(503)\Windows.Gaming.Input.dll!00007FFD9EE76C72: (caller: 00007FFD9EE762AE) ReturnHr(7) tid(6ea0) 80070057 The parameter is incorrect. onecoreuap\xbox\devices\api\winrt\pnpapiwrapper.cpp(385)\Windows.Gaming.Input.dll!00007FFD9EE72B8C: (caller: 00007FFD9EE76470) ReturnHr(8) tid(6ea0) 8685C003 onecoreuap\xbox\devices\api\winrt\pnpapiwrapper.cpp(385)\Windows.Gaming.Input.dll!00007FFD9EE72B8C: (caller: 00007FFD9EE76470) ReturnHr(9) tid(6ea0) 8685C003 Exception thrown at 0x00007FFDAB7F9E08 in Turtle's Quest.exe: Microsoft C++ exception: _com_error at memory location [0x000000AAFAFF8D50]. Exception thrown at 0x00007FFDAB7F9E08 in Turtle's Quest.exe: Microsoft C++ exception: _com_error at memory location [0x000000F69ABF8AD0]. The memory location changes.
Hi, I believe I have the same issue as being described above. I have built a Windows Store build in Unity 5.6.0f3 using Scripting backend 'Il2CPP' and API Compatability Level'.NET 4.6' I opened the solution in Visual Studio Community 2017 (The only version of VS I currently have access to), and I am greeted with the following warning: Upon setting the target to x64 and Building the solution, I receive the following log: This seems to me to be the same issue, but honestly this is the first time I've tried to build a UWP project, and I'm not very familiar with Visual Studio, so I'm not really sure how related they are. The output logs seem similar to me. Is it possible to install whatever VS 2015 build tools the project is looking for to VS2017, or will I need to find a download of Visual Studio 2015 somewhere?
@pb0o6 are you able to create a C++ project targeting UWP in Visual Studio and run it? If something is not installed in VS2017, it should trigger installation of it. If it does work, and Unity compilation still doesn't, it means you're hitting the same issue of Unity being unable to locate VS2017 (I have yet to investigate why that would happen), and it means you'll have to install VS2015.
Hi, I have the same issue as being described above. Then I get the .dll on #12. the error changed as this: il2cpp.exe didn't catch exception: System.MissingMethodException: 找不到方法:“Void Unity.IL2CPP.Building.BuildDescriptions.IL2CPPOutputBuildDescription..ctor(....
Void Unity.IL2CPP.Building.BuildDescriptions.IL2CPPOutputBuildDescription..ctor(NiceIO.NPath, NiceIO.NPath, NiceIO.NPath, Unity.IL2CPP.Common.DotNetProfile, Unity.IL2CPP.Building.CppToolChain, NiceIO.NPath, Boolean, Boolean, System.Collections.Generic.IEnumerable`1<System.String>, System.Collections.Generic.IEnumerable`1<NiceIO.NPath>, System.Collections.Generic.IEnumerable`1<NiceIO.NPath>, System.Collections.Generic.IEnumerable`1<System.String>, System.Collections.Generic.IEnumerable`1<System.String>, NiceIO.NPath)
Post reply occur some error:your content is spam-like or contains inappropriate elements.so i try Divided the editor log into two parts. first: 1>il2cpp.exe didn't catch exception: System.MissingMethodException: cannot find method: Void Unity.IL2CPP.Building.BuildDescriptions.IL2CPPOutputBuildDescription..ctor(NiceIO.NPath, NiceIO.NPath, NiceIO.NPath, Unity.IL2CPP.Common.DotNetProfile, Unity.IL2CPP.Building.CppToolChain, NiceIO.NPath, Boolean, Boolean, System.Collections.Generic.IEnumerable`1<System.String>, System.Collections.Generic.IEnumerable`1<NiceIO.NPath>, System.Collections.Generic.IEnumerable`1<NiceIO.NPath>, System.Collections.Generic.IEnumerable`1<System.String>, System.Collections.Generic.IEnumerable`1<System.String>, NiceIO.NPath)
second: 1> il2cpp. Program. DoRun(String[] args) 1> il2cpp. Program. Run(String[] args) 1> il2cpp. Program.Main(String[] args)
Which Unity version are you on? That DLL was only compatible with Unity 5.6. Looks like you're on a different Unity version.
Here is the initial editor log: 1>Building GameAssembly.dll with MsvcWinRtToolChain. 1> Output directory: D:\proj.zombie\UWP\build\bin\Win32\Debug 1> Cache directory: D:\proj.zombie\UWP\build\obj\il2cppOutputProject\Win32\Debug 1>il2cpp.exe didn't catch exception: System.AggregateException: One or more errors occurred。 ---> System.ComponentModel.Win32Exception: The system can not find the file specified。 1> 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> 在 Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> 在 Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(CppCompilationInstruction cppCompilationInstruction) 1> 在 Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o) 1> --- 内部异常堆栈跟踪的结尾 --- 1> 在 Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action) 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile) 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.Build() 1> 在 il2cpp.Program.DoRun(String[] args) 1> 在 il2cpp.Program.Run(String[] args) 1> 在 il2cpp.Program.Main(String[] args) 1>---> (内部异常 #0) System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 1> 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> 在 Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> 在 Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(CppCompilationInstruction cppCompilationInstruction) 1> 在 Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (内部异常 #1) System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 1> 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> 在 Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> 在 Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(CppCompilationInstruction cppCompilationInstruction) 1> 在 Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (内部异常 #2) System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 1> 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> 在 Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> 在 Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(CppCompilationInstruction cppCompilationInstruction) 1> 在 Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1>---> (内部异常 #3) System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 1> 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> 在 Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> 在 Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(CppCompilationInstruction cppCompilationInstruction) 1> 在 Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o)<--- 1> 1> 1>未经处理的异常: System.AggregateException: 发生一个或多个错误。 ---> System.ComponentModel.Win32Exception: 系统找不到指定的文件。 1> 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 1> 在 Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller) 1> 在 Unity.IL2CPP.Building.CompilationInvocation.Execute() 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(CppCompilationInstruction cppCompilationInstruction) 1> 在 Unity.IL2CPP.Building.ParallelFor.<RunWithResult>c__AnonStorey1`2.<>m__0(Object o) 1> --- 内部异常堆栈跟踪的结尾 --- 1> 在 Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action) 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile) 1> 在 Unity.IL2CPP.Building.CppProgramBuilder.Build() 1> 在 il2cpp.Program.DoRun(String[] args) 1> 在 il2cpp.Program.Run(String[] args) 1> 在 il2cpp.Program.Main(String[] args)
Check my post from #14. Modify your VS2015 installation in "Programs and Features" and make sure those C++ checkboxes are checked.
my vs version is 2017.so the installation options is not same as 2015,but i install almost all plugin about c++. and when i open the c++ project, i get a warning: D:\UWPTest \UWPTestProject\cLL\Il2CppOutputProject\Il2CppOutputProject. vcxproj : warning : Can not find the Visual Studio 2015 (v140) generation tool is it helpful? and how can i solved this warning. i am very sorry about my chinese English
Can you try this workaround? There is a known issue with VS2017 right now (which is already fixed internally and is waiting for backporting): https://forum.unity3d.com/threads/compiling-wsa-applications-with-vs2017-fails.472963/#post-3089007
it did not work. that issue is really similar as mine.but it is a little different:my exception is System.AggregateException,his exception is System.InvalidOperationException. i am trying google with the key world "System.AggregateException" to find some clue. by the way, what is MsvcWinRtToolChain? is it a tool plugin? why i can not find any file named MsvcWinRtToolChain?
I don't think googling will help - the issue is that Unity cannot locate a C++ compiler on your machine. If you create a brand new C++ project targeting Universal Windows in Visual Studio, are you able to build it? If not, it means you're missing some C++ components. MsvcWinRtToolChain is one of our classes that handles C++ code compilation. Are you able to upgrade to Unity 5.6? I'm not sure what state Unity 5.5 was in regards to C++ compilation with VS2017. Otherwise, could you try installing VS2015?
i got it. when install vs2017, Game development with Unity has a option:Unity 5.6 Editor.i thought this is download the unity editor of version 5.6(maybe it is true).i choice this want it can help me update my unity to 5.6,but it is over very quickly(although the size needed is 2.9G).but at last, my build is success. I feel very surprised. and thanks for your help.
i have another question. if i want build my unity uwp project with .Net mode.is there an elegant way to solve the Net version problem?: The .NET Scripting Backend is using Microsofts .NET to power scripting. Unlike other Unity platforms, Windows Store is not using .NET 3.5 Class Libraries profile, but rather a subset of .NET 4.5. This is due to Windows Store certification requirements. This means that the platform has some incompatibilities compared to other platforms, such as different plugin model and many missing types that are present in .NET 3.5 profile that Unity normally uses. my uwp project has my error about .Net version using .Net building.
Unfortunately no. The only solution is to use IL2CPP. That's why we made it available in the first place. Is there any reason you don't want to use IL2CPP?
1.every time i changed my c# code, i need build it with my unity. 2.in the compiled c++ project, i cannot find my unity c# code, it is no way to debug the project. 3.if the compiled c++ project error, it is hard to find the reason because the code is unreadable
Fair points. We're addressing 2) and 3) by building a debugger. It's still work in progress, and will take a couple of Unity releases to finish.