Использование VS2019 с системой сборки vnext TFS2018 - PullRequest
4 голосов
/ 09 апреля 2019

Кто-нибудь знает, возможно ли использовать VS2019 с системой сборки vnext TFS2018. Вы не можете выбрать VS2019 в определении сборки, но вы можете выбрать «Последние» в качестве версии для Visual Studio. К сожалению, это не выбирает VS2019.

Я проверил это на виртуальной машине с установленными VS2017 и VS2019. Я также обновил TFS2018 до Azure DevOps Server 2019, что решило проблему. Но это не «быстрое» решение для нашей производственной среды.

Вот логи моих тестов. Как вы можете видеть, выбрав «Последняя» в качестве версии для Visual Studio, закончилась ошибка, из-за которой VS не был выбран вообще:

TFS2018 / 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 Server 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 Server 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.

1 Ответ

5 голосов
/ 09 апреля 2019

Это не легко исправить. Требуемые изменения были довольно обширными .

Официально встроенные задачи обновляются только при обновлении сервера до следующей версии обновления или основной версии. TFS 2018 update 3.2 является последней версией обновления для TFS 2018, и, учитывая, что только что выпущен Azure DevOps Server 2019 (новое имя для TFS), я ожидаю, что никакие новые версии задач не будут поставляться для TFS 2018 с обновлением 4, если это когда-либо случится. увидеть свет.

Обход

ВНИМАНИЕ это может вызвать проблемы при обновлении до другой версии сервера на более поздней стадии, может потребовать более новых версий Агента конвейера Azure и может привести вас в неподдерживаемое состояние.

Вы можете клонировать репозиторий Azure Pipelines , создать его локально, а затем использовать 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}}

Повторите для каждой Коллекции проектов на вашем сервере.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...