runtime: Framework Not Detecting On Linux When Executing "dotnet" Command

Description

I installed .NET 7.0.7 SDK + Runtime on my Linux machine.

On which, I deployed nearly 5 ASP.NET Core MVC apps made in .NET 7.0.0

  1. After deployment and setting an Apache reverse proxy, 4 out of 5 projects started. One didn’t start
  2. It gives 503 SERVICE UNAVAILABLE
  3. To troubleshooting the non working app, I ran dotnet <DLL NAME>.dll, But this give me the following error

image

  1. So, I executed dotnet --info, But that gave me

image

  1. Then I realized, ### If I run any of my websites using dotnet <NAME OF DLL>.dll command, I get the above framework not found error

Means, I can’t explicitly run dotnet <NAME OF DLL>.dll command on any of my 5 projects deployed

  1. However, Once served via Apache, I can hit 4 URLs and get the site in a browser, That’s strange

What is happening here? Why it’s telling me no framework found?

Reproduction Steps

Install .NET 7 on a Linux VM Publish a dotnet app to it Try running dotnet <NAME OF DLL>.dll

Expected behavior

Should be able to run the program on Linux by running dotnet <NAME OF DLL>.dll command.

Actual behavior

It’s saying the framework is not installed. That’s not true

Regression?

Worked till a few days ago on the same server on the same .NET version.

Known Workarounds

People are suggesting .NET ROOT path issue can cause this

Configuration

.NET 7.0.0 (apps) .NET 7.0.3 (sdk)

Other information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

@sangeethnandakumar thanks for letting us know that it worked. I share your concern about the corruption of the install. That said if it was something regular, we would have seen more reports about it… which I’m not aware of. I’m still curious how come 4 apps worked and 1 didn’t, the missing MIcrosoft.NETCore.App is the runtime, so without it, nothing should run. But I totally understand you don’t want to mess with a production sever more than necessary.

Attaching a video demonstration of the issue mentioned above for brevity & more clarity

YouTube: https://www.youtube.com/watch?v=yJkIasUPWzU