【发布时间】:2017-01-13 07:48:04
【问题描述】:
我在 teamcity 有一份使用 MSBuild 的工作:
MSBuild
Build file: build.xml
Targets: Package
我知道可以为整个 teamcity 服务器配置代理设置,但我只想在此作业中配置代理设置。所以只有这个工作可以使用它们。
此作业使用 NuGet 从 Internet 获取包。这需要通过代理。
我在 CMD 中有第一个构建步骤
tools\Nuget\nuget.exe config -set http_proxy=http://xxx:8080 -ConfigFile .nuget\Nuget.config
tools\Nuget\nuget.exe config -set https_proxy=http:xxx:8080 -ConfigFile .nuget\Nuget.config
tools\Nuget\nuget.exe config -set http_proxy.user=xxx -ConfigFile .nuget\Nuget.config
tools\Nuget\nuget.exe config -set https_proxy.user=xxx -ConfigFile .nuget\Nuget.config
tools\Nuget\nuget.exe config -set http_proxy.password=xxx -ConfigFile .nuget\Nuget.config
tools\Nuget\nuget.exe config -set https_proxy.password=xxx -ConfigFile .nuget\Nuget.config
配置写入NuGet.Config。 sln 指向这个配置。但我仍然收到以下错误:
[Exec] EXEC (502) Bad Gateway.
Exec] E:\TeamCity\buildAgent\xx\build.xml(26, 5): error MSB3073: The command "tools\Nuget\nuget.exe restore myprojectname.sln"
【问题讨论】:
标签: .net proxy msbuild nuget teamcity