1
votes

I'm creating PCL library to be used at Windows Store 8.0 and Windows Phone 7.5 clients. I created new PCL project and chose the following: https://dl.dropboxusercontent.com/u/19503836/pcl_profile4.png

Selected profile covers .net 4.5 and silverlight 4.0 thus they were enabled automatically. As a result I have Profile4 selected but when I'm trying to add Async nuget package to PCL project: http://www.nuget.org/packages/Microsoft.Bcl.Async

I'm getting an error that this profile is not supported:
Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.0.19)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.4)'.
'Microsoft.Bcl.Build 1.0.10' already installed.
'Microsoft.Bcl 1.0.19' already installed.
'Microsoft.Bcl.Async 1.0.16' already installed.
Adding 'Microsoft.Bcl.Build 1.0.10' to PortableClassLibrary1.
Could not install package 'Microsoft.Bcl.Build 1.0.10'. You are trying to install this package into a project that targets 'portable-win+net45+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.

How to create PCL library and add Async/Await support WITHOUT cheating the *.csproj file (I know I can specify profile there but I need to be able to it via UI for DEMO purposes).

1

1 Answers

2
votes

Your project is targeting Windows Phone 7.0, not 7.1/7.5. Change your target to "Windows Phone 7.5 and higher".

For best results, uninstall all NuGet packages, change your targets, and then re-install your NuGet packages.