简体   繁体   English

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

[英]Unable to Install Microsoft.Net.Http through Nuget

When trying to installing Microsoft.Net.Http in a Windows Phone 8 project. 尝试在Windows Phone 8项目中安装Microsoft.Net.Http时。 I'm getting this error: 我收到这个错误:

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'

It says it's supported for Windows Phone 8 : https://www.nuget.org/packages/Microsoft.Net.Http/2.2.13 它说它支持Windows Phone 8: https//www.nuget.org/packages/Microsoft.Net.Http/2.2.13

Anyone with any suggestions ? 谁有任何建议?

The problem was Nuget; 问题是Nuget; after someone answered this on msdn to update and try again. 有人在msdn上回复此问题后进行更新并再次尝试。 It worked after that. 之后它起作用了。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM