Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

"Copying dll file: access denied" while importing a package

Discussion in 'Editor & General Support' started by mentor93, Mar 18, 2022.

  1. mentor93

    mentor93

    Joined:
    Mar 6, 2015
    Posts:
    7
    I'm using a plugin in my project and today I got a unity package with an updated version of it. While trying to import that package, I get an error which says: "Copying [path to file and file name here]: access denied". The file which is throwing that error is a .dll and from what I saw in Sysinternals Process Explorer this .dll is being used by Unity hence I cannot overwrite it.

    I tried searching for a solution on the Internet, but I couldn't really find anything that would work. I also tried creating a new project, importing package there and then just copying and pasting files into my target project directly in windows explorer, but that actually just broke my project.

    How do I fix this error and how can I import package in this situation?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,947
    Perhaps this is over-aggressive antivirus blocking the DLL?
     
  3. mentor93

    mentor93

    Joined:
    Mar 6, 2015
    Posts:
    7
    Probably not. I turned antivirus off and I still cannot import that package.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,947
    This should work but obviously if you do this, you need to remove the package reference, otherwise the package would be in the project twice.

    Another thing to try is blowing away the package cache:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122