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 9 Feb 2016, 09:17 AM
Tags: Xamarin,iOS,Android,Windows Phone
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