简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM