0
votes

I have PCL with ".NET 4 and higher, Silverlight 4 and higher, Windows Phone 7 and higher, Windows Store apps (Windows 8)" (from project->properties window).

I have Microsoft.Bcl version 1.1.3 installed. When I want to update the reference to 1.1.6 I see following.

Install-Package : Could not install package 'Microsoft.Bcl 1.1.6'. You are trying to install this package into a project that targets 'portable-net40+sl40+wp+win', 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.

Looking at packages folder I see following:

./Microsoft.Bcl.1.1.3/lib/portable-net40+sl4+win8+wp71

./Microsoft.Bcl.1.1.6/lib/portable-net40+sl4+win8+wp71

Now the questions:

  1. What is the difference between sl40 and sl4 profile, win8 and win profile and wp and wp71 profile?
  2. How can I update Microsoft.Bcl 1.1.6 in my project?
1

1 Answers

3
votes

Microsoft.Bcl is targeting a later version of Windows Phone than your PCL project which is why it is failing to install.

Framework differences

sl40 and sl4 - same framework

win8 and win - same framework. win means win version 0.0 but NuGet maps this to win8

wp and wp71 - different frameworks. wp means wp version 0.0 but it is equivalent to wp7 by the way NuGet maps the frameworks.

Updating to Microsoft.Bcl 1.1.6

To install Microsoft.Bcl you will need to update your PCL project so it targets wp71 or above. So you can choose to target Windows Phone 7.5 or later or Windows Phone 8 or later.

If you choose Windows Phone 7.5 or later that seems to map to wp71 in Nuget.