Search Unity

Copying assembly from 'Temp/....dll' to 'Library/...' failed (project stucked)

Discussion in 'Package Manager' started by Quentin_Arragon, Apr 29, 2019.

  1. Quentin_Arragon

    Quentin_Arragon

    Joined:
    Aug 30, 2015
    Posts:
    13
    I have those errors when I open my project :

    "Copying assembly from 'Temp/com.unity.multiplayer-hlapi.Runtime.dll' to 'Library/ScriptAssemblies/com.unity.multiplayer-hlapi.Runtime.dll' failed"
    "Copying assembly from 'Temp/Unity.TextMeshPro.dll' to 'Library/ScriptAssemblies/Unity.TextMeshPro.dll' failed"
    etc

    My project is stucked.
    I am using Collaborate, I don't know if it's linked.
    But right know I have no Package Manager in Window Menu, and in the Services Window the button "Open the collaborate toolbar" do nothing.

    Edit : SOLVED
    Solved by running Malwarebytes and deleting two virus
     
    Last edited: Jul 29, 2019
    facundomfernandez and tribio like this.
  2. erick_unity

    erick_unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    41
    Hi @Quentin_Arragon, sorry to hear you're having issues, let's see what we can do to unblock you. I've opened up your question to the team, but would appreciate a few more details. Can you please share some info on the following:
    - What version of Unity are you using?
    - What packages are in your manifest?
    - Did your project ever compile, and if so, what was the trigger that put it in this state?

    One thing you could try up front is to close Unity, remove they temp and library folders from your project, and let Unity recreate them for you once you reopen it. Keep in mind that this could take minutes or even hours based on the size of your project.
     
  3. Quentin_Arragon

    Quentin_Arragon

    Joined:
    Aug 30, 2015
    Posts:
    13
    Hello,

    Thanks for your reply

    I ended up to continue my work on a backup made 3 days ago while my project was under unity 2018.3.

    I upgrated my project to Unity 2019.1 two days ago and everything was working fine I think.
    I can't explain why the project wasn't working anymore this morning.

    This is the content of the packages manifest file :

    {
    "dependencies": {
    "com.unity.ads": "2.0.8",
    "com.unity.analytics": "3.3.2",
    "com.unity.collab-proxy": "1.2.16",
    "com.unity.multiplayer-hlapi": "1.0.2",
    "com.unity.package-manager-ui": "2.1.2",
    "com.unity.purchasing": "2.0.6",
    "com.unity.shadergraph": "5.7.2",
    "com.unity.textmeshpro": "2.0.0",
    "com.unity.timeline": "1.0.0",
    "com.unity.xr.legacyinputhelpers": "2.0.2",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0"
    }
    }

    I tried to restart the folder without the Library folder and it didn't work.
    I didn't have any Temp folder while my project isn't opened.

    Do you think I should fill a bug report ?
     
  4. doeke

    doeke

    Joined:
    Oct 24, 2014
    Posts:
    2
    I just encountered the same problem with "Copying assembly ... failed", it happens every time I open the project, and even when I create a new project!

    Screenshot: https://i.imgur.com/6RdKxPr.png

    What happened? A few days ago everything was working fine..

    Using windows 2019.1.0f2

    Edit: Things I've tried: Restarting computer, removing Library, reinstalling Unity 2019.1, reimport all packages. Some old threads with this error seem to be related Kasperky, but I am not running any anti-virus either.

    Solved! The cause for me turned out to be a bitcoin miner virus that disabled cmd.exe (tried launching it and it immediately closes itself). Removed with Malwarebytes and everything appears to be working again.
     
    Last edited: Apr 29, 2019
    facundomfernandez and cdzarza like this.
  5. Quentin_Arragon

    Quentin_Arragon

    Joined:
    Aug 30, 2015
    Posts:
    13
    I did the same after reading your answer. And it worked !
    Malwarebytes found two virus. After deleting them, Unity worked as expected.

    @erick_unity, sorry for the inconvenience...
     
  6. erick_unity

    erick_unity

    Unity Technologies

    Joined:
    Jan 4, 2017
    Posts:
    41
    no worries, glad it got resolved!
     
  7. xpoele

    xpoele

    Joined:
    Apr 23, 2018
    Posts:
    1
    OMG thank you! I have been wandering the forums forever to find a solution. Windows Defender scan did not pick up the virus.
     
  8. unity_LzBuY34i8W2htg

    unity_LzBuY34i8W2htg

    Joined:
    Dec 27, 2017
    Posts:
    9
    It wasn't virus and it wasn't Windows Defender...

    I am still suffering from this issue. I even upgraded to the latest official release 2019.1.6f1 but still occurring. I have to reimport those failed ones like 6~8 times. This gets worse when I build Android package. Very painful :(

    It has been many days I tried to find answer for this but not been successful... Please help!

    Also adding this details which I hope it's useful for the investigation from Unity.

    - What version of Unity are you using?
    This issue started happening with very high frequency since 2019.1.2f1. Now with 2019.1.6f1 but still seeing the problem.

    - What packages are in your manifest?
    {
    "dependencies": {
    "com.unity.ads": "2.0.8",
    "com.unity.analytics": "3.3.2",
    "com.unity.collab-proxy": "1.2.16",
    "com.unity.package-manager-ui": "2.1.2",
    "com.unity.purchasing": "2.0.6",
    "com.unity.textmeshpro": "2.0.1",
    "com.unity.timeline": "1.0.0",
    "com.unity.xr.oculus.android": "1.36.0",
    "com.unity.xr.openvr.standalone": "1.0.5",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0"
    }
    }


    - Did your project ever compile, and if so, what was the trigger that put it in this state?
    It was working perfectly fine. Reimporting the ones failing will resolve the problem temporarily but it will come back again. Also, reimporting one failing usually resolves that failure but soon another package will be failed. Hence, I have to reimport 5-6 packages then eventually all issues will be resolved again temporarily.

    - Did restarting unity or removing temp directory help?
    I restart unity like tens of times each day because of this problem. Like I said above, it time-to-time resolves but it is just temporary fix. The issue will come back again...
     
    Last edited: Jun 14, 2019
    AKStudios911 likes this.
  9. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Last edited: Jun 18, 2019
  10. unity_LzBuY34i8W2htg

    unity_LzBuY34i8W2htg

    Joined:
    Dec 27, 2017
    Posts:
    9
    Hi Pascal,

    Thanks for taking a look :)

    That other thread seems like talking about a particular package "com.unity.multiplayer-hlapi" which I don't even use it...

    I am aware this could well be something wrong with my workstation setup which unfortunately I have no way to identify what went wrong... I followed the virus thing but detected nothing so I still have no clue but seeing this error pops up almost every time I make a chance in scripts... I'm sure you would understand how horrible dev experience that would be...

    Any advice or suggestion from Unity that I can try on my end would be really appreciated. I don't recall this was an issue with 2018 but started seeing from 2019.1 if that helps...

    Thanks in advance.
     
  11. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
  12. Tom-Mensink

    Tom-Mensink

    Joined:
    Jul 27, 2017
    Posts:
    17
    Hi Unity, @okcompute_unity, this dll copy issue is very persistant, in multiple Unity versions. It is becoming more than annoying and takes a lot of development time each day. It has been around for at least a year now and I think it is time you take this seriously. There are so many reports of this issue from many different developers, and it concerns not only this dll as in the tread I post now, but with different dlls every time. You Unity guys always ask the same question like which Unity version, what did you do, etc. but the bottom line is that it is a general issue in all later versions and you are not taking this seriously enough. It is rediculous to request us to exclude folders from virusscanners or something. That alone is a nonsense solution and we did not have this problem in the past when Unity was as stable as a house. So come on guys help us and instead of adding new features that make Unity even more unstable (like the horrific integration of Vuforia in Unity) make it more stable please.
     
    pym2020, LuLusg, nuoyang033 and 5 others like this.
  13. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @Tom-Mensink,

    I'm really really sorry you feel that way about Unity. Looks like we failed terribly for you :(. Really sad to read this. Unity takes software quality very seriously. I'll forward your feedback to my colleagues at Unity as a strong reminder to push our software quality higher. For this particular issue, it is not an easy one. Couple systems involved. The only thing I can ask you to do at this point if you haven't done it already is to fill a bug. I will understand if you don't. As you said, we already asked a lot from all of you and it shouldn't be that way. Our software should just work!

    Regards,

    Pascal
     
    Last edited: Jun 21, 2019
    karl_jones likes this.
  14. Emre_U

    Emre_U

    Joined:
    Jan 27, 2015
    Posts:
    49
    Supermalwarebytes or something similar found 2 bitcoin miners in my system and when I cleared them unity errors gone missing. Not sure how they are connected... But I am kinda happy that unexpectedly Unity put in some kind of malware detection tool so it fails to open when there is malware in your windows system. Please remove this feature though :D

    Package manager window was not showing in Windows-> ...

    And copying dll to library was failed.
     
  15. chriswadair

    chriswadair

    Joined:
    Apr 4, 2018
    Posts:
    3
    As much as I would like to submit a bug report for this problem (still having it here even with all of this advice), the problem was already reported as a duplicate in Bug Report https://issuetracker.unity3d.com/is...pdating-the-project-to-2019-dot-2-0a8-version . Does this mean that the bug should have already been fixed?

    I've tried to submit a report for lingering bugs like this before, but my bug report got tossed because, like this case, it had already been reported as fixed.
     
  16. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Yep. Same thing fixed it for me, which I didn't expect.
     
  17. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    I have the same type of errors, but Malwarebytes doesnt detect anything
    I get this when i make a build :
    Copying assembly from 'Temp/Obi.dll' to 'Library/ScriptAssemblies/Obi.dll' failed
    Copying assembly from 'Temp/Unity.Postprocessing.Runtime.dll' to 'Library/ScriptAssemblies/Unity.Postprocessing.Runtime.dll' failed
    Copying assembly from 'Temp/Unity.TextMeshPro.dll' to 'Library/ScriptAssemblies/Unity.TextMeshPro.dll' failed
    I made a downgrade from Unity 2019 to 2018.3, everything works fine but making a build
     
  18. ChrisV

    ChrisV

    Joined:
    Mar 3, 2013
    Posts:
    57
    Well, after quite some time, I reopened Unity again. Wanted to continue on one of my projects that I've been wanting to finish, or at least give it another go, lol. And, guess what? Yep, same errors popped up lately.
    So, I read through a few posts and threads, trying to get this solved, so I tried a few things, like running Malwarebytes, reimporting the packages that were mentioned in the errors, restarted Unity lots of times (at some point, it solved the issue, but the errors returned eventually, lol), and also tried by updating or removing some packages in the hope that it would magically fix it, but nothing of the above mentioned steps helped.

    BUT then, hm ... I thought, why don't I try something more drastic, right :)? So, I removed the High Definition RP package, and BAM, problem fixed! How weird is that, right :rolleyes:? Which reminded me that the errors didn't appear at first when I opened the project, but only AFTER I installed the package. Not sure if this package would be the cause of all these errors, but it has fixed mine so far.
     
  19. travlake

    travlake

    Joined:
    Oct 4, 2019
    Posts:
    50
    I restart Unity many times an hour because of this bug. It's incredibly annoying, and none of the suggested fixes on this thread or any of the others worked for me. I agree with @Tom-Mensink that this is a widespread bug affecting many devs that Unity seems to be ignoring. I filed another bug report and sent another email about it, we'll see if anything happens. cc @okcompute_unity.
     
    twhittaker likes this.
  20. supita_unity

    supita_unity

    Unity Technologies

    Joined:
    Dec 13, 2019
    Posts:
    226
    Hey guys,

    I'm really sorry to hear you are having these issues and thanks for filing a bug.

    I understand your frustration, but unfortunately sometimes the error that you have although it seems to be the same one, it's a symptom of different problems, that could depend on multiple factors: the Unity version, the packages that you are using in your project, external factors from Unity (like your OS, virus/antivirus).

    That being said, having some extra info, like the Editor.log and upm.log would help us to figure out what's the cause of your issue. I know that it's sounds like a pretty pre-bake answer, asking you for the logs and all the information, but it's not :)

    Cheers,

    Supi
     
  21. travlake

    travlake

    Joined:
    Oct 4, 2019
    Posts:
    50
    For me the problem turned out to be caused by Dropbox, which I had syncing the project folder. Turns out that's a no-no. I probably could have guessed, but also think there should be some warning at some point that Dropbox and Unity are incompatible.
     
  22. fanflash

    fanflash

    Joined:
    Oct 10, 2019
    Posts:
    1
    This problem can actually be solved with a very simple design, that is, when the problem of copying files from a temporary directory to a certain directory fails, give us a button, click to COPY again, and let me run the project after success.

    The problem now is that even if I manually copy the file to the correct location, Unity will not let me run the project.
     
  23. AnonymousTrickster

    AnonymousTrickster

    Joined:
    Jul 21, 2020
    Posts:
    1
    Even I tried same but nothing worked
     
  24. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    This is the same for me and reproducible 100% of the time. The problem is a sharing violation between dropbox and unity. Basically, dropbox is trying to sync the temp file while it's still in use.

    EDIT: This has only been occurring since December 2019, when dropbox updated their sync client software.
     
  25. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
  26. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    Yes, I can mark directories as ignored in dropbox but Unity deletes the temp folder on exit, making it pointless. If Unity just left the directory in place and instead deleted the *contents* of the directory, I wouldn't have had to drop $3000 on a new mac just to get around this problem (this only occurs on windows, not macos).

    I have requested this change before but it was ignored.

    EDIT: I'll go one further and suggest that Unity move the temp directory to the os system directory. There is no reason why a temp directory needs to be in the project folder and it only causes problems with syncing, virus scanning, backups, etc.
     
    Last edited: Dec 14, 2020
    avg-music and codegasm like this.
  27. travlake

    travlake

    Joined:
    Oct 4, 2019
    Posts:
    50
    I just moved the entire project out of dropbox and use normal VC exclusively. Kind of stinks though as I like to have dropbox's continuous backups going as well, but as @JohnnyFactor said ignoring alone didn't cut it in this case. One thing that did work was just manually disabling dropbox sync while working and re-enabling after, but that kind of defeats the continuous backup purpose. Oh well.

    I'm glad this forum post is here though so other people can find it and diagnose their problem. Unity support specifically told me it wasn't Dropbox when I first encountered this, leading to a wild goose chase that eventually proved it was in fact Dropbox lol.
     
  28. LuDiChRiS000

    LuDiChRiS000

    Joined:
    Feb 19, 2018
    Posts:
    9
    I had this same issue, can confirm it is Dropbox related. My solution: Create your Unity project in Dropbox, then use SourceTree or other VC to clone the project to a location outside of Dropbox and work in that. Then you can check in your work to the Dropbox 'master' and it will be backed up safely.
     
    avg-music and travlake like this.
  29. joshcdlaub

    joshcdlaub

    Joined:
    Mar 18, 2021
    Posts:
    1
    This issue still persists into the latest stable release of Unity. I do not use Dropbox, nor any other form of file syncing beyond git via Sourcetree. The amount of development time this chews into, forcing me to restart the project constantly after making changes is slowly driving me up the wall.

    Any information or fixes on this? Didn't experience this in much older versions of Unity, but it sounds like it has been an issue for years.
     
  30. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Your best bet is to log a bug report on this so we can see if it's something we can resolve with you directly or report as something to investigate internally.

    https://unity3d.com/unity/qa/bug-reporting
     
  31. eggsamurai

    eggsamurai

    Joined:
    Oct 10, 2015
    Posts:
    114
    We can't. To me, this is totally random
     
  32. davidwhiffen

    davidwhiffen

    Joined:
    Sep 26, 2019
    Posts:
    14
    My fix was to re-import the package it was talking about.
     
  33. Saucyminator

    Saucyminator

    Joined:
    Nov 23, 2015
    Posts:
    61
    I also re-imported the package that was throwing an error, re-importing it fixed it. Thanks @davidwhiffen