Agent on Linux doesn't show NET runner support.

Our build server is fully on Linux, currently we need it to build some .NET application, however, when I try to create the build step, as recommended, I should pick the .NET or .NET CLI thing, however, there is no such runner(expected several deprecated ones), also, following the documentation I installed the latest Mono, but there is no Nuget runner neither.

Some Info:

OS is Ubuntu 22.04 server distribution.

Mono version: 

Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-3.2 Wed Jun 30 05:34:49 UTC 2021)

NET version: 

.NET SDKs installed:

 7.0.117 [/usr/lib/dotnet/sdk]

.NET runtimes installed:

 Microsoft.AspNetCore.App 7.0.17 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]

 Microsoft.NETCore.App 7.0.17 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

I tried to add environment variable like DOTNET_HOME to “/usr/lib/dotnet” but no help.
Teamcity version:  TeamCity Professional 2023.11.4 (build 147586)
For agent:

This agent supports the following build runners:

  • .NET Process Runner: Runs .NET processes under the specified runtime, framework version, and with/without code coverage
  • Ant: Runner for Ant build.xml files
  • Command Line: Simple command execution
  • Duplicates finder (Java): Runner for gathering IntelliJ IDEA duplicates results
  • Gradle: Runner for Gradle projects
  • Inspections (IntelliJ IDEA): Runner for gathering IntelliJ IDEA inspection results
  • IntelliJ IDEA Project: Runner for IntelliJ IDEA projects
  • MSBuild: Runner for MSBuild files
  • Maven: Runs Maven builds
  • NAnt: Runner for NAnt build files
  • NUnit: Runs NUnit tests
  • Unity: Provides build support for Unity projects
  • Visual Studio (sln): Microsoft Visual Studio solution (.sln) runner
  • Visual Studio 2003: Microsoft Visual Studio .NET 2003 solution file build runner

When I pick MSBuild or .NET ProcessRunner, there always a message recommending change to .NET runner, but there isn't such one.

What can I do to fix this?

0
5 comments

Hi Eric,

Starting from version 2023.05, TeamCity provides a convenient and quick way to get direct access to an agent machine by opening a remote terminal directly from the TeamCity UI.TeamCity provides a convenient and quick way to get direct access to an agent machine by opening a remote terminal directly from the TeamCity UI.

You can easily install .NET and NuGet by following the instructions in the Mono documentation. Simply open the terminal and proceed with the installation process.  For Ubuntu 22.04, you can use the following command.

sudo apt install ca-certificates gnupg 
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list 
sudo apt update
sudo apt install mono-devel


Additionally, remember to restart the agent for the changes to take effect.

0

Hi there, 
Thanks for the response, but after I follow the instructions above, and installed a newer version Mono(it's 4.5 I guess?), .NET or Nuget options are still not in the runner list.
So I have parameter like:

Mono    /usr/bin/mono-sgen

Mono4.0_x64    /usr/lib/mono/4.0

Mono4.5_x64    /usr/lib/mono/4.5

MonoVersion    6.12.0.200

But my runner list are still:

This agent supports the following build runners:

  • .NET Process Runner: Runs .NET processes under the specified runtime, framework version, and with/without code coverage
  • Ant: Runner for Ant build.xml files
  • Command Line: Simple command execution
  • Duplicates finder (Java): Runner for gathering IntelliJ IDEA duplicates results
  • Gradle: Runner for Gradle projects
  • Inspections (IntelliJ IDEA): Runner for gathering IntelliJ IDEA inspection results
  • IntelliJ IDEA Project: Runner for IntelliJ IDEA projects
  • MSBuild: Runner for MSBuild files
  • Maven: Runs Maven builds
  • NAnt: Runner for NAnt build files
  • NUnit: Runs NUnit tests
  • Unity: Provides build support for Unity projects
  • Visual Studio (sln): Microsoft Visual Studio solution (.sln) runner
  • Visual Studio 2003: Microsoft Visual Studio .NET 2003 solution file build runner

These ones, seems nothing change.

Both agent and server get restarted.

0

Hi Eric, 

Could you please share the teamcity-agent.log to us for further investigation?

Files can be uploaded via https://uploads.jetbrains.com/. Please let us know the exact id after the upload.

0

Hi Tom,

Here is the log file: Upload id: 2024_03_25_f52fP7FL2YkoEcchcpZGcw (file: teamcity-agent.log)

Tell me if you need something else.

0
Hi Eric,

It seems unusual that your DOTNET_HOME setting isn't working as expected. Have you tried adding the path to your dotnet installation to the $PATH environment variable? Additionally, please ensure that running dotnet --version returns the expected result.

By default, the directory for the .NET executable file on Unix systems is /usr/share/dotnet. Alternatively, would you consider directly copying the dotnet installed folder to /usr/share? Just make sure that the dotnet command resides within the /usr/share/dotnet folder.
0

Please sign in to leave a comment.