Keith
Keith

Reputation: 2019

How to isolate TFS build agents to build with different versions of VS?

We have one TFS build controller with four build agents. We also have VS 2013 on all four build agents to build our VS 2013 projects. We now need to start building new projects with VS 2015. We’ve already noticed that some of the VS 2013 projects fail to build on a TFS build agent with VS 2015 so we need to find a way to isolate the build agent with VS 2015 and only build VS 2015 based projects on a TFS build agent with VS 2015 without impacting the VS 2013 projects. How can this be done with only one TFS build controller? Do we need to create a 2nd build controller on the same TFS server to handle VS 2015 builds? I've read this can be done (more than one build controller on same TFS server) but this scenario is not supported by MS.

Upvotes: 0

Views: 922

Answers (1)

Daniel Mann
Daniel Mann

Reputation: 59020

You don't need separate controllers or agents for this. You can explicitly specify the Visual Studio version and MSbuild version by passing MSbuild arguments in your build definition.

Visual Studio

/p:VisualStudioVersion=12.0 will force it to use VS 2013.

/p:VisualStudioVersion=14.0 will force it to use VS 2015.

MSBuild

/tv:12.0 will force MSBuild to use the VS 2013 version.

/tv:14.0 will force MSBuild to use the VS 2015 version.

Upvotes: 3

Related Questions