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?
Visual Studio 2015 Select the Manage Connections button in Team Explorer to open the Connect page. Choose Connect to Team Project to select a different organization, TFS, or project to connect to. Select the projects to work on. If it's your first time connecting, add TFS to the list of recognized servers.
In Visual Studio, on the Team menu, click Connect to Team Foundation Server. If you have already configured a connection to a TFS server, you can omit steps 4-7. In the Connection to Team Project dialog box, click Servers. In the Add/Remove Team Foundation Server dialog box, click Add.
In the TFS web portal, open the desired project. Select Build and Release and then Builds in the Navigation bar. Click the +New button to create a build definition. On the Select your repository page, select the preferred repository type and Continue.
You can use MSBuild task instead of Visual Studio Build Step, then specify the location of MSBuild 15.0:
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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With