Search Unity

'Temp/Assembly-CSharp.dll' to 'Library/ScriptAssemblies/Assembly-CSharp.dll' failed

Discussion in 'Editor & General Support' started by SprayNpraY, Feb 29, 2020.

  1. SprayNpraY

    SprayNpraY

    Joined:
    Oct 2, 2014
    Posts:
    156
    Copying assembly from 'Temp/Assembly-CSharp.dll' to 'Library/ScriptAssemblies/Assembly-CSharp.dll' failed


    Hi I'm getting the above error message when trying to build my unity project to android, I can then no longer even test the game in playmode when I haven't changed any other settings or scripts etc.

    It seems to only be fixed when I restart my PC, I can do a build one once but then I have to keep restarting my PC. I've seen some similar posts on this I have already tried running anti malware and tried with my firewalls turned off and neither has stopped this from happening.

    I'm using a project that was originally in unity 5.4.1 now currently in 2019.3.1f
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Hi, I've checked our bug tracking system and noticed a couple of reports like this, however all of them seem to be caused either by corrupted dll or by external software locking the file. I see you have already tried some of the suggested solutions, such as running anti malware scan and disabling the firewall. The other suggestions I've seen were to reimport project assets and to whitelist Unity in your Antivirus software. Somehow Kaspersky was mentioned specifically, so if you have an antivirus software, you could try to whitelist Unity there.
     
    SprayNpraY likes this.
  3. SprayNpraY

    SprayNpraY

    Joined:
    Oct 2, 2014
    Posts:
    156
    Thanks again for the information, I was just changing some C# code in 2018.4 and I randomly got the mssage:

    Copying assembly from 'Temp/Assembly-CSharp-Editor.dll' to 'Library/ScriptAssemblies/Assembly-CSharp-Editor.dll' failed

    so it isn't just from when I've created or creating android builds. I also did several builds for android yesterday over a few hours and didn't have the message come up once.

    It seems to be quite unpredictable. How do I go about fixing the dll if it isn't being caused due to my anti virus or firewalls?

    To clarify by builds I mean creating a build for my phone to test it on my mobile. I'm currently editing the game with it on the build settings on the android platform if that makes sense

    I also just tested taking off my antivirus and firewall software, Im using comodo and reopening the project seemed to remove the message so it maybe related to that I will update this message when I've find out how to whitelist the project
     
    Last edited: Mar 6, 2020