Error installing Simple.Odata via nuget on a PCL

305 Views Asked by At

I have a PCL targeting .Net 4.5, Silverlight 4+, Windows Phone 7.5+, .Net for windows store apps, Mono Android and MonoTouch

I am attempting to install Simple.OData via nuget and getting the error below. I have tried many different combinations, but nothing seems to be able to pull down the library. My main goal is to develop for Android and Touch using MVVMCross and Odata services.

PM> Install-Package Simple.OData.Client
Installing 'Simple.OData.Client 0.16.0'.
Successfully installed 'Simple.OData.Client 0.16.0'.
Adding 'Simple.OData.Client 0.16.0' to EMC.Mobile.Core.
Uninstalling 'Simple.OData.Client 0.16.0'.
Successfully uninstalled 'Simple.OData.Client 0.16.0'.
Install failed. Rolling back...
Install-Package : Could not install package 'Simple.OData.Client 0.16.0'. You are trying to install this package into a project that targets 
'portable-win+net403+sl40+wp', 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.
At line:1 char:1
+ Install-Package Simple.OData.Client
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
2

There are 2 best solutions below

0
On

Just to want to let you know that there is a new version (0.17) of Simple.OData.Client with changes that affect MonoTouch/MonoDroid.

However, as Stuart and Daniel pointed out, you must select compatible PCL profile. Make sure that your selected profile doesn't select earlier versions of Silverlight and Windows Phone.

Let me know if you need more help with this.

4
On

Looking at https://www.nuget.org/packages/Simple.OData.Client it says the package only supports Windows Phone 8 and higher - so I guess your problem is Windows Phone 7.5 is not supported.