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

Unloading broken assembly NSubstitute.dll, this assembly assembly can cause crashes in the runtime

Discussion in 'Editor & General Support' started by Mathijs_Bakker, Jun 11, 2018.

  1. Mathijs_Bakker

    Mathijs_Bakker

    Joined:
    Apr 28, 2014
    Posts:
    25
    Installed NSubstitute.dll in a project. It works as expected in the IDE. But Unity throws an error:



    From the Editor.Log:
    • Unity 2018.1.2f1
    • Runtime Version: .Net 4.x

    Could not find anything on the web...
    Maybe someone e has a clue? It's quite annoying.
     

    Attached Files:

  2. squanderingtime

    squanderingtime

    Joined:
    Jun 12, 2018
    Posts:
    1
    Just ran into this myself. The assembly for NSubstitute declares a dep on System.Threading.Tasks.Extension even if you don't use it. If you got the DLL via nuget then it should have downloaded the dependencies too. Just copy it into the Editor folder along with the NSubstitute DLL. Mine was in
    NSubstitute-3.1.0/System.Threading.Tasks.Extensions.4.3.0/lib/netstandard1.0/System.Threading.Tasks.Extensions.dll

    Resolved the error for me.
     
    Mathijs_Bakker likes this.
  3. Mathijs_Bakker

    Mathijs_Bakker

    Joined:
    Apr 28, 2014
    Posts:
    25
    LOL Yeah!
    I found it out too! As the log file is stating it needs 'System.Threading.Tasks.Extension'.
    I was so #@%&# annoyed with Unity destroying (Nuget) references that my brain was getting over heated and not thinking clear. I never had an issue with installing Nuget packages. Now I am working on an other device/system and... BAM!! Now it's like being pushed back to the dark ages. Specially when you have been living in the future without knowing. I really don't know what was the reason that Unity allowed me to install packages from the IDE and why it did not break the references.

    Thumbs up for your reply! I could not find a solution on the web. So maybe you are helping others with this!
    Cheers!
     
  4. cap_L

    cap_L

    Joined:
    Jul 11, 2018
    Posts:
    3
    Helllo all,
    I am having the same issue. "
    Unloading broken assembly Assets/Tobii/Plugins/x64/BioRadioSDK.dll, this assembly can cause crashes in the runtime".
    I have tried doing everything but nothing works. I added the SDK location inside Assets/ folder within mcs.rsp file. But it still shows this error.
    Would someone explain it to me how to fix this issue ?
    Thank you
     
  5. savely00

    savely00

    Joined:
    Feb 27, 2014
    Posts:
    36
    This video recommends to get an older version.

    Worked for me.