Alenros
Alenros

Reputation: 945

Using Visual Studio 2019's MsBuild with TFS 2018 task

I'm running an on-prem TFS 2018 U2 and I want to use the latest MsBuild (currently - the one from Visual Studio 2019).

The way I do it right now is running the MsBuild Task with the location for the version of MsBuild that I want to run.

Is there a more elegant way to do that, preferably a TFS Task, that won't require knowing the exact location?

Upvotes: 0

Views: 360

Answers (1)

Leo Liu
Leo Liu

Reputation: 76928

Is there a more elegant way to do that, preferably a TFS Task, that won't require knowing the exact location?

I am afraid there is no more elegant way to do that. The method you use now is the best method.

That because the VS2019 was released after TFS 2018. TFS 2018 will not predict the next version and installation path of VS2019. This is why there is no VS2019 option in VS Build Task in TFS 2018 Server.

So, we have to specify the exact location of VS 2019 for the MSBuild task in TFS 2018, otherwise, Visual studio build/MSBuild build task will use the default MSBuild 15.0.

You could check this thread for some more details.

Upvotes: 1

Related Questions