Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Teadaddy · Nov 25, 2015 at 08:59 PM · buildbuild-errorbuild and runbuildsbuildplayer

Seems to build, shows the following errors

I am trying to build, but I get the following errors, any help appreciated!

IOException: Sharing violation on path Temp\StagingArea\OCEnv_stormcap.exe" or "D:\Tao de Work\UnityProjects\Oldcastle_StormcaptureEnv\Oldcastle\builds5.2\OCEnv_stormcap.exe System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/File.cs:124) UnityEditor.FileUtil.UnityFileCopy (System.String from, System.String to, Boolean overwrite) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:207) UnityEditor.FileUtil.CopyDirectoryFiltered (System.String source, System.String target, Boolean overwrite, System.Func`2 includeCallback, Boolean recursive) (at C:/buildslave/unity/build/Editor/Mono/FileUtil.cs:142) DesktopStandalonePostProcessor.CopyStagingAreaIntoDestination () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:194) DesktopStandalonePostProcessor.PostProcess () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:25) UnityEditor.WindowsStandalone.WindowsDesktopStandalonePostProcessor.PostProcess (BuildPostProcessArgs args) 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()

AND

Error building Player: IOException: Sharing violation on path Temp\StagingArea\OCEnv_stormcap.exe" or "D:\Tao de Work\UnityProjects\Oldcastle_StormcaptureEnv\Oldcastle\builds5.2\OCEnv_stormcap.exe

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jessespike · Nov 26, 2015 at 08:04 AM 0
Share

What platform are you building to? PC? Are you trying to overwrite an existing build? Try a different directory.

avatar image Bonfire-Boy · Nov 26, 2015 at 09:28 AM 0
Share

Try closing Unity, deleting the Library and Temp folders and then restarting Unity so that it recreates them.

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Bonfire-Boy · Nov 26, 2015 at 09:35 AM

It looks like it's having trouble with the file system and it specifies 2 possible files that are causing the problem.

One of them looks like it's the exe that's being built. So check the permissions on the directory, and if you're overwriting a previous build then check you have permissions to do so (or, better yet IMO, don't overwrite an existing build).

The other file it mentions is in Unity's Temp folder. Sometimes a failed build leaves stuff in there that confuses future builds. To fix this, close Unity, delete the Library and Temp folders, and then restart Unity so that it recreates them from scratch.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Teadaddy · Dec 01, 2015 at 10:09 PM 0
Share

That helped clear out the main body of the errors, Thanks- I think it is a compound problem that includes the piece addressed below, Thanks for the help!

avatar image
2

Answer by Bunny83 · Nov 26, 2015 at 12:31 PM

A "sharing violation" indicates that another application has an active handle to a file you try to access. In windows when you run a program the system actually hold a handle to the exe file and keep it locked while the application is running. When you build your game it's actually build inside that temp folder. When it's done it copies the result over to the destination folder. Since the error happens inside "System.IO.File.Copy" it's most likely that your old build is still running.

Keep in mind that "running" doesn't mean that you necessarily have to see a window. If your game had a problem it's possible that it still runs in the background without an active / visible window. So make sure your game application doesn't run when you create a build. Just check the TaskManager's details tab and search for your file. Don't rely on the processes tab as it only shows "apps" that have a window.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Teadaddy · Dec 01, 2015 at 10:08 PM 0
Share

Thanks for the insight, I am running 7, I never wanted 8 and haven't gotten around to getting 10 , so I don't have a details tab in my task manager. However, it seems that (after the helpful rebuild Library idea) the build that I have has 3 processes that seem to stop before loading much into memory (about 120k, whereas a working version of this exe loads about 500$$anonymous$$b) and cant be ended from within task manager. Strangely, a version that is opened after the first one has hung opens and runs normally (0_0) so it sounds like you have something there with your suggestion. Any help on how I might address this would be appreciated. Thanks again!

avatar image Bonfire-Boy Teadaddy · Dec 02, 2015 at 10:18 AM 0
Share

I always had trouble with Task $$anonymous$$anager in W7. There's a free alternative called Process Explorer that I found better for this kind of thing (better at killing processes as well as finding them).

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

35 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity Build installs but leads to a black screen. 1 Answer

Runs fine in editor but terribly slow as build. 0 Answers

Old build present after building to a new folder on desktop. 0 Answers

Unity 2017.1.0f3 personal 64bit Does Not build to android 0 Answers

Unable to install APK to device 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges