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
If I check the install status, I can see it is properly installed
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
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-x64Microsoft.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 calledMicrosoft.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.So you need to install correct runtime package from here microsoft .net platform