Question

Is there possible way to use portable versions of RestSharp in PCL shared between Xamarin.Android and Xamarin.Ios?? I have next error when installing RestSharp.Portable library in project:

Install-Package : Could not install package 'FubarCoder.RestSharp.Portable 1.5.0.1'. You are trying to install this package into a project that targets 'portable-win+net45+sl40+wp71+MonoAndroid16+MonoTouch40', 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.

Was it helpful?

Solution

First of all: Make sure you have the latest version of NuGet installed.

Second of all: Your portable library is targeting Silverlight 4 and Windows Phone 7.5. The portable RestSharp package you are trying to install only supports Silverlight 5 or higher and Windows Phone 8. So you need to retarget your portable library to target SL5 instead of SL4 and WP8 instead of WP7.5.

Third of all: It looks like you modified the PCL profiles to add Xamarin support. This was the way to do it before Xamarin added official PCL support. Now that they have, you should delete any XML files you added to the PCL profiles and just use the ones Xamarin installs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top