Nuget Restore不能通过Jenkins工作

时间:2016-11-11 00:07:39

标签: jenkins xamarin nuget

我正在构建一个用于构建Xamarin应用程序项目的Jenkins环境。 我想通过powershell执行命令在作业开始时进行nuget恢复,但是nuget无法找到引用的包。它会抛出错误,如:

WARNING: Unable to find version '2.9.0' of package 'ReactiveProperty'.
WARNING: Unable to find version '1.0.2' of package 'PCLStorage'.
WARNUNG: Unable to find version '2.3.0-beta2' of package 'Rx-Interfaces'.
...

当我在powershell中使用我的windows(admin)用户进行nuget恢复时,它可以正常工作并将所有引用的包复制到项目中。

我觉得这与权限有关......

操作系统是Windows 10,詹金斯版本是2.19.1

以下是完整的Jenkins日志:

Gestartet durch Benutzer xxx
[EnvInject] - Loading node environment variables.
Baue in Arbeitsbereich e:\jenkins_workspace\xxx
Updating xxx at revision '2016-11-11T11:24:47.469 +0100'
At revision 36612

No changes for xxx since the previous build
[xxx] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "&'C:\Windows\TEMP\hudson7328741479356255129.ps1'"
Restoring NuGet package PCLStorage.1.0.2.
Restoring NuGet package ReactiveProperty.2.9.0.
WARNUNG: Unable to find version '1.0.2' of package 'PCLStorage'.
WARNUNG: Unable to find version '2.9.0' of package 'ReactiveProperty'.
Restoring NuGet package Rx-Core.2.3.0-beta2.
Restoring NuGet package Rx-Interfaces.2.3.0-beta2.
WARNUNG: Unable to find version '2.3.0-beta2' of package 'Rx-Core'.
WARNUNG: Unable to find version '2.3.0-beta2' of package 'Rx-Interfaces'.
Restoring NuGet package Rx-Linq.2.3.0-beta2.
Restoring NuGet package Rx-Main.2.3.0-beta2.
WARNUNG: Unable to find version '2.3.0-beta2' of package 'Rx-Main'.
WARNUNG: Unable to find version '2.3.0-beta2' of package 'Rx-Linq'.
Restoring NuGet package Rx-PlatformServices.2.3.0-beta2.
Restoring NuGet package Serilog.1.5.7.
WARNUNG: Unable to find version '2.3.0-beta2' of package 'Rx-PlatformServices'.
...
...
...
Eine Ausnahme vom Typ "NuGet.CommandLineException" wurde ausgel”st.
Build step 'Windows PowerShell' marked build as failure
Finished: FAILURE

0 个答案:

没有答案