0

We will be upgrading to Visual Studio 2017 on our build server shortly, but I will still be using TFS 2015 XAML builds for our continuous integration.

I was told at one point in another thread (https://social.msdn.microsoft.com/Forums/en-US/de9449dd-25ee-4170-8937-62552a2f0dd1/tfs-2017-upgrade-and-preexisting-xaml-builds?forum=tfsgeneral), which has since been archived that this combination is still possible. I just have to pass a build flag, /p:visualstudioversion:15.0, in the XAML Build Definition. At that time, we were going to have Visual Studio 2015 and 2017 installed on the same build server, hence the need for the flag, but I have since changed my mind and will be creating a new server solely using VS 2017.

So, my question is, on this new box, with TFS 2015 XAML used and Visual Studio 2017 installed do I still have to use this VS version MSBuild flag to tell the build which version to use or is that not needed as there will be no other version of VS on the machine?

Any information is GREATLY appreciated!

Thanks in advance.

mawa316
  • 151
  • 1
  • 1
  • 3
  • I hope this is a stopgap measure while you migrate your builds off of XAML build. – Daniel Mann Jun 04 '18 at 13:27
  • Yes, basically I plan to get things running as they are now and then work towards switching to vNext or whatever they call the non-XAML build setup now. I was told that TFS 2015 XAML build will work with Visual Studio 2017 so that is the current plann – mawa316 Jun 04 '18 at 17:03

1 Answers1

0

Basically the TFS and VS should match the version, by default TFS will try to find the matching version of MSbuild/visual studio.

That means if you installed TFS 2015, by default it will try to use VS 2015.

So if you want to use VS 2017, you still need to specific MSBuild Command Line parameters: /tv:15.0 /p:VisualStudioVersion=15.0

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • @mawa316 Is that answered your question? any update? – Andy Li-MSFT Jun 26 '18 at 02:48
  • So on this current machine, I have TFS XAML Build 2015 installed because TFS 2017 no longer supports XAML. The only version of Visual Studio installed is 2017. So, if I include /tv:15.0, the build fails, but if I remove it and check the diagnostic log, it seems MSBuild from VS 2017 is found and used for build. So my question at this point is what toolset is being used if the parameter is not supplied in the Build Definition? The download link supplied earlier was for 2015 and I still question, if the versions should match, why the download isn't for or shouldn't be 2017? – mawa316 Jul 15 '18 at 15:42
  • @mawa316 Based on experiences, if you installed multiple version of VS, TFS will use the one which matched the version of TFS. But if the only specific version of VS installed, then it can only use that version of VS. However there are different versions of MSbuild, you may need to specific the path of the MSBuild which under BuildTools, please reference this thread : https://stackoverflow.com/questions/45035838/tfs-2017-doesnt-build-fakes-targets – Andy Li-MSFT Jul 16 '18 at 01:56