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

Unity throws errors when importing NetMQ.dl

Discussion in 'Editor & General Support' started by fsycdt, Dec 28, 2020.

  1. fsycdt

    fsycdt

    Joined:
    Sep 15, 2020
    Posts:
    7
    I downloaded NetMQ Package from Nuget website and copy pasted NetMQ.dll to assets/Plugins. But I get the following four errors when the DLL file is imported:

    Error: Could not load signature of NetMQ.GroupSocketExtensions:SendAsync due to: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. assembly:System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type:<unknown type> member: (null) signature:<none>

    Assembly 'Assets/Plugins/NetMQ.dll' will not be loaded due to errors:
    Unable to resolve reference 'System.Memory'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.
    Unable to resolve reference 'System.Threading.Tasks.Extensions'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.
    Unable to resolve reference 'AsyncIO'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.
    Unable to resolve reference 'NaCl'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.

    Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors:
    Reference has errors 'NetMQ'.

    and the last error is the same as the second one.

    I have tried the dll for different configurations (netstandard2.0 net45 etc.) but same errors. I have tried re-installing visual studio but no help. I have tried with Unity 2020.1.17f1 and 2019.1.17f1. NetMQ version is 4.0.1.6. I have also tried installing it through NugetForUnity but it's the same.
     
  2. fsycdt

    fsycdt

    Joined:
    Sep 15, 2020
    Posts:
    7
    Probably a hasty question to begin with :) but I'll answer it anyways. So all the files that the errors suggest as missing are just assemblies (a .dll file is one kind of an assembly file). just download every assembly from Nuget website and import them into unity as you did with NetMQ.dll or any other .dll that gives similar errors, and all the errors should go away. it might not be important but I made sure the specification for all of the assemblies is the same (I chose netstandard2.0).
     
  3. fsycdt

    fsycdt

    Joined:
    Sep 15, 2020
    Posts:
    7
    Also If you are thinking "but the supposedly missing assemblies are already present under the references section in visual studio", which was true in my case, but I guess you just have to download their .dll files directly and drag them to Unity.