Search Unity

Problem with System.Runtime.CompilerServices.Unsafe.dll Unity 2018.3.3f1 or later

Discussion in 'Editor & General Support' started by AntonBaranov, Feb 8, 2019.

  1. AntonBaranov


    Mar 7, 2015
    Hello, guys! I spent more than week for this problem but it wasn't solved.

    I was developing my project used Unity-2018.2.11f1 and added (to Plugins folder) different libraries (for using SignalR) like:
    • Microsoft.AspNetCore.Connections.Abstractions,
    • Microsoft.AspNetCore.Http.Connections.Client,
    • System.Runtime.CompilerServices.Unsafe,
    • etc.
    Everything worked fine.

    I upgrated Unity to 2018.3.3f1 and later to 2018.3.4f1. Something happed. Firstly I got the errors that in project there are two libraries: System.Runtime.CompilerServices.Unsafe.dll. The same library automatically appeared in folder: \Library\PackageCache\com.unity.collections@0.0.9-preview.10. Actually, I noticed that folder structure was changed, and now some new folders are created in Library folder (for example, PackageCach).

    Temporary solution. I can delete the dll duplicate in \Library\PackageCache\com.unity.collections@0.0.9-preview.10 folder, but it isn't good solution, because if I rebuild project, this dll duplicate will be created again.

    If I delete my version of library in Plugins folder, project doesn't see another library and SignalR doesn't work. Error:
    "FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

    Hope on your help :)
    Last edited: Feb 8, 2019
    futurlab_peterh likes this.