【发布时间】:2018-06-09 05:39:58
【问题描述】:
我有一个 WinForms/WPF 应用程序,我正在尝试使用 .NET 桌面构建模板。 因为目前我不想在 TFS 服务器机器上安装 Visual Studio,所以我试图让它在没有它的情况下工作。 我已经安装并配置了执行 config 命令的构建代理(vsts-agent-win7-x64-2.122.1 版本,我猜是最后一个)。 我还编辑了构建模板,禁用了 VS 任务,如您在屏幕截图中所见。
我在文件夹下有几个版本(3.3、3.5、4.0)的 NuGet.exe: C:\agent_work_tasks\NuGetToolInstaller_2c65196a-54fd-4a02-9be8-d9d1837b7c5d\0.1.3\node_modules\nuget-task-common\NuGet
我在公司防火墙+代理下,带有自动配置脚本。
在 Visual Studio 2017 中,我设置了 PackageReference 格式,以防万一……
一点更新:第一次一切都很顺利。 所有其他构建都失败了:/ 我启用了调试模式,这是日志:
2018-01-08T09:12:43.1617923Z ##[debug]Evaluating condition for step: 'Use NuGet 4.3.0'
2018-01-08T09:12:43.1617923Z ##[debug]Evaluating: succeeded()
2018-01-08T09:12:43.1617923Z ##[debug]Evaluating succeeded:
2018-01-08T09:12:43.1617923Z ##[debug]=> (Boolean) True
2018-01-08T09:12:43.1617923Z ##[debug]Expanded: True
2018-01-08T09:12:43.1617923Z ##[debug]Result: True
2018-01-08T09:12:43.1617923Z ##[section]Starting: Use NuGet 4.3.0
2018-01-08T09:12:43.1930405Z ==============================================================================
2018-01-08T09:12:43.1930405Z Task : NuGet Tool Installer
2018-01-08T09:12:43.1930405Z Description : Acquires a specific version of NuGet from the internet or the tools cache and adds it to the PATH. Use this step to change the version of NuGet used in the NuGet steps.
2018-01-08T09:12:43.1930405Z Version : 0.1.3
2018-01-08T09:12:43.1930405Z Author : Microsoft Corporation
2018-01-08T09:12:43.1930405Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=852538)
2018-01-08T09:12:43.1930405Z ==============================================================================
2018-01-08T09:12:43.6305452Z ##[debug]agent.workFolder=C:\agent\_work
2018-01-08T09:12:43.6305452Z ##[debug]loading inputs and endpoints
2018-01-08T09:12:43.6305452Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2018-01-08T09:12:43.6305452Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2018-01-08T09:12:43.6305452Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2018-01-08T09:12:43.6305452Z ##[debug]loading INPUT_CHECKLATEST
2018-01-08T09:12:43.6305452Z ##[debug]loading INPUT_VERSIONSPEC
2018-01-08T09:12:43.6305452Z ##[debug]loaded 5
2018-01-08T09:12:43.7086709Z ##[debug]check path : C:\agent\_work\_tasks\NuGetToolInstaller_2c65196a-54fd-4a02-9be8-d9d1837b7c5d\0.1.3\task.json
2018-01-08T09:12:43.7086709Z ##[debug]set resource file to: C:\agent\_work\_tasks\NuGetToolInstaller_2c65196a-54fd-4a02-9be8-d9d1837b7c5d\0.1.3\task.json
2018-01-08T09:12:43.7086709Z ##[debug]system.culture=en-US
2018-01-08T09:12:43.7242974Z ##[debug]versionSpec=4.3.0
2018-01-08T09:12:43.7242974Z ##[debug]checkLatest=false
2018-01-08T09:12:43.7242974Z ##[debug]isExplicit: 4.3.0
2018-01-08T09:12:43.7242974Z ##[debug]explicit? true
2018-01-08T09:12:43.7242974Z ##[debug]Exact match expected on version: 4.3.0
2018-01-08T09:12:43.7242974Z ##[debug]Trying to get tool from local cache
2018-01-08T09:12:43.7242974Z ##[debug]isExplicit: 4.3.0
2018-01-08T09:12:43.7242974Z ##[debug]explicit? true
2018-01-08T09:12:43.7242974Z ##[debug]Agent.Version=2.122.1
2018-01-08T09:12:43.7242974Z ##[debug]Agent.ToolsDirectory=C:\agent\_work\_tool
2018-01-08T09:12:43.7242974Z ##[debug]checking cache: C:\agent\_work\_tool\NuGet\4.3.0\x64
2018-01-08T09:12:43.7242974Z ##[debug]not found
2018-01-08T09:12:43.7242974Z ##[debug]Agent.Version=2.122.1
2018-01-08T09:12:43.7242974Z ##[debug]Agent.ToolsDirectory=C:\agent\_work\_tool
2018-01-08T09:12:43.7242974Z ##[debug]isExplicit: 4.0.0
2018-01-08T09:12:43.7242974Z ##[debug]explicit? true
2018-01-08T09:12:43.7242974Z ##[debug]isExplicit: 4.3.0
2018-01-08T09:12:43.7242974Z ##[debug]explicit? true
2018-01-08T09:12:43.7242974Z ##[debug]evaluating 1 versions
2018-01-08T09:12:43.7399207Z ##[debug]match not found
2018-01-08T09:12:43.7399207Z ##[debug]Querying versions list
2018-01-08T09:13:04.7988484Z ERR:connect ETIMEDOUT 93.184.221.200:443
2018-01-08T09:13:04.7988484Z ##[debug]task result: Failed
2018-01-08T09:13:04.7988484Z ##[debug]Processed: ##vso[task.complete result=Failed;]
2018-01-08T09:13:04.8144544Z ##[section]Finishing: Use NuGet 4.3.0
奇怪的是它找不到应该找到 Nuget 4.3.0 (C:\agent_work_tool\NuGet\4.3.0\x64) 的缓存文件夹,即使我手动创建它并放入 exe进去。 还有其他想法吗?
【问题讨论】: