This article originally appeared on my personal blog.
At work we are running on premise Team Foundation Service 2015 (yeah, I know, right?).
We have been struggling a bit to build C# 7.0 code on it.
We installed Visual Studio 2017 on the build machine but it seemed that no matter what we did, we were only able to choose between "Visual Studio 2015" and "Visual Studio "15" Preview" in the build step. As you may know, the latter is a preview for Visual Studio 2017 and it just did not do the job for us.
The solution is quite simple and it is a bit embarrassing that we did not find out faster.
It turns out that all you have to do is use an MSBuild step instead of af Visual Studio Build sted. Under the "Advanced" section, you put in the path for the latest msbuild.exe on your build machine.
If you put Visual Studio 2017 or even better, the Visual Studio 2017 build tools on your build machine, you should be able to find msbuild.exe in there somewhere.
(screenshot is from https://www.visualstudio.com/ but you get the idea).
Switching from VS Build to MSBuild may not work right of the box. We did not encounter any problems though.
Top comments (0)