skip to Main Content

I installed .NET 7.0.3 on my Linux Server.

I also deployed a few MVC websites in .NET 7.0.0 behind an Apache reverse proxy.

But when I run dotnet <DLL NAME>.dll, It is saying it can’t find a framework

enter image description here

If I check the install status, I can see it is properly installed

enter image description here

The fun thing is, While I was unable to run any of my ASP.NET Core app using dotnet <DLL NAME>.dll command,

If I hit URL in a browser, Apache is able to proxy to it and I can see the website content. Why this is happening?

2

Answers


  1. You have the .NET CLI installed, but that’s not the only thing you need to run .NET binaries.

    dotnet --info is telling us you don’t have any runtimes or SDKs installed. At a minimum you need to install the .NET 7.0.0 Runtime using the link provided to you in the error message: https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=ubuntu.22.04-x64

    Login or Signup to reply.
  2. Microsoft.AspNetCore.App is not the .net core runtime. It is a metadata package for .net core runtime libraries. So you are missing actual runtime library which should called Microsoft.NETCore.App.

    When you run the the dotnet --list-runtimes you need to see following output. In your case only the first one (metadata package) will be available.

    Microsoft.AspNetCore.App 7.0.7 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
    Microsoft.NETCore.App 7.0.7 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
    

    So you need to install correct runtime package from here microsoft .net platform

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search