在持续交付中将 nuget 包恢复到 运行

getting nuget package restore to run in go continuous delivery

我们有一个 mvc5 应用程序的解决方案,我正在尝试使用 thoughtworks 去持续交付系统来检查、编译和使用 webdeploy 来发布网站。

目前我有一个 msbuild 任务来完成所有这些,但是 nuget 包恢复部分失败了。

我不想将实际的包提交给我们的源代码管理,我希望 nuget 完成它的工作并去做它。

go中的错误日志显示如下:

C:\Program Files (x86)\Go Agent\pipelines\Target-Web.nuget\NuGet.targets(100,9): error MSB3073: The command ""...nuget\NuGet.exe" install "C:\Program Files (x86)\Go Agent\pipelines\Target-Web\MyProject.Web\packages.config" -source "" -NonInteractive -RequireConsent -solutionDir "..\ "" exited with code 1. [C:\Program Files (x86)\Go Agent\pipelines\Target-Web\MyProject.Web\MyProject.Web.csproj]

当我以帐户身份登录到 go 服务器和 go 代理时,我可以运行s 运行 按预期从给定位置执行 msbuild 命令。

这是 go 正在尝试的任务 运行

[go] Start to execute task: <exec command="%Windir%\Microsoft.NET\Framework64\v4.0.30319\MsBuild.exe" >
<arg>MyProject\MyProject.csproj</arg>
<arg>/p:DeployOnBuild=true</arg>
<arg>/p:PublishProfile=UAT1</arg>
<arg>/m</arg>
</exec>

我终于想通了,go agent 是 运行ning 一个本地服务,而这个帐户似乎没有相关权限。一旦我将帐户更改为具有更高权限的 运行,问题就解决了。