使用 VS2019 和 TFS2018 vnext 构建系统

2024-04-20

有谁知道是否可以将 VS2019 与 TFS2018 vnext 构建系统一起使用。 您无法在生成定义中选择 VS2019,但可以选择“最新”作为 Visual Studio 的版本。 不幸的是,这里没有选择VS2019。

我已经在安装了VS2017和VS2019的虚拟机中对此进行了测试。 我还将TFS2018升级到Azure DevOps Server 2019,解决了问题。 但这对于我们的生产环境来说并不是一个“快速”的解决方案。

这是我的测试日志。正如您所看到的,选择“最新”作为 Visual Studio 的版本会导致错误,根本没有选择任何 VS:

TFS 2018 / VS2017:

2019-04-05T07:38:58.8044647Z ##[debug]Entering Select-VSVersion.
2019-04-05T07:38:58.8080670Z ##[debug] PreferredVersion: '15.0'
2019-04-05T07:38:58.8363094Z ##[debug]Entering Get-VSPath.
2019-04-05T07:38:58.8393121Z ##[debug] Version: '15.0'
2019-04-05T07:38:58.8464182Z ##[debug]Entering Get-VisualStudio_15_0.
2019-04-05T07:38:58.8516552Z ##[debug]Getting latest Visual Studio 15 setup instance.
2019-04-05T07:38:58.8727275Z ##[debug]Entering Invoke-VstsTool.
2019-04-05T07:38:58.8759258Z ##[debug] FileName: 'C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.126.0\ps_modules\MSBuildHelpers\vswhere.exe'
2019-04-05T07:38:58.8790622Z ##[debug] Arguments: '-version [15.0,16.0) -latest -format json'
2019-04-05T07:38:58.8861580Z ##[debug] RequireExitCodeZero: 'True'
2019-04-05T07:38:58.8899897Z ##[command]"C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.126.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,16.0) -latest -format json
2019-04-05T07:38:58.9699602Z ##[debug][
2019-04-05T07:38:58.9775093Z ##[debug]  {
2019-04-05T07:38:58.9805669Z ##[debug]    "instanceId": "716a72e1",
2019-04-05T07:38:58.9836484Z ##[debug]    "installDate": "2018-06-19T06:36:30Z",
2019-04-05T07:38:58.9866720Z ##[debug]    "installationName": "VisualStudio/15.9.11+28307.586",
2019-04-05T07:38:58.9896856Z ##[debug]    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise",
2019-04-05T07:38:58.9925760Z ##[debug]    "installationVersion": "15.9.28307.586",
2019-04-05T07:38:58.9955813Z ##[debug]    "displayName": "Visual Studio Enterprise 2017",
2019-04-05T07:38:58.9984855Z ##[debug]    "description": "Microsoft DevOps solution for productivity and coordination across teams of any size",
2019-04-05T07:38:59.0016503Z ##[debug]    "updateDate": "2019-04-05T05:41:52.3762392Z",
2019-04-05T07:38:59.0046346Z ##[debug]    "enginePath": "C:\\program files (x86)\\microsoft visual studio\\installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
2019-04-05T07:38:59.0076156Z ##[debug]    "channelId": "VisualStudio.15.Release",
2019-04-05T07:38:59.0105757Z ##[debug]    "channelUri": "https://aka.ms/vs/15/release/channel",
2019-04-05T07:38:59.0141128Z ##[debug]    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660692#15.9.11",
2019-04-05T07:38:59.0174229Z ##[debug]    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660708"
2019-04-05T07:38:59.0212954Z ##[debug]  }
2019-04-05T07:38:59.0246814Z ##[debug]]
2019-04-05T07:38:59.0278717Z ##[debug]Exit code: 0
2019-04-05T07:38:59.0330925Z ##[debug]Leaving Invoke-VstsTool.
2019-04-05T07:38:59.0514424Z ##[debug]Leaving Get-VisualStudio_15_0.
2019-04-05T07:38:59.0572938Z ##[debug]Leaving Get-VSPath.
2019-04-05T07:38:59.0606126Z ##[debug]Leaving Select-VSVersion.

TFS2018 / VS 最新:

2019-04-09T05:41:00.8981538Z ##[debug]Entering Select-VSVersion.
2019-04-09T05:41:00.9013462Z ##[debug] PreferredVersion: 'latest'
2019-04-09T05:41:00.9716480Z ##[debug]Entering Get-VSPath.
2019-04-09T05:41:00.9752054Z ##[debug] Version: '15.0'
2019-04-09T05:41:00.9837070Z ##[debug]Entering Get-VisualStudio_15_0.
2019-04-09T05:41:00.9894721Z ##[debug]Getting latest Visual Studio 15 setup instance.
2019-04-09T05:41:01.0055503Z ##[debug]Entering Invoke-VstsTool.
2019-04-09T05:41:01.0093274Z ##[debug] FileName: 'C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.126.0\ps_modules\MSBuildHelpers\vswhere.exe'
2019-04-09T05:41:01.0130764Z ##[debug] Arguments: '-version [15.0,16.0) -latest -format json'
2019-04-09T05:41:01.0223884Z ##[debug] RequireExitCodeZero: 'True'
2019-04-09T05:41:01.0351851Z ##[command]"C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.126.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,16.0) -latest -format json
2019-04-09T05:41:01.1433479Z ##[debug][]
2019-04-09T05:41:01.1662464Z ##[debug]Exit code: 0
2019-04-09T05:41:01.1723129Z ##[debug]Leaving Invoke-VstsTool.
2019-04-09T05:41:01.1837285Z ##[debug]Getting latest BuildTools 15 setup instance.
2019-04-09T05:41:01.1876304Z ##[debug]Entering Invoke-VstsTool.
2019-04-09T05:41:01.1908643Z ##[debug] FileName: 'C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.126.0\ps_modules\MSBuildHelpers\vswhere.exe'
2019-04-09T05:41:01.1940815Z ##[debug] Arguments: '-version [15.0,16.0) -products Microsoft.VisualStudio.Product.BuildTools -latest -format json'
2019-04-09T05:41:01.1976900Z ##[debug] RequireExitCodeZero: 'True'
2019-04-09T05:41:01.1995329Z ##[command]"C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.126.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,16.0) -products Microsoft.VisualStudio.Product.BuildTools -latest -format json
2019-04-09T05:41:01.2651914Z ##[debug][]
2019-04-09T05:41:01.2684020Z ##[debug]Exit code: 0
2019-04-09T05:41:01.2722901Z ##[debug]Leaving Invoke-VstsTool.
2019-04-09T05:41:01.2761049Z ##[debug]Leaving Get-VisualStudio_15_0.
2019-04-09T05:41:01.2878667Z ##[debug]Leaving Get-VSPath.
2019-04-09T05:41:01.2918773Z ##[debug]Entering Get-VSPath.
2019-04-09T05:41:01.2951134Z ##[debug] Version: '14.0'
2019-04-09T05:41:01.3025150Z ##[debug]Leaving Get-VSPath.
2019-04-09T05:41:01.3060830Z ##[debug]Entering Get-VSPath.
2019-04-09T05:41:01.3091486Z ##[debug] Version: '12.0'
2019-04-09T05:41:01.3161729Z ##[debug]Leaving Get-VSPath.
2019-04-09T05:41:01.3203687Z ##[debug]Entering Get-VSPath.
2019-04-09T05:41:01.3241272Z ##[debug] Version: '11.0'
2019-04-09T05:41:01.3668002Z ##[debug]Leaving Get-VSPath.
2019-04-09T05:41:01.3705810Z ##[debug]Entering Get-VSPath.
2019-04-09T05:41:01.3735775Z ##[debug] Version: '10.0'
2019-04-09T05:41:01.4070765Z ##[debug]Leaving Get-VSPath.
2019-04-09T05:41:01.4578925Z ##[warning]Visual Studio was not found. Try installing a supported version of Visual Studio. See the task definition for a list of supported versions.
2019-04-09T05:41:01.4594500Z ##[debug]Processed: ##vso[task.logissue type=warning]Visual Studio was not found. Try installing a supported version of Visual Studio. See the task definition for a list of supported versions.
2019-04-09T05:41:01.4595403Z ##[debug]Leaving Select-VSVersion.

Azure DevOps 服务器 2019 / VS2017:

2019-04-08T08:51:31.5394326Z ##[debug]Entering Select-VSVersion.
2019-04-08T08:51:31.5427853Z ##[debug] PreferredVersion: '15.0'
2019-04-08T08:51:31.8561977Z ##[debug]Entering Get-VSPath.
2019-04-08T08:51:31.8599268Z ##[debug] Version: '15.0'
2019-04-08T08:51:31.8719549Z ##[debug]Entering Get-VisualStudio.
2019-04-08T08:51:31.8759349Z ##[debug] MajorVersion: '15'
2019-04-08T08:51:31.8817839Z ##[debug]Getting latest Visual Studio 15 setup instance.
2019-04-08T08:51:31.9024842Z ##[debug]Entering Invoke-VstsTool.
2019-04-08T08:51:31.9064288Z ##[debug] FileName: 'C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.146.0\ps_modules\MSBuildHelpers\vswhere.exe'
2019-04-08T08:51:31.9098181Z ##[debug] Arguments: '-version [15.0,16.0) -latest -format json'
2019-04-08T08:51:31.9176808Z ##[debug] RequireExitCodeZero: 'True'
2019-04-08T08:51:31.9284024Z ##[command]"C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.146.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [15.0,16.0) -latest -format json
2019-04-08T08:51:32.3297138Z ##[debug][
2019-04-08T08:51:32.3374619Z ##[debug]  {
2019-04-08T08:51:32.3405784Z ##[debug]    "instanceId": "716a72e1",
2019-04-08T08:51:32.3443076Z ##[debug]    "installDate": "2018-06-19T06:36:30Z",
2019-04-08T08:51:32.3475952Z ##[debug]    "installationName": "VisualStudio/15.9.11+28307.586",
2019-04-08T08:51:32.3508932Z ##[debug]    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise",
2019-04-08T08:51:32.3543169Z ##[debug]    "installationVersion": "15.9.28307.586",
2019-04-08T08:51:32.3574381Z ##[debug]    "displayName": "Visual Studio Enterprise 2017",
2019-04-08T08:51:32.3605500Z ##[debug]    "description": "Microsoft DevOps solution for productivity and coordination across teams of any size",
2019-04-08T08:51:32.3635154Z ##[debug]    "updateDate": "2019-04-05T05:41:52.3762392Z",
2019-04-08T08:51:32.3665443Z ##[debug]    "enginePath": "C:\\program files (x86)\\microsoft visual studio\\installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
2019-04-08T08:51:32.3694997Z ##[debug]    "channelId": "VisualStudio.15.Release",
2019-04-08T08:51:32.3723832Z ##[debug]    "channelUri": "https://aka.ms/vs/15/release/channel",
2019-04-08T08:51:32.3757656Z ##[debug]    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660692#15.9.11",
2019-04-08T08:51:32.3787461Z ##[debug]    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660708"
2019-04-08T08:51:32.3816345Z ##[debug]  }
2019-04-08T08:51:32.3851914Z ##[debug]]
2019-04-08T08:51:32.3883080Z ##[debug]Exit code: 0
2019-04-08T08:51:32.3940945Z ##[debug]Leaving Invoke-VstsTool.
2019-04-08T08:51:32.4207172Z ##[debug]Leaving Get-VisualStudio.
2019-04-08T08:51:32.4269153Z ##[debug]Leaving Get-VSPath.
2019-04-08T08:51:32.4306347Z ##[debug]Leaving Select-VSVersion.

Azure DevOps 服务器 2019 / VS2019:

2019-04-08T13:11:16.3262140Z ##[debug]Entering Select-VSVersion.
2019-04-08T13:11:16.3316185Z ##[debug] PreferredVersion: '16.0'
2019-04-08T13:11:16.5683152Z ##[debug]Entering Get-VSPath.
2019-04-08T13:11:16.5713957Z ##[debug] Version: '16.0'
2019-04-08T13:11:16.5830477Z ##[debug]Entering Get-VisualStudio.
2019-04-08T13:11:16.5867812Z ##[debug] MajorVersion: '16'
2019-04-08T13:11:16.5936312Z ##[debug]Getting latest Visual Studio 16 setup instance.
2019-04-08T13:11:16.6207158Z ##[debug]Entering Invoke-VstsTool.
2019-04-08T13:11:16.6236159Z ##[debug] FileName: 'C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.146.0\ps_modules\MSBuildHelpers\vswhere.exe'
2019-04-08T13:11:16.6264679Z ##[debug] Arguments: '-version [16.0,17.0) -latest -format json'
2019-04-08T13:11:16.6346113Z ##[debug] RequireExitCodeZero: 'True'
2019-04-08T13:11:16.6390903Z ##[command]"C:\b\a1\_w\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.146.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [16.0,17.0) -latest -format json
2019-04-08T13:11:16.9463375Z ##[debug][
2019-04-08T13:11:16.9549197Z ##[debug]  {
2019-04-08T13:11:16.9586965Z ##[debug]    "instanceId": "1e8be92e",
2019-04-08T13:11:16.9633525Z ##[debug]    "installDate": "2019-04-05T04:43:03Z",
2019-04-08T13:11:16.9673957Z ##[debug]    "installationName": "VisualStudio/16.0.0+28729.10",
2019-04-08T13:11:16.9708765Z ##[debug]    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise",
2019-04-08T13:11:16.9740525Z ##[debug]    "installationVersion": "16.0.28729.10",
2019-04-08T13:11:16.9771033Z ##[debug]    "displayName": "Visual Studio Enterprise 2019",
2019-04-08T13:11:16.9806117Z ##[debug]    "description": "Microsoft DevOps solution for productivity and coordination across teams of any size",
2019-04-08T13:11:16.9847474Z ##[debug]    "updateDate": "2019-04-05T04:43:03.9231866Z",
2019-04-08T13:11:16.9890390Z ##[debug]    "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
2019-04-08T13:11:16.9930603Z ##[debug]    "layoutPath": "E:\\",
2019-04-08T13:11:16.9974686Z ##[debug]    "channelId": "VisualStudio.16.Release",
2019-04-08T13:11:17.0007956Z ##[debug]    "channelUri": "https://aka.ms/vs/16/release/channel",
2019-04-08T13:11:17.0046086Z ##[debug]    "installChannelUri": "E:\\ChannelManifest.json",
2019-04-08T13:11:17.0084654Z ##[debug]    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660893#16.0.0",
2019-04-08T13:11:17.0129982Z ##[debug]    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909"
2019-04-08T13:11:17.0171988Z ##[debug]  }
2019-04-08T13:11:17.0211123Z ##[debug]]
2019-04-08T13:11:17.0251034Z ##[debug]Exit code: 0
2019-04-08T13:11:17.0310329Z ##[debug]Leaving Invoke-VstsTool.
2019-04-08T13:11:17.0610458Z ##[debug]Leaving Get-VisualStudio.
2019-04-08T13:11:17.0675928Z ##[debug]Leaving Get-VSPath.
2019-04-08T13:11:17.0715177Z ##[debug]Leaving Select-VSVersion.

这不是一个容易解决的问题。这所需的改变相当广泛 https://github.com/Microsoft/azure-pipelines-tasks/pull/9273.

按照官方说法,只有当您将服务器升级到下一个更新版本或主要版本时,内置任务才会升级。 TFS 2018 update 3.2 是 TFS 2018 的最新更新版本,鉴于 Azure DevOps Server 2019(TFS 的新名称)刚刚发布,我预计 TFS 2018 update 4 不会再发布任何新版本的任务看到光芒。

解决方法

CAUTION这可能会在稍后升级到另一个服务器版本时导致问题,可能需要较新版本的 Azure Pipelines Agent,并且可能会使你处于不受支持的状态。

您可以克隆Azure 管道任务 https://github.com/Microsoft/azure-pipelines-tasks/repo,在本地构建然后使用tfx-cli https://www.npmjs.com/package/tfx-cli升级服务器中的内置任务。

git clone https://github.com/Microsoft/azure-pipelines-tasks.git
cd azure-pipelines-tasks
npm install
npm run-script build --task MSBuildV1
npm run-script build --task VstestV2
npm run-script build --task VSBuildV1

npm install tfx-cli@latest -g
tfx build tasks upload --task-path .\MSBuildV2 --service-url {{https://server/tfs/collection}}
tfx build tasks upload --task-path .\VsTestV2 --service-url {{https://server/tfs/collection}}
tfx build tasks upload --task-path .\VsBuildV1 --service-url {{https://server/tfs/collection}}

对服务器上的每个项目集合重复此操作。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 VS2019 和 TFS2018 vnext 构建系统 的相关文章

随机推荐

  • 使用 C++ 的音频流教程和示例代码 [关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我想学习音频流的基础知识 特别是 我
  • 在 Protractor 中定位父元素的推荐方法

    根据最新公布的时尚指南 https github com angular protractor blob master docs style guide md never use xpath 使用by xpath 定位器被认为是一种不好的做
  • Qt5 链接器错误:找不到版本“Qt_5”

    1 问题 我正在尝试构建开源motorcar https github com evil0sheep motorcar在 Arch Linux 机器上从头开始项目 Motorcar 是一款 Linux VR 窗口管理器 可与 Oculus
  • 无法打开原子

    我无法打开 Atom 编辑器 昨天还好好的 今天不知道为什么打不开了 我的电脑上没有 Windows 更新或任何东西 我尝试删除一些在线论坛中提到的 存储 文件夹 但没有帮助 有什么建议么 我使用的是 Atom 版本 1 19 6 0 如果
  • Kafka 连接教程停止工作

    我在此链接中执行了步骤 7 使用 Kafka Connect 导入 导出数据 http kafka apache org documentation html quickstart http kafka apache org documen
  • 链接描述文件未按预期跳过字节

    因此 我有这个汇编文件 我使用 GNU as 进行汇编 并使用链接器脚本与 GNU ld 进行链接 链接描述文件 boot ld INPUT boot o OUTPUT boot out ENTRY boot start SECTIONS
  • 并行处理 vec:如何安全地进行,或者不使用不稳定的功能?

    我有一个巨大的向量 我希望能够并行加载 操作 例如在一个线程中加载前十万个索引 然后在另一个线程中加载下一个索引 依此类推 由于这将是代码中非常热门的部分 因此我提出了以下概念验证不安全代码来在不使用 Arcs 和互斥体的情况下执行此操作
  • 自动持有自旋锁时返回是否不安全?

    受人尊敬的书说 The flags参数传递给spin unlock irqrestore必须与传递给的变量相同spin lock irqsave 您还必须致电spin lock irqsave and spin unlock irqrest
  • C 编程中 @ 符号的使用

    我正在使用一些最初编写的代码IAR https en wikipedia org wiki IAR Systems IAR Embedded Workbench并使用 GCC 编译器将其转换为编译 然而 我被困在某一行 因为我不理解语法或发
  • 创建无法在其板条箱外部实例化的零大小结构的惯用方法是什么?

    我有类似的东西 mod private My crate pub struct A impl A pub fn new gt Self Self fn main External code let obj private A new let
  • 两个或多个(哈希)映射的并集

    我有两个包含相同类型对象的地图 Map
  • 如何使用Delphi 2010优化上传例程?

    My 尚未发布Delphi 2010 应用程序允许用户将他们的文件上传到我的服务器 现在我使用 HTTPS POST 发送文件 简化的 算法基本上是 将文件拆分为 片 每个片 256KB 对于每个切片 将其 POST 到服务器 IE 对于
  • Flex/AS3很奇怪的简单数字运算问题

    我的问题在 Flex 中描述起来非常简单 0 8 0 2 0 6000000000000001 以前有人得到过这个 我确定前两个成员是 0 8 和 0 2 并且是 Number 类 为什么会发生这种情况 另一件事 我从 像这样输入 var
  • Flutter 2.0 与 Firebase Cloud Messaging:在 Android 上未调用 onMessage

    我在 Flutter 2 0 中遇到了 Firebase Cloud Messaging onMessage 问题 功能 FirebaseMessaging onMessage listen RemoteMessage message is
  • 向 Spring @Scheduled 提供时区?

    如何为基于 Spring 的系统配置时区 预定 http static springsource org spring docs 3 2 x spring framework reference html scheduling html s
  • C++ 单行注释后跟 \ 转换为多行注释

    C 标准中在哪里记录了如果使用注释行的功能 some comment 样式 在行尾放置 评论被转换为多行 使用 g 4 8 和 VS 2012 进行测试 some interesting stuff another interesting
  • 如何在 gnuplot 多重绘图模式下输出文件?

    我正在 gnuplot 版本 4 6 patchlevel 5 多重绘图模式下绘制图表 这些图表正在使用重读进行更新 set multiplot layout 3 3 do for planeIter 4 10 3 for ringIter
  • 为多个动态控件创建事件处理程序

    我有一个创建两个动态控制按钮的用户窗体 但我很难访问 name动态控件的属性 这意味着我无法正确创建事件处理程序 由于这个问题 我无法创建事件处理程序 下面显示了创建动态控件的代码以及我为事件处理程序编写的代码 无法正常运行 Option
  • 实时获取 macOS 输出设备音频缓冲区

    我试图tapmacOS 上当前选择的输出音频设备 因此我基本上有一个直通侦听器 可以监视当前正在输出的音频流而不影响它 我想将这些数据实时复制到环形缓冲区 以便我可以单独对其进行操作 Apple 文档和 过时 SO 答案的结合令人困惑 我是
  • 使用 VS2019 和 TFS2018 vnext 构建系统

    有谁知道是否可以将 VS2019 与 TFS2018 vnext 构建系统一起使用 您无法在生成定义中选择 VS2019 但可以选择 最新 作为 Visual Studio 的版本 不幸的是 这里没有选择VS2019 我已经在安装了VS20