I'm working on android project, for which I'm using xamarin.
So after creating a blank application which has a target version 6.0 Marshmallow, I'm trying to install Xamarin.Android.Support.Compat nuget library, but I'm getting this error
Could not install package 'Xamarin.Android.Support.Compat 24.2.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.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.
I don't know how to solve this issue. I'm new to mobile developing.
Could anyone please help me with this issue. I'm sure I'm not the one with this issue here.
Thanks before hands.
You'll need to install API 24(7.0) and set your Droid TargetFrameworkVersion to Android 7.0 or bigger.
Read the following documentation about android versions.
All the API version , included version 25, are installed and the Target Version is set to Android 7.0, but I'm still getting that error message.
We should always use the same API level as the version for the Support Libraries you reference, for the Xamarin.Android.Support.Compat lib version 24.2.1, it is for API level 24 (Android 7.0). We need to make sure Target Android version as well as the Compile using Android version are all set to Android 7.0 in order to install this package of version 24.2.1 or 25.1.1.
For API level 23(Android 6.0), the package version should be 23.x, but I just failed to find the package of that version.
Restart Your Pc. It fixed for me
even i was doing every thing right while installing support v7 but i was getting the same error as yours so i restarted my pc and tried installing again and it has successfully installed.
Related
I'm new in Xamarin, Xamarin.Forms and C# platform.
I'm starting the development of an app that should support Android and iOS devices. I'm using a PCL project for code sharing. Currently this project is using the profile111 because Visual Studio has selected it by default for me. But when I try to install some NuGet packages I'm getting a message saying the package is not compatible. Something like:
Could not install package 'DocsBrStandard 2.0.1'. 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.
I believe this message is related with the profile I'm using, right?
So which profile should I use for my app that should support only iOS and Android devices? Is profile111 the more appropriate for this scenario?
At least, how can I identify if a package is compatible or not with my Xamarin.Forms app?
Thanks.
You need to target .NET Standard to be able to use the DocsBrStandard package. So you can't work with profile based PCL if you want to use that package.
Check out this article about targeting .NET Standard with Xamarin.Forms:
https://blog.xamarin.com/building-xamarin-forms-apps-net-standard/
Here's my environment:
Visual Studio 2017 15.1, running on Windows 10, which runs in VM on MacOSX.
In VS I installed API23 Android SDK.
On MacOSX: Xamarin Studio 6.3
Both, XS on Mac and VS on Windows have Xamarin.iOS 10.8.0.175
So, as you can see it's not the latest configuration, BUT it's pretty new. It was the latest around April '17. I have to mention that I installed SignalR a year ago.. so it worked. I don't know why I can't install it now. I'm getting this error during installation from nuget:
Error:
Could not install package 'Microsoft.AspNet.SignalR.Client 2.2.0'. 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. 0
EDIT:
Here are targets of my PCL (I'm not sure what the profile is this):
Does that mean I have to add Silverlight 5.0?
I just started to play around with C# application using the .NET framework.
I'm trying to install from Nuget the official neo4j driver package for c# but, despite the fact that from the documentation is stated that it should work with any version of .NET language (here), I got an incompatibility error from one of its dependencies (System.Net.NameResolution 4.0.0)
My application is a Console Application and the target framework is .NET framework 4.5.2.
In particular the error I get is:
Could not install package 'System.Net.NameResolution 4.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.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.
Do you have any idea on how to solve this? I think I'm missing something obvious.
Thanks in advance
Your link states that it works with any .NET language not that it works with any version of the .NET framework. This package appears to be for dotnet core only, so you will need to look into getting started with that.
I have tried adding the Signalr Client library and the WebApi client package to my Xamarin Solution (on Visual Studio with Xamarin Support and also on Xamarin Studio) but I always get this error although I am able to install other PCLs (for example Microsoft.Net.Http):
Could not install package 'Microsoft.AspNet.WebApi.Client 5.2.3'. You are trying to install this package into a project that targets 'portable-net45+sl50+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10', 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 the following error when adding Signalr:
Adding Microsoft.AspNet.SignalR.Client...
Adding 'Microsoft.AspNet.SignalR.Client 2.2.0' to Corda.Client.
Could not install package 'Microsoft.AspNet.SignalR.Client 2.2.0'. You are trying to install this package into a project that targets 'portable-net45+sl50+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10', 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 have also tried changing the the target framework with not success.
This is the build setting for my project:
and this is my C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile\Profile259\SupportedFrameworks folder:
I get the same errors on both Mac OSX and Windows 10. Any ideas?
Using Profile78 solved my problem. Full explaination here.
A simple workaround that worked with my Xamarin with VS:
Download the dll-files manually here: https://components.xamarin.com/gettingstarted/signalr/true
Import the following into your solution.
Microsoft.AspNet.SignalR.Client.dll
Newtonsoft.Json.dll
System.Net.Http.Extensions.dll
System.Net.Http.Primitives.dll
Done!
The problem is not with the dll-files, but with the (nuget) installer.
The problem is with the nuget package manager,specifically with the Windows Phone 8.1 project. I think it expects it to be a windows phone silverlight 8.1 project. There is a bug on installing signalr client on an universal 8.1 phone project in a xamarin project. It should be sorted out in the next xamarin release. Unselecting windows phone 8.1 in the portable config solves the issue,meaning you will have to take the windows phone 8.1 project out of the xamarin project and your need to create a universal windows 10 project.
Yes, As suggested by others this is the problem from nuget package manager, As per this link it should be fixed with the realease of Microsoft.signalr.client 2.2.1 version but for now if you still want to go with nuget, Add the below nuget source
https://www.myget.org/F/aspnetwebstacknightly/
to visual studio and install pre release version 2.2.1 pre-160523-b816 of the signalr client dll as suggested in below link
https://github.com/SignalR/SignalR/issues/3393
All I want is to use the ExifLib.dll in a Windows Phone 7.1 project. I tried to install the package from NuGet and I get a compatibility error:
Could not install package 'ExifLib 1.3.0.0'. You are trying to install this package into a project that targets 'Silverlight,Version=v4.0,Profile=WindowsPhone71', 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 am using Visual Studio 2012. Why is this happening? Is there any compatibility issue, and if it is, how could it be resolved?
Thank you in advance.
ExifLib has just been updated to version 1.4, and it now works with Windows Phone - you'll need to use the new constructor overload which takes a Stream.
The NuGet package has also been updated to contain a Windows Phone compatible DLL.
Common ExifLib isn't compatible with Windows Phone. But you can read this article
and try this library by Tim Heuer.