Search Unity

Problems Building for Windows Store, UnauthorizedAccessException WinRTLegacy.dll

Discussion in 'VR' started by sml79569, Feb 19, 2017.

  1. sml79569

    sml79569

    Joined:
    Sep 22, 2013
    Posts:
    3
    I have been following Develop Microsoft HoloLens Apps Now, and I have setup a simple scene to test on the HoloLens. When I try to build it, however, I always get the error:

    UnauthorizedAccessException: Access to the path "Temp\StagingArea\Data\Managed\WinRTLegacy.dll" is denied.
    System.IO.File.Delete (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:179)
    System.IO.Directory.RecursiveDelete (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:195)
    System.IO.Directory.Delete (System.String path, Boolean recursive) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:205)
    Utility.DeleteDirectory (System.String path) (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/Utility.cs:322)
    PostProcessWinRT.MoveDataManagedToRoot () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:463)
    PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:125)
    UnityEditor.WSA.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:155)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
    UnityEditor.HostView:OnGUI()

    My build settings are
    upload_2017-2-18_18-2-46.png

    And I have set the player settings to fastest and virtual reality supported to windows holographic.
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Which Unity version are you on? Any chance you have some anti virus software running that's scanning those files as unity puts them there, thus preventing unity from deleting them?
     
  3. sml79569

    sml79569

    Joined:
    Sep 22, 2013
    Posts:
    3
    I think I am using 5.5.1f. I am running Windows 10 without any extra antivirus, but I wouldn't know if Windows defender would behave as such. I will try disabling it and trying again.
     
  4. sml79569

    sml79569

    Joined:
    Sep 22, 2013
    Posts:
    3
    I think the issue resolved itself, maybe from restarting my computer or something.