Search code examples
c#visual-studioxamarinnugetnetmq

Error when installing NetMQ via nuget to xamarin projects


I tried to install NetMQ to my xamarin application.

Because NetMQ depends on AsyncIO, this package could not be installed and show me the following error:

Could not install package 'AsyncIO 0.1.18'. You are trying to install this 
package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111',
 but the package does not contain any assembly references or content files 
that are compatible with that framework. For more information, contact the package author.

How can I reesolve this issue?


Solution

  • The AsyncIO 0.1.18 NuGet package and the NetMQ 3.3.3.1 NuGet package only contain assemblies for .NET 4.0 and .NET 3.5 so you cannot install it into a portable class library project nor a Xamarin project.

    Your options include:

    1. Port those libraries to the Xamarin frameworks.
    2. Only use these libraries on the server side. Your Xamarin project then connects to your server using a supported way, such sending json messages over http.
    3. Find another library that does support the Xamarin frameworks.