Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unmet requirement DotNetCLI_Path exists #153

Open
chris1248 opened this issue Jan 20, 2021 · 5 comments
Open

unmet requirement DotNetCLI_Path exists #153

chris1248 opened this issue Jan 20, 2021 · 5 comments
Assignees

Comments

@chris1248
Copy link

I have a linux build agent running on RedHat Enterprise Linux 8.
The agent is up and running and I have .NET core installed on it:

[me@teamcity-linux-agent-rhel8-1 conf]$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.108
Commit: c423b556b5
Runtime Environment:
OS Name: rhel
OS Version: 8
OS Platform: Linux
RID: rhel.8-x64
Base Path: /usr/lib64/dotnet/sdk/3.1.108/
Host (useful for support):
Version: 3.1.8
Commit: 9c1330dedd
.NET Core SDKs installed:
3.1.108 [/usr/lib64/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.8 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.8 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

But when I want to specify a build step using the .NET tool (i.e. dotnet build), I get this error:

Unmet requirements:
DotNetCLI_Path exists

I have tried setting the DOTNET_HOME environment variable in the buildAgent.properties file to the following different combinations:

env.DOTNET_HOME=/usr/lib64/dotnet/sdk/3.1.108/
env.DOTNET_HOME=/usr/lib64/dotnet/sdk/
env.DOTNET_HOME=/usr/lib64/dotnet/

Nothing works. I still get that unmet requirement.
I've searched online, but only see help requests pointing to windows installations, not linux.

What do we set DOTNET_HOME to?

@NikolayPianikov NikolayPianikov self-assigned this Jan 21, 2021
@NikolayPianikov
Copy link
Contributor

NikolayPianikov commented Jan 21, 2021

@chris1248 could you share a TeamCity version?

@chris1248
Copy link
Author

Version:

2020.1.1 (build 78657)

@NikolayPianikov
Copy link
Contributor

@chris1248 Unfortunately, I cannot reproduce. Could you please share a "teamcity-agent.log"?

@joshua5822
Copy link

I was dealing with the same issue with Oracle Linux 7 and had installed dotnet through Microsoft's dotnet-install.sh. Regardless of what I set the DOTNET_HOME or PATH variables to TeamCity wouldn't detect the DotNetCLI_Path. While looking through Teamcity documentation I found the .NET Version Detection Algorithm documents that it also looks at the directory of /usr/share/dotnet. After using the dotnet-install.sh script to install it there the problem went away. I hope this helps anyone else who encounters this issue.

@Bhodges94
Copy link

@joshua5822 , although my DOTNET_HOME was set correctly (/usr/share/dotnet) that documentation showing the detection algorithm was kinda helpful but why they haven't done it for MSBuild?
https://www.jetbrains.com/help/teamcity/msbuild.html
Mine just can't find the MSBuild path at all
Unmet requirements:
MSBuildTools16.0_x64_Path exists

Tried setting env variable in bashrc, buildagent.properties, within the build configuration parameters, I've tried moving the MSBuild folder into /usr/share/dotnet but it just can't find it.
Setup:
ubuntu 20.04 docker container.
TeamCity Enterprise 2020.2 (build 85487).
Microsoft (R) Build Engine version 16.11.1+3e40a09f8 for .NET.
Also have Microsoft (R) Build Engine version 16.6.0 for Mono

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants