Override the default selected VS 2017 / MSBuild instance type
Hi,
I have two Visual Studio 2017 instances installed on my build agents, the main one is Build Tools 2017 and the second is VS SQL 2017 (used for SSDT builds).
- The VS Build Tools instance has all required components installed
- The VS SQL instance only has SSDT
The problem im facing is that the teamcity agents pick up the VS SQL instance as the default which means most of our builds (VisualStudio Runner, MSBuild Runner, VSTest, etc...) are trying to run against C:\Program Files (x86)\Microsoft Visual Studio\2017\SQL\....
Is there any way i can set the BuildTools instance as the default? (possibly via an environment variable)
I'm currently doing the following - but it doesnt feel right as other properties may appear:
VS2017_Path=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\IDE
MSBuildTools15.0_x64_Path=C\:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\bin\\amd64
MSBuildTools15.0_x86_Path=C\:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\bin
teamcity.dotnet.mstest.15.0=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\IDE\\MSTest.exe
teamcity.dotnet.vstest.15.0=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe
Teamcity version: 2018.2.2
Please sign in to leave a comment.
Hi,
thanks for the info. As of now, what you are doing is the correct approach. We provide an autodetect functionality that should work in most scenarios, but when conflicting versions appear, we cannot determine which one is the correct one to use, so it's up to the user to determine it by setting the appropriate properties.
If you would like to see this improved somehow, please feel free to open a feature request in our tracker: https://youtrack.jetbrains.com/issues/TW