- Home /
Can't build my game!
So whenever i try to build the game, I get 2 console errors.
Failed running C:\Program Files\Unity\Hub\Editor\2020.1.2f1\Editor\Data\il2cpp/build/deploy/netcoreapp3.0/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="E:\Unity\Projects\Arena Prototype - Copy\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="E:\Unity\Projects\Arena Prototype - Copy\Assets\..\Library/il2cpp_cache" --baselib-directory="C:/Program Files/Unity/Hub/Editor/2020.1.2f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport\Variations\win32_nondevelopment_il2cpp" --avoid-dynamic-library-copy --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2020.1.2f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="E:/Unity/Projects/Arena Prototype - Copy/Temp/StagingArea/Data/Managed" --generatedcppdir="E:/Unity/Projects/Arena Prototype - Copy/Temp/StagingArea/Data/il2cppOutput"
stdout:
Running il2cpp.exe in server GC mode.
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 Windows SDK 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.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions)
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 Windows SDK 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.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions)
at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions)
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:RunNetCoreProgram(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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
and this one
Exception: C:\Program Files\Unity\Hub\Editor\2020.1.2f1\Editor\Data\il2cpp/build/deploy/netcoreapp3.0/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEditorInternal.IL2CPPBuilder.Run () (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <d1bec46880064709a5e713ad543e6d96>:0)
DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at <d1bec46880064709a5e713ad543e6d96>:0)
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <d1bec46880064709a5e713ad543e6d96>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d1bec46880064709a5e713ad543e6d96>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Answer by dajohnso · Aug 25, 2020 at 01:09 AM
Have you been able to build before? Did you check the build options to be sure you are building for the correct environment?
Honestly I haven't. This is my first build on the game and the build settings are default, they should work anyways. Default options always worked before on other projects.
Is there a way I can clean my files automatically on unity?
that is not true. You must go into the build options and select which build you are going to be supporting.
Same Here I am Also Building A pc Game But It Stucks In Build And Run option
Your answer
Follow this Question
Related Questions
"Build" for Android Platform asks for save location but nothing happens 0 Answers
Unity 2019.3.14 not building to windows platform 3 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers