1
votes

I have installed TeamCity 2017.1.4 (build 47070) using the 'TeamCity-2017.1.4.exe' installer on to a clean Windows 2012R2 server picking most of the default settings. The 'TeamCity Server' and 'Team City Build Agent' are both installed as a service (the Agent is on the same machine as the Server).

In addition to TeamCity, I also have installed:

  • MSBuild (Build Tools for Visual Studio 2017)
  • NUnit
  • DOTNET Framework up to 4.7

Having completed the TeamCity installation process, I was faced with the following message on the Admin screen:

The following agents tried to upgrade several times but failed

There are multiple posts regarding this issue, but all for earlier versions of TeamCity. A lot say "just wait, it takes a while", but not that long... I stopped/started the services, disabled and enabled the Agent, and rebooted the server n-number of times. It does seem odd that the default Build Agent doesn't run after a fresh install.

So, whilst trying to figure out why the Build Agent wouldn't run, I started to configure a project. We're decommissioning our old TeamCity server, so it was an easy process to add all the build steps on the new server.

However, for this Project, I'm now confronted with the message:

NAMEOFAGENT (disconnected)

Incompatible runner: NUnit Unmet
requirements:
Exists=>(DotNetFramework(4\.[5-9]{1}.*|[5-9]{1}.*|\d{2,}.*)_x86|Mono(3\.[2-9]{1}.*|3\.\d{2,}.*|[4-9]{1}.*|[\d]{2,}.*)) exists  
Exists=>(powershell_x86|powershell_x64) exists

So, I have some build-steps that execute our integration tests using NUnit 2.6.4. That is installed on the server, and checking the registry settings, we certainly have .NET and Powershell installed in their default locations:

  • NET Framework 4.7 is installed, confirmed by the registry key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\V4\Full
  • Powershell is installed, confirmed by the registry key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine (and Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine)

One post suggested adding the following to the file 'c:\TeamCity\buildAgent\conf\buildAgent.properties':

DotNetFramework4.0_x86_Path=C:\Windows\Microsoft.NET\Framework\v4.0.30319 DotNetFramework4.0_x86=4.0.30319 DotNetFramework4.0_x64_Path=C:\Windows\Microsoft.NET\Framework64\v4.0.30319 DotNetFramework4.0_x64=4.0.30319

Rebooting the server (along with start/stopping the services and disabling/enabling the agent) still hasn't solved this issue.

What am I missing?

Thanks

1

1 Answers

0
votes

Do you have Visual Studio installed on the Build Server? After many attempts installing SDK's etc. I found that the best approach was just running VS on the same box.

  • Download and install latest Visual Studio 2017
  • Download And Install latest Visual Studio Build Tools

2017 Downloads

  • Remember to add the new MSBuild path to your OS environment PATH (E.g. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin)
  • Don't use auto detect build settings (Make sure you select the correct VS version)

Then restart the build box and Team City and give the agent some time to pick up the changes.