I receive this error message when I try to build the game. How to fix? Any guidance is appreciated :)

I tried installing Unity over it worked the first two times but now this error doesn’t change.

IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path:
System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:337)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String assembliesToStrip, System.String searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:268)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String managedAssemblyFolderPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:115)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:170)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:42)
UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:367)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:936)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:287)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Hi,

This one has come up a couple of times on the forum, I’m not sure it’s had a specific fix yet, because it seems quite difficult to reproduce on anyone else’s computers when it occurs.

There was a fairly detailed topic here:

I’ve just had a quick look on the Unity forums and there is someone else having the same issue, although not building for WebGL, but for them, after running a trace, it turned out to be their McAfee AntiVirus, it had hold of a file whilst the Unity process was trying to do something with it.

Thanks. I’ve figured it out. It looks like process called “MfeAVSvc.exe” opens that file while Unity tries to delete it, therefore the subsequent Move operation fails:

As such, it might be worth looking at any specific anti-virus tools you have installed. The solution for the user above was to re-install McAfee.

Hope this helps :slight_smile:

Rob, Thank you but I just damaged this game overnight. I already started from scratch, because I received 7 syntax errors after trying to fix this one error. Its okay though starting over, I wont make the same mistakes again. I even delete the game in version control I could not revert back without receiving all the errors. I appreciate your feedback if this error continues I will look in to McAfee. I don’t like to call them they always tell me its a virus and want money, I will buy a new anti virus if this is the case.

I don’t think you would need to call McAfee…

Firstly - do you even have McAfee anti-virus installed? If not, then you don’t need to call them at all! It sounds as if you may have it installed though. What worked in the article above was the user re-install McAfee, that might be a good place to start.

So, as you say, wait until you’ve got back to this point with your project, try the build. If the issue continues, re-install McAfee and see if that resolves the issue.

Please do let us know as it may be of use to another student too.

Rob, Yes I do have McAfee but I have another issues the Standard Assets Packs is not available with any of my the version I download but I just downloaded from the asset store a moment ago Nice :slight_smile:

That is the only way you can get them now, with the newer versions of Unity, they have standardised the delivery approach so it’s online with other assets from the store and reduces the size of the main download.

Hi Rob, I need to know how to open (PlayerShipGunsWorking) master commit I created using Sourcetree within Unity. So I can undo what I damaged today. When I try to left click master nothing happens when I right click I click on reverse to commit but I still can’t get it to open in Unity where I left off with this master commit (PlayershipGunsWorking) how can I do that? if it just reversing the commit it doesn’t work for me, shouldn’t I be able to see where I left off within that master commit in Unity? I need to know I don’t think Unity working right for me :frowning: If I can’t get back where I left off in the master commit (PlayerShipGunsWorking) it doesn’t make sense to continue when Unity doesn’t operate correctly. Any feedback is Appreciated :frowning:

Hi,

I’d suggest that this isn’t going to be a case of Unity not operating correctly. Sourcetree and your project are entirely separate from that, so lets rule that out.

Sourcetree, I don’t personally use, so I have little familiarity with it at all, however, from what you’ve suggested - what you want to do is revert your current working directory back to a previous state.

Normally you have a couple of options for this, you can either just set the working directory back to a previous commit, and then carry on from there, this may then run in to some merge-conflicts when you re-commit depending on the changes.

Or, you can opt to drop everything that you have committed after a certain point, effectively rolling the entire repository back to a specific commit. The latter is more damaging, if you do this, there will be no way to get back any changes after that point.

If you are not already I would also suggest making sure Unity is not open when you try make changes to your working directory using Sourcetree, you may find some files are locked and then SourceTree may not be able to change them back to what they were - creating an awful mess potentially.

The process you need to follow will also depend on whether the commits you have made are only to a local repository, e.g. a repository on your computer, or whether you have also pushed those changes to a remote repository, e.g. GitHub / BitBucket etc. If you let me know what your current configuration is I may be able to help a little further.

I appreciate your frustration, but there is no need to give up because of these issues, at the very worst you could just use the Project Changes link under Resources on Udemy for the previous lecture to the one you are on now and download a copy of the course version of the project. You will then have a version as it was at that point in time. You may need to then swap some assets around or make changes to the animations if you have made significant changes yourself, but chances are these would be salvageable from whatever you have in your working directory right now, including perhaps your terrain files. All is not lost! :slight_smile:

Below are some links from the Sourcetree documentation which you may find useful - I would encourage you to take a backup of whatever is in your working directory now and store that separately, for the time being, whilst you experiment with the Sourcetree options, e.g. you don’t end up any worse off.

I think the first link below is what you may need, but again I don’t fully know what you have setup/configured regarding Git at your end, so please do make sure you take a backup before trying anything.

Hope this helps :slight_smile:


See also;

Privacy & Terms