0

In the configuration of build step in my TFS server (Version 16.131.27701.1), the version 2019 of visual studio is missing.

This version is installed on my build agents.

How to add this version in the select list of the msbuild step ?

k4st0r42
  • 1,174
  • 1
  • 15
  • 29

2 Answers2

5

VS2019 is not yet fully supported in vNext Build on tfs2018/2017.

Please first upgrade your build agent version to latest. As you can see in this link System Capabilities do not support VS2019 with prior build agent version.

Then you can try follow to jessehouwing's suggestion to install a newer version task. Details refer this question: Missing last version 2019 of visual studio on TFS build configuration

CAUTION this may cause issues when upgrading to another server version at a later stage, may require newer versions of the Azure Pipelines Agent and can put you in an unsupported state.

You can clone the Azure Pipelines Tasks repo, build it locally and then use tfx-cli to upgrade the built-in tasks in your server.

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}}

Repeat for every Project Collection on your server.


Another workaround is using MSBuild task instead of Visual Studio Build Step, then specify the location of MSBuild 16.0, it should be:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe

enter image description here

Please take a look at this similar question: Team Foundation Server 2018 Build agent Capabilities VS 2019

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
1

I am on TFS 2017.3. After installing VS2019 on one of my build servers and looking at the build agent capabilities I do not see VS2019 listed. I'm betting that you need to have Azure DevOps server installed in order to use it.

Sherpa11
  • 153
  • 1
  • 1
  • 14