我在解决方案中添加了一个新项目。我已经添加了一些nuget包但是在TFS上构建时失败了。它在本地构建时工作正常。我收到以下错误消息:
C:\Builds\8\Server-Dev-CI\src\.nuget\NuGet.targets (58): The schema version of 'xunit.core' is incompatible with version 2.0.30828.5 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
C:\Builds\8\Server-Dev-CI\src\.nuget\NuGet.targets (58): The schema version of 'xunit.extensibility.execution' is incompatible with version 2.0.30828.5 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.
C:\Builds\8\Server-Dev-CI\src\.nuget\NuGet.targets (58): One or more errors occurred.
C:\Builds\8\Server-Dev-CI\src\.nuget\NuGet.targets (58): The command ""C:\Builds\8\Server-Dev-CI\src\.nuget\nuget.exe" install "C:\Builds\8\Server-Dev-CI\src\Modules\UnitTests.xUnit\packages.config" -source "https://nuget.org/api/v2/" -o "C:\Builds\8\Server-Dev-CI\src\packages"" exited with code 1.
当我在VS2013中打开源代码(在构建服务器上)时,我看到以下内容:
我已经更新了NuGet。它在哪里?#34; NuGet的2.0.30828.5"从???
答案 0 :(得分:0)
我明白了。虽然TFS使用的是Visual Studio的NuGet,但结果是TFS运行:
C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\nuget.exe restore
我必须打开控制台并更新nuget:
nuget.exe update -self