【问题标题】:Unable to Install Microsoft.Net.Http through Nuget无法通过 Nuget 安装 Microsoft.Net.Http
【发布时间】:2013-08-28 16:28:19
【问题描述】:

尝试在 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

有人有什么建议吗?

【问题讨论】:

    标签: c# windows-phone-8


    【解决方案1】:

    问题是 Nuget;在有人在 msdn 上回答此问题后更新并重试。之后就成功了。

    【讨论】:

    • 我正在使用 Visual Studio 2013 更新 1 版本 12.0.30110 和 nuget 包管理器版本 2.7.41101.317。扩展经理说我是最新的。仍然无法通过nuget安装。我试了3次。请注意,我的目标项目是针对 network40。
    • 使用最新版本的 Visual Studio 2012 和最新的 nuget 包管理器确实允许安装 Microsoft.Net.Http。 VS2013 和 VS2012 之间的区别在于 VS2012,我被适当地提示检查 package.config 和 app.config 文件,而 VS2013 从未这样做过。我相信这可能是它在 VS2013 上失败的原因。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-14
    • 1970-01-01
    • 1970-01-01
    • 2019-04-15
    • 2014-02-15
    相关资源
    最近更新 更多