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?
Related
Hello When I create a Xamarin app on Android, I encounter the following errors after creating the application
1-failed linking file resources. 2-attribute layout_behavior (aka
com.companyname.app2:layout_behavior) not found.
After seeing this problem, I saw the used version of Android, which was Android 11, and changed it to version 8.1.
The errors were fixed, but it showed me new errors
Package Xamarin.Google.Android.Material 1.0.0.1 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package Xamarin.Google.Android.Material 1.0.0.1 supports: monoandroid90 (MonoAndroid,Version=v9.0)
Package Xamarin.AndroidX.AppCompat 1.2.0.5 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package Xamarin.AndroidX.AppCompat 1.2.0.5 supports: monoandroid90 (MonoAndroid,Version=v9.0)
Because the program has an error, I can not use nuget
And I guess Visual Studio builds my project with Android 11 libraries.
But I do not know how to change this
Please help me to fix the errors
This problem was not resolved and eventually I had to replace Windows and reinstall Visual Studio
And after reinstalling Visual Studio, I no longer had this problem
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.
Could someone shed some light on how to use the DotNet.Contracts NuGet package in Visual Studio 2015 and 2017? Is it the only component required to use Code Contracts in Visual Studio???
Do I still need to install Contracts.devlab9ts.msi??? When trying to install Contracts.devlab9ts.msi, I got error 'Extensions' is not a valid short file name. This occurs on my Windows 10 dev machine, with latest Windows updates.
If we still need to install Contracts.devlab9ts.msi, what's the purpose of the NuGet package?
You just need to install the DotNet.Contracts NuGet Package in your project, because this package contains all Code Contracts related files.
Please refer to:
https://github.com/Microsoft/CodeContracts/issues/13
The Contracts.devlab9ts.msi could be installed on my Windows 10 build 10240 successful. If you still want to install Contracts.devlab9ts.msi for your Visual Studio, please check your Windows 10 version and make sure your Windows 10 dev has installed all updates.
I am writing xamarin app which will work on windows and OS X (using profile 7)
I am trying to add the nuget system.xml.xpath
However, it gives me the below error-
Adding System.Xml.XPath...
The 'System.Xml.XPath 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.7.0'.
I have two question-
1.
how soon will xamarin start supporting nugget client 3.0 or above?
2.
how can i resolve my specific problem?
On OS-X you can:
sudo nuget update -self
Note: sudo is required as this will update the nuget.exe within the Mono Framework
>nuget
NuGet Version: 3.4.4.1321
There is a nuget3 branch of Xamarin Studio 6.1 but I have not seen when that will go into an public alpha release...
You do not say what development environment you are using. The error message suggest you are using Xamarin Studio, since Visual Studio already supports NuGet 3.
There is a preview branch of Xamarin Studio 6.1 which does support NuGet 3, this is currently available on the alpha channel in Xamarin Studio.
However whilst using Xamarin Studio 6.1 will allow you to do is add the System.Xml.XPath NuGet package to your project you will still not be able to use anything from that NuGet package currently since there are no assemblies in it for the Xamarin frameworks and currently the Xamarin build tools will not add the correct assembly references for you at compile time.
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