我有这个Azure Notification Hubs Sample
它失败了,因为
The 'Microsoft.ApplicationInsights 0.12.0-build17386' package requires NuGet client version '2.8.50313' or above, but the current NuGet version is '2.8.1.0'. The command "eval nuget restore src/NotificationHubSample.sln" failed. Retrying, 2 of 3.
为什么?
最佳答案
这是 Microsoft.ApplicationInsights NuGet 包的问题。在其 .nuspec 文件中包含以下内容:
<metadata minClientVersion="2.8.50313">
NuGet 将根据其产品版本检查 NuGet 包定义的 minClientVersion,以查看它们是否兼容。
Microsoft.ApplicationInsights NuGet 包中使用的 minClientVersion 似乎使用 NuGet 程序集文件版本,而不是 NuGet 产品版本。因此,NuGet 恢复或安装总是会失败,至少在发布更新版本的 NuGet 之前是这样。最新发布的 NuGet 的产品版本为 2.8.3。
请注意,我忽略了当前有 CTP 版本的 NuGet 3.0。因此,此 NuGet 包可与 NuGet 3.0 配合使用,因此 Microsoft.ApplicationInsights NuGet 包的创建者可能仅使用该版本对其进行了测试。
所以你的选择是:
- 向 Microsoft.ApplicationInsights NuGet 软件包的所有者报告问题并等待他们修复。
- 使用 NuGet.exe 3.0 通过 Travis 运行包恢复。
- 使用没有此 minClientVersion 限制的不同版本的 Microsoft.ApplicationInsights NuGet 包。
关于nuget - 在 nuget 还原包中构建 C# 项目失败 Microsoft.ApplicationInsights,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27901603/