Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Build Error Windows Unity 2020.1.6f1

Discussion in 'Windows' started by bersecks, Sep 24, 2020.

  1. bersecks

    bersecks

    Joined:
    Feb 18, 2018
    Posts:
    7
    I'm getting these errors when I try to build in windows:

    1 - Failed running C:\Program Files\Unity\2020.1.6f1\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="C:\Users\Dani Moret\Fins Medieval\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\Dani Moret\Fins Medieval\Assets\..\Library/il2cpp_cache" --baselib-directory="C:/Program Files/Unity/2020.1.6f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport\Variations\win32_nondevelopment_il2cpp" --avoid-dynamic-library-copy --profiler-report --map-file-parser="C:/Program Files/Unity/2020.1.6f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Users/Dani Moret/Fins Medieval/Temp/StagingArea/Data/Managed" --generatedcppdir="C:/Users/Dani Moret/Fins Medieval/Temp/StagingArea/Data/il2cppOutput"

    2 - Exception: C:\Program Files\Unity\2020.1.6f1\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 <67055f1be3654e2a987254d5437ee5b8>:0)
    UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <67055f1be3654e2a987254d5437ee5b8>:0)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <67055f1be3654e2a987254d5437ee5b8>:0)

    3 - Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    4 -
    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x0027c] in <67055f1be3654e2a987254d5437ee5b8>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <67055f1be3654e2a987254d5437ee5b8>:0
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     

    Attached Files:

  2. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    395
    Hey,
    It sounds like you may be hitting this bug, which is actually an issue with VS 2019 C++ compiler.

    Are you using VS 2019? If so can you please try the work-around mentioned in this post to see if that resolves the problem?
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,530
    Can you also post your editor log? The error is cut off so we're just guessing what's going on at this point.
     
  4. bersecks

    bersecks

    Joined:
    Feb 18, 2018
    Posts:
    7
    Here's the editor.log. I change in the project settings window the Scripting Backend from IL2CPP to Mono and it works. It builds without any problems
     

    Attached Files:

  5. bersecks

    bersecks

    Joined:
    Feb 18, 2018
    Posts:
    7
    I try but no ones works. The only that works for me now is changing the Scripting Backend from IL2CPP to Mono
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,530
    Looks like IL2CPP build failed because you tried building on top of a build made with Mono scripting backend:

    Code (csharp):
    1. UnityException: Build path contains project built with Mono scripting backend, while current project is using IL2CPP scripting backend. Consider building your project into an empty directory.
    Could you try building with IL2CPP to an empty directory and upload the editor.log from that build?
     
  7. bersecks

    bersecks

    Joined:
    Feb 18, 2018
    Posts:
    7
     

    Attached Files:

  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,530
    It looks like you're missing Windows 10 SDK:

    Code (csharp):
    1.         Visual Studio 2017 with C++ compilers and Windows 10 SDK (it cannot build C++ code because Windows SDK is not installed)
    2.         Visual Studio 2017 installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
    3.         Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry
    You can install it form here: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/
     
  9. bersecks

    bersecks

    Joined:
    Feb 18, 2018
    Posts:
    7
    It has worked ! Thank you guys you are incredible !! Thank you so much for everything!!