Windows agent cannot find VS 2017 and MSBuild 2017 with latest 15.4.4 update

Title says it all, after the latest 15.4.4 update of VS 2017 the Windows agent cannot detect VS 2017 and MSBuild 2017.

Setting the agent log to debug level doesn't help much, it only displays some registry searches, but VS 2017 no longer stores its installation path in the registry. On an agent with VS 2017 15.4.3 I can see a line like this:

[...] INFO - cher.DotNetPropertiesExtension - Found Microsoft Visual Studio 2017, reporting parameters: {VS2017=15.0.27004.2008, VS2017_Path=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE}

On an agent with VS 2017 15.4.4 this line is simply missing, otherwise the part of the log between "Start / Finish MS VS Search" looks pretty similar.

5 comments
Comment actions Permalink

Is there a known fix or workaround for this?

0
Comment actions Permalink

Unfortunately, I don't remember how I worked around this, I haven't taken any notes.

0
Comment actions Permalink

I'm having this issue on 5 agents running on two different AWS EC2 windows 10 instances. One is the TeamCity server running 2017.2.3 (build 51047) and the other is a standalone Agent server. Both have the most recent versions of Build tools for Visual Studios 2017 and a full install of  VS2017 Enterprise and have been rebooted. The Agents on either server will never detect MSBuild v15 and always have this unmet requirement on configs with a MSbuild v15 build step

  • MSBuildTools15.0_x64_Path exists

If I install Build tools for VS 2015 it detects MSBuild V14 with no issues. I've read and verified that during the install of VS 2017 (build tools or full version) it no longer write Registry or system/user Variables. They now include a little program called vswhere to find your VS installs locations.

I've tried adding v15 MSbuild bin folder location to the system Env PATH and also tried adding it to the buildAgent.properties file with no effect. I've pasted below the agent log where detects the msbuild versions. 


This is a new TeamCity build server for current company that purchased old company last fall. I'm tasked with moving their Build system from TFS to TeamCity.
We have two other NON-AWS (standard colo VMs) windows 10 TeamCity Servers running 2017.2.2 (build 50909) and both have no issues detecting MSbuild V15 and setting the MSBuildTools15.0_x64_Path parameter. I know both have older full installs of VS2017 without the latest updates.

I really need a resolution on this. How does the latest version of TeamCity agents detect VS2017 and MSbuild. Any help would be appreciated.

[2018-05-08 15:29:39,132]   INFO - cher.DotNetPropertiesExtension - Start MSBuild Search 
[2018-05-08 15:29:39,523]   INFO - cher.DotNetPropertiesExtension - Found MSBuild Toolset 14.0 (x64) at C:\Program Files (x86)\MSBuild\14.0\bin\amd64, reporting parameters: {MSBuildTools14.0_x64_Path=C:\Program Files (x86)\MSBuild\14.0\bin\amd64} 
[2018-05-08 15:29:39,523]   INFO - cher.DotNetPropertiesExtension - Found MSBuild Toolset 4.0 (x64) at C:\Windows\Microsoft.NET\Framework64\v4.0.30319, reporting parameters: {MSBuildTools4.0_x64_Path=C:\Windows\Microsoft.NET\Framework64\v4.0.30319} 
[2018-05-08 15:29:39,523]   INFO - cher.DotNetPropertiesExtension - Found MSBuild Toolset 14.0 (x86) at C:\Program Files (x86)\MSBuild\14.0\bin, reporting parameters: {MSBuildTools14.0_x86_Path=C:\Program Files (x86)\MSBuild\14.0\bin} 
[2018-05-08 15:29:39,523]   INFO - cher.DotNetPropertiesExtension - Found MSBuild Toolset 4.0 (x86) at C:\Windows\Microsoft.NET\Framework\v4.0.30319, reporting parameters: {MSBuildTools4.0_x86_Path=C:\Windows\Microsoft.NET\Framework\v4.0.30319} 
[2018-05-08 15:29:39,523]   INFO - cher.DotNetPropertiesExtension - Finished MSBuild Search

0
Comment actions Permalink

This problem is reported as https://youtrack.jetbrains.com/issue/TW-54222 and it should be fixed in the upcoming 2017.2.4 version. We plan to publish 2017.2.4 on this week.

0
Comment actions Permalink

While installing latest TC 2018.2.2 I found these lines in the buildAgent.properties of the old TC 2017 installation:

VS2017=15.0.27004.2009
VS2017_Path=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE
MSBuildTools15.0_x64_Path=C\:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\MSBuild\\15.0\\bin\\amd64
MSBuildTools15.0_x86_Path=C\:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\MSBuild\\15.0\\bin
teamcity.dotnet.mstest.15.0=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\MSTest.exe
teamcity.dotnet.vstest.15.0=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe

I suppose they were supposed to work around the problem.

I didn't put them back into the new agent configuration and it seems to be fixed indeed, VS 2017 was discovered.

0

Please sign in to leave a comment.