Error when installing NetMQ via nuget to xamarin projects - c#

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?

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:
Port those libraries to the Xamarin frameworks.
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.
Find another library that does support the Xamarin frameworks.

NetMQ now target Xamarin IOS and Android, you can download here:
https://www.nuget.org/packages/NetMQ/4.0.0.3-rc3

Related

Xamarin.Forms error install package

Package installer I get this error, gave this error in other packages
Error Could not install package 'Xamarin.GooglePlayServices.Ads
60.1142.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', 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.
You need to install this package into your Android project, not your Portable Class Library. It is a Android-only library that cannot work cross-platform. As you can see on the project's GitHub page:
Xamarin creates and maintains Xamarin.Android bindings for the Google Play Services Client Library
The library is not a C# library, but it rather contains bindings to native Java-based libraries and hence compatible only with Android.

Adding MS CustomVision SDK to Xamarin PCL project fail

I'm tring to add the Microsoft.Cognitive.CustomVision.Prediction v1.0.0 NuGet package to my Xamarin PCL project, but it throws me this error.
Could not install package 'System.IO.FileSystem 4.3.0'. You are trying
to install this package into a project that targets
'.NETPortable,Version=v4.5,Profile=Profile49', 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.
Have anyone else managed to get this SDK up and running in an PCL (Portable Class Library)?

Xamarin.Forms can't install Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1

Good morning all,
I am following the instructions on the azure site for adding offline sync capability in a Xamarin.Forms application.
I have added the package to the PCL without issue but when trying to add to the iOS client project I am getting the following error:
Could not install package 'Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', 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.
My project is well established in terms of completed code base so I downloaded the getting started app to test from scratch and the same issue remains.
Please help
Jordan Mazurke
Looks lite something is wrong with package 2.1.1.
Install version 2.1.0 instead and it should work!
See also Unable to install Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1 into Xamarin.iOS project with NuGet 2.12

HttpClient missing from .Net portable subset while creating PCL in Xamarin

I have created a Portable class library in Xamarin and want to use it for an android app. I want to use the HttpClient within this PCL. I have added the Microsoft Http Client libraries from the NuGet Package manager. I can now see the .Net portable subset added to my references. But somehow I still cannot use the HttpClient and it does not show in the .Net portable subset as well.
Also, my Current profile of the PCL is 4.0-Profile 158. If I change the profile to 4.5, Xamarin crashes and does not open the solution
Can anyone help me with this?
Thanks
The simple solution is to target .NET 4.5, Windows Store apps (Windows 8.1), Xamarin.iOS, and Xamarin.Android (4.5-Profile7). Then you won't need the HttpClient NuGet package to get those APIs.
If Xamarin is crashing when you try to select a 4.5 profile, please make sure you're using the latest version and then report the bug with details about how to repro it and what happens.
Also the HttpClient NuGet package should allow you to use HttpClient from PCL profile 158. Make sure you're using the latest version of NuGet. ".NET Portable Subset" should always appear in your references for a PCL, that's not related to the NuGet package. When you install the HttpClient NuGet package, you should also see references to System.Net.Http and other assemblies in your references.

.Net Micro with Microsoft Azure

I'm trying to make a Netduino communicate with Azure. I've found several other projects and in their source code they use the package Microsoft.WindowsAzure like any other Azure project. In my project, though, it claims that the package name cannot be resolved.
I found somewhere that I had to go into Manage NuGet Packages and install it, but when I try, it halts the installation at JSON and rolls it all back.
This is the error message I get:
Adding 'Newtonsoft.Json 5.0.8' to Netduino.
Uninstalling 'Newtonsoft.Json 5.0.8'.
Successfully uninstalled 'Newtonsoft.Json 5.0.8'.
Install failed. Rolling back...
Could not install package 'Newtonsoft.Json 5.0.8'.
You are trying to install this package into a project that targets '.NETMicroFramework,Version=v4.2',
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.
What haven't I done? What am I doing wrong?
You can use NETMF.Json if you are running NETMF 4.2 or later
NETMF.Json on GitHub
I use it in my realtime pub/sub client for NetDuino here XSockets NetMF client
AFAIK Newtonsoft.Json is not compatible with .NET Microframework
"Supports .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone and Windows 8" (from http://json.codeplex.com/ )
Infact you get this error:
You are trying to install this package into a project that targets '.NETMicroFramework,Version=v4.2',
but the package does not contain any assembly references or content files that are compatible with that framework.

Categories