2013-08-28 105 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