9

I am making a multi-platform app in VS 2013 (iOS, WinPhone and Android). I want to add into the iOS reference folder a Nuget Packages named Microsoft Http Clients Libraries and I cannot do it because I get the following error:

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.

Can anybody help me with that?

Quality Catalyst
  • 6,531
  • 8
  • 38
  • 62
Alejandro Castán
  • 289
  • 2
  • 4
  • 11

6 Answers6

25

I faced the same problem and apparently the Bcl.Build 1.0.14 can not be installed, but you probably you don't need that old version.

I faced this issue when I tried adding WindowsAzure.MobileService to the iOS Xamarin project. And it failed, because the minimal supported Bcl.Build is required to be 1.0.14, but if you have a newer version, which installs quite fine, you will be able to add other packages that depend on it.

So 1. Install Microsoft.Bcl.Build package separately (the latest) 2. Install your package that depends on it.

Ivan Kirkorau
  • 635
  • 6
  • 11
5

Go to -> Solution -> Manage Packages For Solution -> In the tab "Browse" -> Select the two options follow below:

First:

Install package "Microsoft.Bcl.Build" your version more latest 1.0.21

Second:

After this step, now install package "Microsoft.Net.Http" your version mor latest 2.2.29

Result: For me was solved!

1

Microsoft.Bcl.Build 1.0.14 can be installed into Xamarin.iOS projects.

It may fail if:

  1. Your NuGet Package manager is not up to date.
  2. You do not have the Xamarin Portable Class Library profiles for Xamarin.iOS installed.

If you have the latest Xamarin version installed it is probably the NuGet Package Manager not being up to date. You can update it from Tools - Extensions and Updates - Updates - Visual Studio Gallery.

Matt Ward
  • 47,057
  • 5
  • 93
  • 94
  • Hi Matt, I fideo the problem upgrading the xamarin versión, thanks for Your help anyway Best regards – Alejandro Castán Jan 21 '15 at 17:13
  • I am having this same issue and this does not fix it. It is an existing project from around XF 1.3. All my stuff is fully up to date. I actually have two iOS projects, one works with BCL, the other does not. – Julien May 24 '16 at 18:31
  • @Julien - So with the other project you cannot install Microsoft.Bcl.Build 1.0.14 but one you can? And the one that you cannot fails with an error about being being unable to install into a project that targets Xamarin.iOS,Version=v1.0'? – Matt Ward May 24 '16 at 19:32
1

In Visual Studio 2017 I encountered above error, and I solved the issue by installing Microsoft.Bcl.Build first on the Xamarin.Android, then installed Microsoft.Net.Http and System.Net.Http, but Xamarin.IOS and Xamarin.UWP there were no issues.

1

I found the solution and put it here in case some one may face the same problem. Install "Microsoft.Bcl.Build.1.0.21" first for all your projects. Now you can install "PortableRest", all dependency that depends on Microsoft.Bcl.Build will be installed correctly.

Kokul Jose
  • 1,384
  • 2
  • 14
  • 26
0

I was trying to install Microsoft.Net.Http in my Xamarin.Forms project when i faced this issue. Here is what you must try to get rid of this error:

1- Update Xamarin.Forms to latest version in each project of solution.

2- As my primary intention was to install Microsoft.Net.Http, and this package had dependencies on Microsoft.BCL and Microsoft.BCL.Build. I tried installing these packages (Microsoft.Bcl and Microsoft.Bcl.Build) individually and it worked for me. First install latest version of Microsoft.Bcl.Build 1.0.21 (If 1.0.14 did not install, try latest version). Then, install Microsoft.Bcl which should be installed successfully and this solution worked for me and I hope would work for you too. After installing these packages indivisually, I was able to install Microsoft.Net.Http successfully.

NOTE: While installing Packages (Microsoft.Bcl and Microsoft.Bcl.Build) into your projects, check which version you are installing. Try installing another version, if one does not work and let me know If problem does not solve.

Have a great day :)

Ali Raza
  • 374
  • 2
  • 6
  • 21
  • yes, this worked for me too. Just don't get why if these are dependencies of Miocrosoft.Net.Http it doesn't just install them. – Donna Aug 26 '17 at 02:06