Philippe Leybaert
Philippe Leybaert

Reputation: 171774

Visual Studio fails to add a Profile151 PCL to Xamarin project

I'm trying to add a Profile151 PCL nuget package to a Xamarin iOS and Android project in Visual Studio 2015 (Update 3) and it tells me that the package is not compatible. The package has the library folder "portable-net451-win81-wpa81" (which is the "official" recommendation for Profile151 PCL)

This is the error message: "Could not install package 'velox.core 1.0.2.8'. 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."

The strange thing is that I can add the same nuget package to the project using Xamarin Studio.

What's the reason for this? Is there a workaround?

Upvotes: 0

Views: 165

Answers (1)

Jon Douglas
Jon Douglas

Reputation: 13176

It looks like this is a failure on the NuGet Client side of things with regards to VS 2015. Ideally Profile151 should be marked as compatible with Xamarin.iOS, however it is not. This is because the hard coded list in NuGet v3 does not list Profile151:

https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Frameworks/DefaultPortableFrameworkMappings.cs#L112

I have thus reported an issue on the NuGet.Client github:

https://github.com/NuGet/Home/issues/3268

Upvotes: 2

Related Questions