Search code examples
tfsmsbuildbuild-server

TFS 2017 - Build Server does not build Visual Studio 2017


After upgrade of Visual Studio 2017 last week on my build server, the MS Build 15.0 is not in use anymore. So whenever I try to compile visual studio 2017 projects which use new feature they will fail.

The Warning in build log is:

Visual Studio version '15.0' not found. Looking for the latest version.

And the error is:

something.cs(542,41): Error CS1525: Invalid expression term 'int'

Which is because build server is using MS build 14.0 I guess.

So far I have 1- Uninstall and Reinstalled the Visual Studio 2017 on the build server. 2- Installed "Visual Studio Build Tools 2017".

And nothing works. I have read some articles and apparently there are missing registry values but I don't know how to create them.

Appreciate your helps on this topic.

I am using TFS 2017 SP1 (On premises) and Visual Studio 2017 latest updates.


Solution

  • I have resolved this issue by upgrading my TFS from TFS 2017 SP1 to TFS 2017 SP2.

    Thanks to @Patrick-MSFT and @Martin Ullrich for your help.