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. Dismiss Notice

DLL could not be opened compiler error slowing down development

Discussion in 'Editor & General Support' started by Creaturtle, May 30, 2021.

  1. Creaturtle

    Creaturtle

    Joined:
    Jan 24, 2018
    Posts:
    33
    I'm having considerable difficulty with the error below:

    Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
    Copyright (C) Microsoft Corporation. All rights reserved.

    error CS0009: Metadata file <some dll, like UnityEngine.UI.dll> could not be opened -- The process cannot access the file <same path> because it is being used by another process.

    I've had this error for a bit now, I don't remember since when. It's relatively frequent, and sometimes commenting out a line and then saving seems to make it go away, sometimes it stays and I need to restart the editor.

    I've tried looking online for it but there doesn't seem to be a published solution, and I can't figure out why this is happening from the error information given.

    So far, I've deleted my project off of my computer and reinstalled it through git, and that got rid of other issues I had (such as something making duplicate transactions or something), but apparently not this one.

    Ideas?
     
    hg001 likes this.
  2. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    752
    I'm having this same issue after updating to Unity 2020.3 from 2019.4. Did you figure anything out for it?
     
  3. Creaturtle

    Creaturtle

    Joined:
    Jan 24, 2018
    Posts:
    33
    Nope. Reported the bug but nothing came out of it
     
  4. hg001

    hg001

    Joined:
    Nov 22, 2017
    Posts:
    1
    This is happening frequently for me as well. It also started happening when moving from 2019.4 to 2020.3. Is there anything we can do to investigate this? My project doesn't even take too long to open but it still slows development down a lot.
     
  5. fangjunzhou02

    fangjunzhou02

    Joined:
    Oct 2, 2018
    Posts:
    5
    I have the same problem. Do you guys have any solution?
     
    hg001 likes this.
  6. ttf001

    ttf001

    Joined:
    Jul 13, 2017
    Posts:
    4
    Same error
     
  7. Creaturtle

    Creaturtle

    Joined:
    Jan 24, 2018
    Posts:
    33
    Maybe we can find out some possible cause based on our projects.
    It seems like it might be dll related - I know that I've played around with the preview libraries, as well as things that directly download dlls into the library such as the SteamVR plugin for the XR Interaction System.

    If it's a lower-level problem within libraries that are doing things unexpectedly, it could be the Animation Rigging, UnityML, or maybe something else I'm forgetting that could cause problems if terminated unexpectedly that uses lower-level resources.

    Anyone else using experimental things that had this issue?
     
  8. ttf001

    ttf001

    Joined:
    Jul 13, 2017
    Posts:
    4
    No, and DLL change each compile
     
  9. temafury

    temafury

    Joined:
    Jan 15, 2018
    Posts:
    2
    At least you have words explaining the problem.
    I got:
    "
    Microsoft (R) Visual C# Compiler version 3.5.0-dev-20359-01 (8da8ba0c)
    Copyright (C) Microsoft Corporation. All rights reserved.

    error CS0009: Metadata file 'D:\Programs\Unity\2020.3.19f1\Editor\Data\Managed\UnityEngine\UnityEditor.CoreModule.dll' could not be opened -- ????????? (CRC). : 'D:\Programs\Unity\2020.3.19f1\Editor\Data\Managed\UnityEngine\UnityEditor.CoreModule.dll'
    "
    Does anyone know how to fix this? I just upgraded from Unity 2020.1 to 2020.3 and decided to try some simple microgame projects to learn Unity.
     

    Attached Files:

  10. sakunix

    sakunix

    Joined:
    Jan 25, 2022
    Posts:
    17
    same problem unity 2021.3.0

    error CS0006: Metadata file '/home/saku/Unity/Hub/Editor/2021.3.0f1/Editor/Data/Managed/UnityEngine/UnityEditor.CoreModule.dll' could not be found