2

I recently ran into a problem trying to use VS2019 with the TFS2018 vnext build system.

You cannot select VS2019 in the "Visual Studio Build" step, and selecting "Latest" does not use Visual Studio 2019.

On a test server, upgrading the server software from TFS 2018.3 to Azure Devops Server 2019 fixes the issue. Is there a simple work-around that would allow Visual Studio 2019 to be used without affecting the TFS server in a questionable way.

This question extends the question here: Using VS2019 with TFS2018 vnext build system

SteveSims
  • 535
  • 6
  • 19

1 Answers1

4

Instead of using the Visual Studio Build step, I tried switching to the MSBuild Build step and specified the path to msbuild.exe as follows:

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

The build ran successfully and used Visual Studio 2019.

SteveSims
  • 535
  • 6
  • 19
  • 1
    MsBuild will be usable, you'll run into similar issues with other tasks, like vstest. – jessehouwing Nov 22 '19 at 11:53
  • Good point. However, what we found was that we needed VS2019 for the C#7.1 version language syntax. vstest from 2017 gave us no issues. – SteveSims Nov 22 '19 at 21:20
  • looks like there are subtle differences between MSBuild and VSBuild tasks -- I just had an issue when .sln file failed to build because "before-build" step was executed in MSBuild before dependencies finish building. Specifically [this issue](https://stackoverflow.com/a/49367488/6427477). – C.M. Nov 05 '21 at 20:14