-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Framework Not Detecting On Linux When Executing "dotnet" Command #87704
Comments
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsDescriptionI installed .NET 7.0.3 on my Linux machine. On which, I deployed nearly 5 ASP.NET Core MVC apps made in .NET 7.0.0
What is happening here? Why it's telling me no framework found? Reproduction StepsInstall .NET 7 on a Linux VM Expected behaviorShould be able to run the program on Linux by running Actual behaviorIt'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 WorkaroundsPeople are suggesting .NET ROOT path issue can cause this Configuration.NET 7.0.0 (apps) Other informationNo response
|
It's the same stuff I installed. The ONly difference I saw was my apps are in .NET 7.0.0 while my SDK and runtime are 7.0.7. |
Yes, patch versions should be compatible. How did you install .NET originally? Also, what distro+version? |
You should have both @joeloff who might know which package behaves like this - that is installing only the ASP.NET runtime without its dependencies. |
@NikolaMilosavljevic as an FYI. The SDK packages should include all the runtimes. We do build packages that only contain ASP.NET, but AFAIK, that's only for Windows. I installed Which package feed was used to install the SDK where it only brought in the runtime? |
I think the issue is different
Now the real issue
So I tried executing the same command on already working and deployed apps just to see
You can see ASP.NET Core runtime is installed with Why can't I explicitly start any app using I use Microsoft feed for .NET installation Doesn't install .NET SDK won't install .NET runtime in Linux? |
Attaching a video demonstration of the issue mentioned above for brevity & more clarity |
Is it possible that you published the 4 working apps as standalone apps (they contain the runtime)? If so, combined with a global install that is somehow bad, it would explain things. |
@sangeethnandakumar Your dotnet install is definitely broken/corrupted. How did you install it? |
@danmoseley No brother. All 5 apps are deployed 'Framework Dependant'. It was working fine and started behaving like this one random day. Any chance my issue is related to this : #79237 |
It doesn't seem likely - it would have broken all apps, not just 1 out of 5. Can you go to your
There might be another install of .NET on your machine and the processes under Apache might be using that one. Can you please look for Look in your environment - especially in the Apache server if there's a Try to run the app via the executable from command line - so in one of your examples just Currently I'm thinking these might be two separate problems:
|
Thanks @vitek-karas for the detailed info. As you suggested, I uninstalled the entire SDKs and runtimes and did a fresh install from scratch and all 5 apps starts to work. Now although it works now, I'm concerned with a few things Closing the issue. Thanks for everyone helped |
@sangeethnandakumar thanks for letting us know that it worked. |
@sangeethnandakumar which Ubuntu version are you using? On newer Ubuntu releases, .NET is present in distro-native package feeds. On those systems, users should not configure Microsoft feed (packages.microsoft.com), unless required for specific scenarios. Adding Microsoft feed would cause issues with missing SDKs or runtimes - similar to what you encountered. Here is the issue describing various scenarios and solutions for misconfigured systems: dotnet/core#7699 |
@NikolaMiloavljevic I'm using Ubuntu 22.04 LTS. I believe it's the latest, also I can't control the OS version since the VM is a managed instance from AWS. I faced issues using the native distro feed from Ubuntu while reinstalling this time. This forces the package to be installed only from the Microsoft feed. My runtime installations are right now from the Microsoft feed. I'd set up everything including a backup server connected to a load balancer to redirect traffic in case the issue came back for some time. |
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
dotnet <DLL NAME>.dll
, But this give me the following errordotnet --info
, But that gave medotnet <NAME OF DLL>.dll
command, I get the above framework not found errorMeans, I can't explicitly run
dotnet <NAME OF DLL>.dll
command on any of my 5 projects deployedWhat 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
The text was updated successfully, but these errors were encountered: