2013-08-28 77 views
3

尝试在Windows Phone 8项目中安装Microsoft.Net.Http时。我得到这个错误:无法通过Nuget安装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

任何有什么建议吗?

回答

0

问题是Nuget;在msdn上有人回答此更新并再试一次后。它在那之后工作。

+0

我正在使用Visual Studio 2013更新1版本12.0.30110与nuget包管理器版本2.7.41101.317。推广经理说我是最新的。仍然无法通过nuget安装。我试了3次。请注意,我的目标项目是针对netframework40。 – JDennis

+1

使用最新版本的Visual Studio 2012和最新的nuget软件包管理器确实可以安装Microsoft.Net.Http。 VS2013和VS2012之间的区别是在VS2012中,我得到了适当的提示,查看了VS2013从未做过的package.config和app.config文件。我相信这可能是VS2013失败的原因。 – JDennis