Open sibsutispds opened 4 years ago
Hi,
I've experienced the same issue with version 4.0.5.0 being already loaded by my .NET framework application.
I've resolved it by using binding redirect (see https://stackoverflow.com/questions/62764744/could-not-load-file-or-assembly-system-runtime-compilerservices-unsafe/62770487)
Not sure though if you can use it in your context with Unity3D.
Hope it helps
This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions.
Environment
Expected behaviour
Be able to send and receive messages in Unity3D using NetMQ.
Actual behaviour
First things first, thank you for a wonderful tool! NetMQ is a great and easy to use port of ZeroMQ - it's a lifesaver!
Now, to the issues I'm experiencing.
When I install NetMQ 4.0.1.6 from NuGet and add it into the Unity3D project it asks for a
System.Runtime.CompilerServices.Unsafe 4.0.4.1
dll. Here's the error from Unity3D:After I manually add required
System.Runtime.CompilerServices.Unsafe.dll
dll into the project I get the following error:I believe it's because I already have System.Runtime.CompilerServices.Unsafe.dll as part of the
Unity.Collections
package (which depend on it). When I check, I see thatUnity.Collections
usesSystem.Runtime.CompilerServices.Unsafe 4.0.4.0
. So Unity3D doesn't allow to add several .dll with the same name, could you recommend workaround for my problem? Do you know if I could switch NetMQ dependency toSystem.Runtime.CompilerServices.Unsafe 4.0.4.0
and if yes, how it should be done?Thank you in advance!
Steps to reproduce the behaviour
Install NetMQ 4.0.1.6 in Unity3D 2019. Also install any package in Unity3D dependent on System.Runtime.CompilerServices.Unsafe, e.g. Unity.Collections and try to implement simple RequestSocket/ResponseSocket.