14
votes

I am running TFS 2015 and are using the Visual Studio Build Step. On the developemnt machines I moved to use Visual Studio 2017 so I also want to use Visual Studio 2017 for the TFS builds.

I installed Visual Studio 2017 on the build server and restarted the build agent. However Visual Studio 2017 does not show up in the capabilities of the agent and it also does not show in the list of Visual Studio versions in the build step.

I know I can choose "latest" from the list of Visual Studio version in the build step, but this will still use VS 2015 as the agent does not know that it has VS 2017.

How can I make sure that the Visual Studio Build Step in TFS2015 uses Visual Studio 2017?

2

2 Answers

16
votes

You can use MSBuild task instead of Visual Studio Build Step, then specify the location of MSBuild 15.0:

enter image description here

2
votes

In TFS 2015 the build steps and forward compatibility is only updated when TFS is updated. If you are using TFS 2015.3 already then you will need to move to TFS 2017 to use this out of the box.

The build step ultimately calls out to devenv.exe and the drop down changes the path. You can call out manually to VS 2017...