Error when building

I have this error

Bug report submitted

FYI everyone, this error was caused by saving the built player folder inside the project’s assets folder. Generally, you should always save your builds outside of the assets folder (but inside the project folder, alongside the assets folder is okay).

I am not doing this, but I have the same error.

@Ulognep
Even im not saving the build folder inside the assets folder. The project was working fine before but suddenly it started giving this problem. im only getting ths problem for this particular project rest of the project r working fine.

Currently the only way to solve this was to created the whole project again but its very much painful to sit and recreate the whole game.

plz have a look at this problem.

i Just answered in a similar post

"I had the same problem and was caused because i moved my project to a different directory, so simply Unity can’t find Temp Folder.

Solution, replace project in previous directory folder or make a new Build Settings and save to the new Directory. ( not Build and Run, only Build) "

Andrea

I have had this issue several times now. The player was saved inside the project directory but not inside the assets directory. The directory name has not changed or been moved.

The only solution once it happens I have found is to create a new project, move all assets over, resetup everything. Luckily our projects have been perf test stuff, but this would be a huge problem for big projcts… not a good solution.

note: I am on mac Unity iphone, newest version.

ya ur correct the only solution for this problem i came up is to recreate the whole project
mine project is a big one its took couple of days to get everything working

I don’t have a solution but here is what I did before the error started happening.

  1. build run game on my iPhone
  2. Delete all of the scenes except the 1 that I was using and another 1 that I wasn’t using. These scenes I deleted were part of the game in build settings.
  3. try to build and run again = error

Just delete the build folder it creates and it should work again. if not, a restart of Unity iPhone commonly does

If this happens than i think should go for a build option only and select the main folder for the build. And run test it

I got this error and noticed that there were multiple instances of explorer running under Windows 7 Ultimate. Every time Unity creates a build it launches an explorer window showing the folder that the build was in. These create a new embedded Explorer process (You will see it in Task Manager as x:\Windows\Explorer.exe /factory,{guid} -Embedding)

When you close these windows the process doesn’t exit cleanly and after enough builds it will first start throwing this error then lock up Unity entirely when building.

Solution:
You will need to have the “Command Line” column enabled in your Task Managers view. (View - Select Columns)

  1. Close Unity, (may have to End Task a second unity process)
  2. End task all of the Explorer /factory processes.
  3. Do a build in an empty directory.

Everything should be back to normal. If not ensure you don’t have any files in the _Data folder of your build directory open in another program. (Unity deletes this folder before building)

I am getting this error. Last night it worked fine, I made a build at about 1am. Went to bed, woke up at 7am. Rebuilt failed. Same error over and over again. Nothing changed, did not restart the machine, did not pass go, did not collect 200.

Tried everything suggested in here, from creating new folders to deleting original folders. The error is always related to copying files from the webplayer templates directory. No file name is mentioned, just the directory.

So I now cannot use Unity at all. Surely there is something more concrete than all the various reasons in here that identify the source of this issue ? It seems quite clear that the source is not at all understood if the solutions presented have been so wide and varied ?

Go to Google and search for {(missing dll name) download}. then download the Dll file,and pest your system 32 folder … solved.

FWCorey, your answer solved this error for me. Specifically this line:

Turns out, I had opened the runtime log file in Notepad after the last build, and when I went to rebuild, it was causing the error. Closing Notepad solved the issue.

I hope this helps anyone else who stumbles across this thread.

Hello guys, i can answer your problem telling only you need check a option in the unity access link to Administrator mode.

This problem is normal in all versions after windows XP.

Thank you all.

yes, all of the suggestions here are voodoo magic, its not even clear if everyone is having the same issue or just the same symptom. i am not able to debug the problem with any great success either though. however i can provide some useful information…

i am leaning very heavily towards considering this a bug within Unity because:

  • i had the problem on our automated test server - in a clean checkout of a project on a clean machine - the same data works fine on three other machines
  • opening the editor and doing a build myself on that machine works fine and i tried using precisely the same path. the problem only occurs when doing a build from command line
  • the reporting of this error is not being handled gracefully - it seems unexpected
    (* insert rant about brainless use of exceptions and allowing the shoddiness of your duplo block style of programming to ever be seen by an end user)

the error message tells us the problem thankfully - a file copy failed. i can rule out the most common reasons for this happening, here are my findings:

  • the path definitely exists, the build script creates it i can inspect it myself and copy files in there myself, i can build to the path if i run the editor myself.
  • there are no file lock problems - the target folder for the build is completely empty - the copy that fails is copying to a location where there is an empty folder. there is no possible file lock scenario that can hinder this afaik.
  • permissions are not the issue - the target folder is created by a process started by the same user as part of the build process. it is possible that unity goes out of its way to do something especially stupid with permissions, but this is highly unlikely imo. i can’t imagine it being the case unless a programmer went out of his way to break this code in a mysterious way…
  • i have tried all of the voodoo magic suggestions already given. none of them work.

I have tried all of variants and i find solution for me. I just open another project and build that. After this, I opened my problem project and this solved my problem )))

I have these errors While Building!

Please solve this problem as soon as possible

Build completed with a result of ‘Failed’
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:182
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:89
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

Same problem as the person above. Please help this is the second time I’ve had to deal with building errors -first time was entirely my fault- and they are getting to be really annoying. Also I’m using Unity 2018.2.16.