0

I am unfortunately stuck on TeamCity 9 but want to use C# 7 language features. This requires me to have the VS2017 tools available, but in TC 9 you can only select up to 2015. I have manually installed the VS2017 toolkit on the build server and it is all available in

C:\Program Files (x86)\MSBuild\15.0

However in TC, the highest VS you can select to build with is 2015, which points to

C:\Program Files (x86)\MSBuild\14.0

I want some way to override this so that by selecting VS2015 in TeamCity, it will actually be pointing to MsBuild in

C:\Program Files (x86)\MSBuild\15.0

Is this possible?

NZJames
  • 4,963
  • 15
  • 50
  • 100

1 Answers1

0

Check you agent properties in TeamCity web interface. Search for your path: C:\Program Files (x86)\MSBuild\14.0 and write somewhere all keys that have this path in it.

Then go to your agent installation directory and edit file: C:\Path\To\BuildAgent\conf\buildAgent.properties

Add all those keys with new path, something like (assuming you key is MSBuildTools14.0_x86_Path):

MSBuildTools14.0_x86_Path=C:\\Program Files (x86)\\MSBuild\\15.0

(keep in mind escaping slash \\)

Restart your agent, and check again build agent properties. All paths should be replaced and you should be good to go.

This answer is based on comments from this issue: https://youtrack.jetbrains.com/issue/TW-54222

Peska
  • 3,980
  • 3
  • 23
  • 40