5

We want to migrate from VS 2017 to VS 2019. We are still on TFS 2017 and want to stay there for now.

I set up the build infrastructure a long time ago, so I am not certain anymore what the role of VS on the build agent is.. I certainly sometimes use it to manually open a solution that does not compile for unclear reasons, and I think it also was needed for some libraries.

I want the automated build process to use same VS as on developer machines, for consistency.

Can I uninstall VS 2017 and install VS 2019 on the build machine and the build will work using VS 2019? Or more generally: can I build using the VS 2019 build infrastructure on TFS 2017 build agent?

Thank you!

Andreas Reiff
  • 7,961
  • 10
  • 50
  • 104
  • 4
    Check this answer: https://stackoverflow.com/questions/56984966 – Shayki Abramczyk Jul 16 '19 at 09:24
  • It's working, thank you. Little bit of hassle to change all build definitions, also, it does not find the msbuild version on its own (even though it allows to specify v15), the path has to be specified, incl. other parameters like configuration and platform (just copy the placeholders - at least in my case). – Andreas Reiff Jul 16 '19 at 15:43

1 Answers1

5

Can I uninstall VS 2017 and install VS 2019 on the build machine and the build will work using VS 2019? Or more generally: can I build using the VS 2019 build infrastructure on TFS 2017 build agent?

The answer is yes, just like I said in that thread:

(I will answer this question again so that others can see the answer directly when they see this thread without having to redirect to that thread.):

Only the latest version has "full" compatibility with the latest Team Foundation Server

So, TFS 2017 have a high level of support for Visual Studio 2019 not full support. Since the product TFS2017 was launched earlier than Visual Studio 2019, TFS could not recognize the future products.

If we want to use the VS 2019 build infrastructure on TFS 2017 build agent, we have to specify the MSBuild path when using MSBuild task to build.

BTW, you could custom your MSBuild task with location of MSBuild 16.0 as task group, then you can use it instead of MSBuild task, you do not have to edit that task each time. But for those piplelines that are already in use, we have to modify our build definition.

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • Thank you! How can i modify a task group? Never heard of that. So in future updates, I would only have to update the new msbuild path once? – Andreas Reiff Jul 18 '19 at 12:41
  • 1
    @AndreasReiff, Yes, How to create a task group, please check this document:https://learn.microsoft.com/en-us/azure/devops/pipelines/library/task-groups?view=azure-devops, and in the future update, you just need to update the path in the task group. It wil work for all the build/release pipeline. – Leo Liu Jul 18 '19 at 13:09
  • Yes, its working, thank you very much. forgot to mark as answered. – Andreas Reiff Jul 20 '19 at 15:27