当我在Jenkins中构建.NET解决方案并尝试在实际的MSBuild步骤之前还原NuGet软件包时,出现此错误:
C:\Program Files\dotnet\sdk\2.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198,5): error : Package JetBrains.Annotations, version 11.1.0 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [PATHLENGHT = 86]
我正在使用MSBuild 15和NuGet Windows x86命令行nuget.exe v4.7.0
有什么想法吗?
欢呼
答案 0 :(得分:1)
由于这是一个.Net标准项目,因此我需要添加此命令以使其成功构建:
/ t:还原