Microsoft.Rest.ClientRuntime can not be installed in Xamarin PCL Project - c#

I tried to add Microsoft.Rest.ClientRuntime v2.3.10 via Nuget to a standard Xamarin PCL project and got following error:
Could not install package 'Microsoft.Rest.ClientRuntime 2.3.10'. 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.
The targets for the project as as follows:

Solution was just to install version 2.0.0 of Microsoft.Rest.ClientRuntime, which is portable.

Related

Could not install package 'Microsoft.Owin 4.0.0'. Am I not able to install Microsoft.Owin packages into a .NETFramework project?

So I am working with .NETFramework,Version=v4.5 and I need to use Microsoft.Owin.Security.Google as well as Microsoft.Owin.Host.SystemWeb. However I'm getting the following error when trying to install said NuGet packages:
Could not install package 'Microsoft.Owin 4.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework.
Is there another way to use Microsoft.Owin NuGet packages in a .NETFramework project?
Change your Framework version to v4.5.1 or later:

How to create .netstandard nuget package?

I'm trying to create nuget package using my .netstandard 1.2 dll.
I can't install this nuget in UWP project because of error:
Package ZZZ is not compatible with uap10.0.14393
(UAP,Version=v10.0.14393). Package ZZZ 1.0.0 supports: net
(.NETFramework,Version=v0.0)
What and where should be configured to add support for example for UWP?
When I reference my .netstandard dll in UWP project directly, everything works fine.
How are you creating the nuget package?
Try upgrade to the latest nuget.exe and pack with that
Alternativly use the built in packing that is part of dotnet core csproj file and visual studio 2017/msbuild (and dotnet pack) by creating a brand new netstandard project and adding nuget properties in the csproj file
Check the version compatability of UWP and netstandard and consider changing to netstandard 2 and UWP 10.0.16299 as lots of these gremlins have been resolved

Couldn't install package, project targets Framework without assembly references

When I try to install Firebase Messaging Nuget package on the solution it gives me this error -
"Could not install package 'Xamarin.Firebase.Messaging 42.1021.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."
And for the android installation it says
"Could not install package 'Xamarin.Firebase.Messaging 42.1021.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.6,Profile=Profile44', 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 do I get it to install?
The solution is to use the latest stable Xamarin.Forms and have your project's compileSdkVersion (so Target Framework) set to 7.0 or higher. You will then be able to install newer versions of Android Support and therefore Google Play Services packages.
Happy coding!!

How to make a NuGet package for this PCL library

I'm trying to create a nuget package for a PCL library I've made.
This nuget package is intended to be used in a Xamarin Forms application though. So I'm not even sure if the things I've ticked are correct.
I really only care about .NET Framework 4. That is my bare minimum framework. For the rest, I don't care at all and have no idea what I should be targetting.
For what it's worth, I'm using NuGet Package Explorer to create my NuGet nupkg files to manually test them before I publish them to NuGet.
Here's a screenshot of what I was trying, but Xamarin Studio failed to add the nuget package (saying it wasn't the right something-or-rather).
and the error message from Xam Studio:
Adding Foo...
Adding 'Foo 1.3.0' to Core.
Could not install package 'Foo 1.3.0'. You are trying to install this package into a project that targets 'portable-net45+win+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10', 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.
For Xamarin.Forms the two profiles that are good ones for your Portable Class Library (PCL) project to use are Profile 78 or Profile 259. Xamarin.Forms can be used in other profiles but if your PCL project targets one of these you should be OK. Your project looks to be targeting Profile 78.
Here are the Xamarin.Forms PCL profiles for reference.
Xamarin.Forms 1.3:
portable-win+net45+wp80+MonoAndroid10+MonoTouch10
Xamarin.Forms 1.4:
portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10
The problem with your NuGet package that it does not indicate that it supports Windows 8 in the PCL. NuGet will look at all the individual frameworks that make up the project's PCL profile (ignoring the Xamarin and Mono ones since they are optional if you do not have them in your NuGet package's PCL profile) and ensure that the NuGet package's PCL profile has a framework which is compatible. If the NuGet PCL does not have a matching framework then NuGet considers it incompatible.
So your NuGet package's portable library folder would need to include win
portable-net4+sl5+wp8+win
Then you can install your NuGet package into your Profile 78 PCL project.

NuGet: Could not install package VVVV.EmguCV 2.4.2.1

I'm using Visual Studio 2013. I create a new project Windows Form Application (C#), with target framework in tab Application in Properties of the my project: .NET Framework 3.5.
When I open NuGet and search EmguCV and click install show this error:
Installing 'VVVV.EmguCV 2.4.2.1'.
Successfully installed 'VVVV.EmguCV 2.4.2.1'.
Adding 'VVVV.EmguCV 2.4.2.1' to RadarOCR.Desktop.
Uninstalling 'VVVV.EmguCV 2.4.2.1'.
Successfully uninstalled 'VVVV.EmguCV 2.4.2.1'.
Install failed. Rolling back...
Could not install package 'VVVV.EmguCV 2.4.2.1'. You are trying to install this package
into a project that targets '.NETFramework,Version=v3.5', 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.
I do not know what's wrong! Help-me please!
The error message tells you what the problem is:
You are trying to install this package
into a project that targets '.NETFramework,Version=v3.5', but the package does not contain
any assembly references or content files that are compatible with that framework.
The VVVV.EmguCV NuGet package does not support being installed into a project that targets .NET 3.5.
Looking inside the VVVV.EmguCV NuGet package it has custom MSBuild target files for .NET 4.0 and no other .NET framework version. So if you want to install it you would need to change your project so it targets .NET 4.0 or higher.

Categories

Resources