问题描述
我有一个无法编译的项目.当我尝试这样做时,我收到以下错误:
I have a project that i cannot compile. When i try to do so I get the following error:
The 'Microsoft.Bcl.Build 1.0.14' package requires NuGet client version '2.8.1' or above, but the current NuGet version is '2.7.41115.310'.
通常这很简单.搜索后我找到了这个指南:http://www.daimto.com/package-requires-nuget-client-version-x/
Normally this would be simple. After searching I found this guide: http://www.daimto.com/package-requires-nuget-client-version-x/
这说明了如何升级我的 Nuget 客户端版本.但是,当我按照这些步骤操作时,我发现我已经在使用最新版本的 Nuget:2.8.5
That explains how I can upgrade my Nuget client version. However, when i follow those steps, I find that I am already using the latest version of Nuget: 2.8.5
然而,出于某种原因,Visual Studio 2013 Ultimate 使用的是旧版本,我不明白为什么.
For some reason however, Visual Studio 2013 Ultimate is using an older version, and I don't understand why.
我的 Visual Studio Ultimate 2013 安装是在卸载 Visual Studio for Web Express 2012 之后全新安装的.以前的版本给我带来了相当多的问题,因此我将其删除并移至 2013.我想知道是否有些cofig 文件已通过,但我不能确定.
My install of Visual Studio Ultimate 2013 is a fresh install, after unninstalling Visual Studio for Web Express 2012. The previous version was giving me a considerable amount of problems and so I deleted it and moved on to 2013. I wonder if some cofig files were passed through, but I cant be sure.
我该如何解决这个问题?
How can I fix this problem?
推荐答案
所以,找了一圈也没找到答案,所以我决定查看项目文件夹.碰巧我在主文件夹中有 NuGet.exe 的主版本,2.8.5,但该项目与该主文件夹相去甚远.
So, after searching around I found no answers, so I decided to look into the project folders. It happens that I have the main version of NuGet.exe, 2.8.5 in main folder, but the project was nowhere near that main folder.
这样,当我下载项目时,它只是使用从 TFS 提取的 NuGet 版本(或者我假设),这就是问题所在 - 该版本是 Nuget.exe 2.7.4.
This way, when I downloaded the project it simply used the NuGet version pulled from TFS (or so I assume), and that was the problem - that verison was Nuget.exe 2.7.4.
在替换Nuget.exe"文件(在项目的/.nuget 文件夹中找到)后,项目最终编译并且一切都重新开始工作.
After replacing the "Nuget.exe" files (found in /.nuget folder of the project) the project finally compiled and everythign started working again.
这篇关于Nuget 版本不正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!