0

我在我的解决方案中使用了 HttpClient。该解决方案针对 .NET 4.0,因为 WinXP 客户无法安装 .NET 4.5。在我签入我的更改后,TFS 报告未找到 System.Net.dll。我发现了问题所在 - dll 仅适用于 .NET 4.5。否则,您应该为 HttpClient 使用 Nuget 包。后者依赖于 Microsoft.Bcl.Async 包。我无法使用我的 NuGet 包管理器(最新版本 2.6)安装它:

PM> Install-Package Microsoft.Net.Http
Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.1.3)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.4)'.
Installing 'Microsoft.Bcl.Build 1.0.8'.
You are downloading Microsoft.Bcl.Build from Microsoft, the license agreement to which 
is available at http://go.microsoft.com/fwlink/?LinkID=296407. 
Check the package for additional dependencies, which may come with their own 
license agreement(s). Your use of the package and dependencies constitutes your 
acceptance of their license agreements. If you do not accept the license agreement(s),
then delete the relevant components from your device:

Install failed. Rolling back...
Install-Package : This BackgroundWorker is currently busy and cannot run multiple 
tasks      concurrently.
At line:1 char:16
+ Install-Package <<<<  Microsoft.Net.Http
    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

什么会导致这些问题?我如何安装软件包?

  • VS2012 更新 3
  • NuGet 2.6.40627.9000
  • 解决方案目标:.NET 4.0

更新 已经卸载了一些VS扩展,尤其是:

关闭所有与 TFS 相关的工具窗口,然后重新启动 VS,它就可以工作了。

但是,我会更多地了解错误消息的含义和原因。

4

0 回答 0