我正在设置 Jenkins CI 服务器。我成功地执行了第一步:
nuget restore -NonInteractive -ConfigFile Nuget.config -Verbosity Detailed -NoCache
这个可以正常工作,但是当我想用以下方式编译应用程序时:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe
并且 ${WorkSpace}\src\Weather.App.csproj
抛出了这个错误:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(178,5): error : The package HockeySDK.Core with version 4.1.6 could not be found in C:\WINDOWS\system32\config\systemprofile\.nuget\packages\. Run a NuGet package restore to download the package. [C:\Program Files (x86)\Jenkins\workspace\MyApp\Weather\Weather.App.csproj]
奇怪的是,冰球包(Hockey package)明显存在于路径中:
如果我在我的VS2017本地项目中运行相同的命令,一切都会顺利进行。但是Jenkins服务器(与我的计算机相同)不会正确构建它。
有任何想法吗?谢谢