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

I am getting error when building a file for Windows Universal 8.1.

Discussion in 'Windows' started by tech247, Jan 25, 2017.

  1. tech247

    tech247

    Joined:
    Jul 2, 2013
    Posts:
    60
    IOException: Sharing violation on path Temp\StagingArea\Horse Racing.WindowsPhone\TempSerializationWeaver\UnityEngine.dll
    System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:339)
    PostProcessWinRT.RunSerializationWeaver () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:448)
    PostProcessUniversal81.RunSerializationWeaver () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:83)
    PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:123)
    PostProcessUniversal81.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUniversal81.cs:42)
    UnityEditor.Metro.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:133)
    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) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
    UnityEditor.HostView:OnGUI()


    *What should i do to get rid of this problem so that file can be build.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    The error indicates that the same file is used by multiple processes at the same time.
    Usually this is:
    - App is already running and you try to overwrite it -> close the app first, then build
    - Antivirus software -> disable antivirus or setup and exclude on that directory
    - Sometimes Visual Studio locks files when indexing stuff. These are rare. Closing VS before building would help.