- Home /
Unity 2019.3.14 not building to windows platform
4 Errors
1)
Failed running C:\Program Files\Unity\Hub\Editor\2019.3.14f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x86" --configuration="Release" --outputpath="C:\Users\PC\CODE\Enviroment\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\PC\CODE\Enviroment\Assets..\Library/il2cpp_cache" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.3.14f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/PC/CODE/Enviroment/Temp/StagingArea/Data/Managed --generatedcppdir=C:/Users/PC/CODE/Enviroment/Temp/StagingArea/Data/il2cppOutput
stdout: il2cpp.exe didn't catch exception: System.InvalidOperationException: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have one of these installed: Visual Studio 2015 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed) Visual Studio 2015 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
Visual Studio 2017 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2017 installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
at Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment() at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies) at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture) at il2cpp.Program.Main(String[] args) stderr:
Unhandled Exception: System.InvalidOperationException: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have one of these installed: Visual Studio 2015 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed) Visual Studio 2015 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
Visual Studio 2017 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
Visual Studio 2017 installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
at Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment() at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies) at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture) at il2cpp.Program.Main(String[] args)
UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(Il2CppBuildPipelineData, String, String, Boolean) UnityEditorInternal.IL2CPPBuilder:Run() UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1) DesktopStandalonePostProcessor:PostProcess(BuildPostProcessArgs) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
2)
UnityEditor.Build.Reporting.BuildReport report) (at :0) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
3)
Build completed with a result of 'Failed' in 64 seconds (63766 ms) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
4)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in :0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0 UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
Answer by dardamavet · Nov 02, 2020 at 06:48 PM
I also don't have Visual Studio, my solution was to change the scripting backend from IL2CPP to Mono. Check it out at:
Player Settings -> Other Settings -> Scripting Backend -> Mono
Good luck!
I have Visual Studio installed, and the same Problem. Changing to $$anonymous$$ono does the trick! But what is the difference between IL2CPP and $$anonymous$$ono?
You are a legend, I've been trying to do this for hours and your post helped me, it is people like you that make this world great!
Answer by viesc123 · May 31, 2020 at 11:40 AM
The error message says "In order to build C++ code for Windows Desktop, you must have one of these installed: Visual Studio 2015 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)". Can you pls check if you have Visual Studio installed and if not, install it via the Unity Hub? Are you trying to build on Windows or on MacOS?
Answer by kentg1 · Mar 03 at 03:34 PM
I have the same problem in my class - have the same problem. No solution yet