Fixed error installing Microsoft.Bcl onto Xamarin portable project

Installing Microsoft.Bcl and Microsoft.Net.Http using the Nuget package manager onto a Xamarin project, sometimes causes the below error...

System.InvalidOperationException: Could not install package 'Microsoft.Bcl.Build 1.0.14'. 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.
   at NuGet.PackageManagement.NuGetPackageManager.d__d2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.d__1b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGet.PackageManagement.UI.UIActionEngine.d__0.MoveNext()

I've found that installing the latest version of Microsoft.Bcl.Build and then installing Microsoft.Bcl solved the issues mentioned above. This also allows you to then install Microsoft.Net.Http without any issues on all platforms within a Xamarin Portable Solution.


Published at

Tags: Xamarin,iOS,Android,Windows Phone

Luke Alderton

Comments

Henrik Smedshammer Amundsen
Thank you, that was a lifesaver!
04/08/2016
Thanks! Really helped me!
Thanks! Really helped me!
09/11/2016
Daniela
Thank you SO much!
23/12/2016
Post a comment
Sit tight...
We're adding your comment.
Thank you.
Your comment has been added.
There's been a problem.
Please try again later.
Share with
Tags
Latest Comments
By Helenpaups on MVC forms in Umbraco
23 May 2018, 16:48 PM
By Helenpaups on MVC forms in Umbraco
23 May 2018, 13:46 PM
By AkikoTax on MVC forms in Umbraco
20 May 2018, 06:41 AM
By Klaus on MVC forms in Umbraco
17 May 2018, 10:47 AM
By Archie on MVC forms in Umbraco
16 May 2018, 18:52 PM
By w on JQuery Unobtrusive Validation for dynamically created elements
11 May 2018, 02:00 AM
By Luke on Umbraco using Global.asax to handle events before the Request Handler.
27 Apr 2018, 18:28 PM
By Janine Gardiola on Umbraco using Global.asax to handle events before the Request Handler.
26 Apr 2018, 11:18 AM
Categories
App Development
Event
Game Development
Mapping
Modelling
Programming
Review
Robotics
Tutorial
Web Development