简体   繁体   English

无法安装NuGet包Microsoft.Bcl.Build 1.0.14

[英]Cannot install NuGet package Microsoft.Bcl.Build 1.0.14

I am making a multi-platform app in VS 2013 (iOS, WinPhone and Android). 我在VS 2013(iOS,WinPhone和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: 我想在iOS参考文件夹中添加一个名为Microsoft Http Clients Libraries的Nuget Packages,我不能这样做,因为我收到以下错误:

Could not install package 'Microsoft.Bcl.Build 1.0.14'. 无法安装包'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. 您正在尝试将此软件包安装到以“Xamarin.iOS,Version = v1.0”为目标的项目中,但该软件包不包含与该框架兼容的任何程序集引用或内容文件。 For more information, contact the package author. 有关更多信息,请与软件包作者联系。

Can anybody help me with that? 任何人都可以帮助我吗?

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. 我遇到了同样的问题,显然无法安装Bcl.Build 1.0.14,但你可能不需要那个旧版本。

I faced this issue when I tried adding WindowsAzure.MobileService to the iOS Xamarin project. 当我尝试将WindowsAzure.MobileService添加到iOS Xamarin项目时,我遇到了这个问题。 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. 它失败了,因为支持的最小Bcl.Build需要是1.0.14,但是如果你有一个安装得很好的新版本,你将能够添加其他依赖它的软件包。

So 1. Install Microsoft.Bcl.Build package separately (the latest) 2. Install your package that depends on it. 所以1.单独安装Microsoft.Bcl.Build软件包(最新版)2。安装依赖它的软件包。

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 安装软件包“Microsoft.Bcl.Build”你的版本更新1.0.21

Second: 第二:

After this step, now install package "Microsoft.Net.Http" your version mor latest 2.2.29 在这一步之后,现在安装包“Microsoft.Net.Http”你的版本mor最新2.2.29

Result: For me was solved! 结果:对我来说已经解决了!

Microsoft.Bcl.Build 1.0.14 can be installed into Xamarin.iOS projects. Microsoft.Bcl.Build 1.0.14可以安装到Xamarin.iOS项目中。

It may fail if: 它可能会失败,如果:

  1. Your NuGet Package manager is not up to date. 您的NuGet包管理器不是最新的。
  2. You do not have the Xamarin Portable Class Library profiles for Xamarin.iOS installed. 您没有安装Xamarin.iOS的Xamarin可移植类库配置文件。

If you have the latest Xamarin version installed it is probably the NuGet Package Manager not being up to date. 如果您安装了最新的Xamarin版本,则可能是NuGet Package Manager不是最新版本。 You can update it from Tools - Extensions and Updates - Updates - Visual Studio Gallery. 您可以从工具 - 扩展和更新 - 更新 - Visual Studio库更新它。

在Visual Studio 2017中我遇到了上述错误,我通过首先在Xamarin.Android上安装Microsoft.Bcl.Build解决了这个问题,然后安装了Microsoft.Net.Http和System.Net.Http,但是Xamarin.IOS和Xamarin.UWP没有问题。

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. 首先为所有项目安装“Microsoft.Bcl.Build.1.0.21”。 Now you can install "PortableRest", all dependency that depends on Microsoft.Bcl.Build will be installed correctly. 现在您可以安装“PortableRest”,所有依赖于Microsoft.Bcl.Build的依赖项都将正确安装。

I was trying to install Microsoft.Net.Http in my Xamarin.Forms project when i faced this issue. 当我遇到这个问题时,我试图在我的Xamarin.Forms项目中安装Microsoft.Net.Http Here is what you must try to get rid of this error: 这是你必须尝试摆脱这个错误:

1- Update Xamarin.Forms to latest version in each project of solution. 1-在每个解决方案项目中将Xamarin.Forms更新到最新版本。

2- As my primary intention was to install Microsoft.Net.Http , and this package had dependencies on Microsoft.BCL and Microsoft.BCL.Build . 2-我的主要目的是安装Microsoft.Net.Http ,此软件包依赖于Microsoft.BCLMicrosoft.BCL.Build I tried installing these packages (Microsoft.Bcl and Microsoft.Bcl.Build) individually and it worked for me. 我尝试单独安装这些软件包(Microsoft.Bcl和Microsoft.Bcl.Build) ,它对我有用。 First install latest version of Microsoft.Bcl.Build 1.0.21 ( If 1.0.14 did not install, try latest version). 首先安装最新版本的Microsoft.Bcl.Build 1.0.21如果1.0.14没有安装,请尝试最新版本)。 Then, install Microsoft.Bcl which should be installed successfully and this solution worked for me and I hope would work for you too. 然后,安装应该成功安装的Microsoft.Bcl ,这个解决方案对我有用,我希望也适合你。 After installing these packages indivisually, I was able to install Microsoft.Net.Http successfully. 在单独安装这些软件包之后,我能够成功安装Microsoft.Net.Http

NOTE: While installing Packages ( Microsoft.Bcl and Microsoft.Bcl.Build ) into your projects, check which version you are installing. 注意:在将项目包( Microsoft.Bcl和Microsoft.Bcl.Build )安装到项目中时,请检查要安装的版本。 Try installing another version, if one does not work and let me know If problem does not solve. 尝试安装另一个版本,如果一个不起作用,让我知道如果问题无法解决。

Have a great day :) 祝你有美好的一天 :)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 不使用包恢复,但仍然得到“必须安装nuget包Microsoft.Bcl.Build” - Not using package restore, but still getting “must install nuget package Microsoft.Bcl.Build” 警告:所有引用 MyProject.csproj 的项目都必须安装 nuget 包 Microsoft.Bcl.Build - warning : All projects referencing MyProject.csproj must install nuget package Microsoft.Bcl.Build 引用子项目的所有项目必须安装NuGet包Microsoft.Bcl.Build(C#/ Windows Phone 7)? - All projects referencing sub-project must install NuGet package Microsoft.Bcl.Build (C#/Windows Phone 7)? 在Visual Studio 2017中安装Microsoft.Net.Http时出现Nuget错误Microsoft.Bcl.Build - Nuget Error Microsoft.Bcl.Build while installing Microsoft.Net.Http in Visual studio 2017 如何绕过 Microsoft.Bcl.Build 警告 - How to bypass Microsoft.Bcl.Build warning DevOps CI 管道未能声明 Microsoft.Bcl.Build - DevOps CI pipe is failing claiming Microsoft.Bcl.Build 安装了Microsoft.Bcl的项目仍会发出警告“项目必须安装nuget包Microsoft.Bcl” - Projects with Microsoft.Bcl installed still give warning “Project must install nuget package Microsoft.Bcl” Xamarin.Forms (.Net Standard) 中的 Microsoft.Bcl 和 Microsoft.Bcl.Build 不兼容 - Microsoft.Bcl and Microsoft.Bcl.Build in Xamarin.Forms (.Net Standard) Not compatible VS2017不包含Microsoft.Bcl.Build,但VS2015包含 - VS2017 does not include Microsoft.Bcl.Build, yet VS2015 does 无法安装nuget软件包 - Cannot install the nuget package
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM