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

Ubuntu 22.10 .Net 7 - Keep getting the message ".NET location: Not found" #15141

Closed
khteh opened this issue Dec 16, 2022 · 3 comments
Closed

Comments

@khteh
Copy link

khteh commented Dec 16, 2022

You must install .NET to run this application.

App: /usr/src/MyApp/bin/Debug/net7.0/MyApp
Architecture: x64
App host version: 7.0.1
.NET location: Not found

Learn about runtime installation:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.22.10-x64&apphost_version=7.0.1
.NET SDK:
 Version:   7.0.101
 Commit:    bb24aafa11

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.10
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/7.0.101/

Host:
  Version:      7.0.1
  Architecture: x64
  Commit:       97203d38ba

.NET SDKs installed:
  7.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/lib/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
@khteh khteh changed the title Ubuntu 22.10 .Net 7 - Keep getting the message "You must install .NET to run this application" even after installing .Net 7 runtime Ubuntu 22.10 .Net 7 - Keep getting the message ".NET location: Not found" Dec 16, 2022
@marcpopMSFT
Copy link
Member

Have you installed multiple versions of dotnet from different sources? I ask because from the --info output, you can see DOTNET_ROOT is set to a different path than where your runtime is actually installed to. If you fix that, it should fix this issue but the question is how did the root value get set.

@marcpopMSFT marcpopMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2023
@khteh
Copy link
Author

khteh commented Jan 5, 2023

Have you installed multiple versions of dotnet from different sources? I ask because from the --info output, you can see DOTNET_ROOT is set to a different path than where your runtime is actually installed to. If you fix that, it should fix this issue but the question is how did the root value get set.

That is a very good question to you and your team. Why is it not cleaned up when I uninstalled previous version of .Net 6?

@dsoronda
Copy link

I have same issue.
I had dotnet6 and now I installed dotnet7 on Ubuntu 22.10.

❯ dotnet --info

Host:
  Version:      7.0.2
  Architecture: x64
  Commit:       d037e070eb

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.2 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.2 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/lib/dotnet]

But I see dotnet7 sdk here

347268  /usr/share/dotnet/sdk/7.0.102
347268  /usr/share/dotnet/sdk

And

whereis dotnet
dotnet: /usr/bin/dotnet /usr/lib/dotnet /etc/dotnet /usr/share/dotnet /usr/share/man/man1/dotnet.1.gz

So, my question is what should go where (SDK path etc) ?

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

3 participants