Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Il2cpp build error

Discussion in 'Editor & General Support' started by rushi1962, Sep 20, 2020.

  1. rushi1962

    rushi1962

    Joined:
    Sep 20, 2020
    Posts:
    4
    Hi,
    I'm making a project in URP(Unity 2019.4.8f1) for the PC stand alone platform. The project is working fine in the unity Editor, but when I try to build the project, I run into following error. Please let me know, how could I solve this.
    Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\2019.4.8f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe', CommandLine='--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\rushi\Partha\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\rushi\Partha\Assets\..\Library/il2cpp_cache" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.4.8f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/rushi/Partha/Temp/StagingArea/Data/Managed --generatedcppdir=C:/Users/rushi/Partha/Temp/StagingArea/Data/il2cppOutput ', CurrentDirectory='C:\Users\rushi\Partha\Temp\StagingArea\Data\Managed', Native error= The requested operation requires elevation.
    System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    System.Diagnostics.Process.Start () (at <14e3453b740b4bd690e8d4e5a013a715>:0)
    (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
    UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditor.Utils.Program.Start () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditorInternal.IL2CPPBuilder.Run () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <d7545a46516941d4b2f2dec578cd41ee>: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 <d7545a46516941d4b2f2dec578cd41ee>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Sep 21, 2020
  2. rushi1962

    rushi1962

    Joined:
    Sep 20, 2020
    Posts:
    4
    Please help me to solve this, I'd really be grateful.
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Make sure that you have .NET Framework 4.8 or newer installed on this computer. Also, are you using Windows 7 or Windows 10?
     
  4. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663
    Sounds like you have a permission issue there.

    "The requested operation requires elevation" means that, in order to open the file/directory, you'll need the elevated permission of a local administrator to take ownership and gain access.

    Have you tried running the Unity Editor as an Administrator via the "Run as administrator" option?
     
  5. rushi1962

    rushi1962

    Joined:
    Sep 20, 2020
    Posts:
    4
    Well, I'm using Windows 10. But never mind. I figured out and solved the problem. Thanks though:)
     
  6. rushi1962

    rushi1962

    Joined:
    Sep 20, 2020
    Posts:
    4
    Thanks for help but I got rid of that problem now. :)
     
  7. Lilcolombian

    Lilcolombian

    Joined:
    Jun 1, 2017
    Posts:
    15
    @rushi1962 What was the solution? I have it happeing to me T_T