【发布时间】:2018-09-05 07:39:10
【问题描述】:
我们最近升级到 TFS 2017,我正在尝试将我们现有的构建从基于 XAML 的构建转换到新的构建系统。这一切都在公司防火墙之后。
我的测试项目 (dotNet Core) 因错误而失败...
Assets file '<snip>project.assets.json' not found. Run a NuGet package restore to generate this file.
...所以我在构建中添加了一个 Nuget 还原步骤。这导致构建日志中出现以下错误...
<snip>
Starting: NuGet restore
**************************************************************************
==========================================================================
Task : NuGet Restore
Description : Restores NuGet packages in preparation for a Visual Studio
Build step.
Version : 1.0.1
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?
LinkID=613747)
==========================================================================
C:\Windows\system32\chcp.com 65001
Active code page: 65001
...在这里等待 30 秒...
connect ETIMEDOUT 117.18.232.200:443
**************************************************************************
Finishing: NuGet restore
<snip>
但是,与 Fiddler 和网络人员核实后,在显示的时间点等待大约 30 秒时,盒子中没有(相关的)网络活动。
显然,Nuget 还原步骤正在尝试访问 Internet,但由于它无法访问代理(我们在最初设置构建服务器时遇到了类似的问题)而不是它被阻止,这将显示在网络日志。
如果我远程到构建服务器并使用与构建服务相同的凭据登录,我可以成功地使用 VS 在盒子上构建测试项目,但显然是使用 IDE 配置文件来访问代理。我已经在 devenv.exe.config 和 %appdata%\NuGet\NuGet.Config 中配置了代理。
谁能建议我可以在哪里设置它,以便 Nuget 还原步骤可以找到并使用它?
【问题讨论】:
标签: tfs continuous-integration nuget