无法通过Nuget安装Microsoft.Net.Http

本文关键字:Microsoft Net Http 安装 Nuget | 更新日期: 2023-09-27 18:29:18

尝试在Windows Phone 8项目中安装Microsoft.Net.Http时。我得到这个错误:

Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.1.3)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.4)'.
Successfully installed 'Microsoft.Bcl.Build 1.0.10'.
Successfully installed 'Microsoft.Bcl 1.1.3'.
Successfully installed 'Microsoft.Net.Http 2.2.13'.
Successfully added 'Microsoft.Bcl.Build 1.0.10' to WinPhone.Data.
Executing script file 'D:'WinPhone'packages'Microsoft.Bcl.Build.1.0.10'tools'Install.ps1'.
This reference cannot be removed from the project because it is always referenced by the compiler.
This reference cannot be removed from the project because it is always referenced by the compiler.
This reference cannot be removed from the project because it is always referenced by the compiler.
This reference cannot be removed from the project because it is always referenced by the compiler.
Executing script file 'D:'WinPhone'packages'Microsoft.Bcl.Build.1.0.10'tools'Uninstall.ps1'.
Successfully uninstalled 'Microsoft.Bcl 1.1.3'.
Successfully uninstalled 'Microsoft.Bcl.Build 1.0.10'.
Install failed. Rolling back...
Failed to add reference to 'System.IO'

它说它支持Windows Phone 8:https://www.nuget.org/packages/Microsoft.Net.Http/2.2.13

有人有什么建议吗?

无法通过Nuget安装Microsoft.Net.Http

问题是Nuget;在有人在msdn上回答此问题后,请更新并重试。在那之后它起了作用。