Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Framework dependent .NET8 app: No frameworks were found

Tags:

c#

.net

.net-core

After upgrading our application from .NET7 to .NET8 I get the following error when trying to run the published application: You must install or update .NET to run this application.

The application is published as framework dependent win-x64. I installed .NET8 runtime & SDKS.

If you take a look at the .NET location it tries to look for .NET in a path local to my application and not in C:\Program Files\dotnet

Does anyone know what changed here from .NET 7 to 8 or how to fix this?

F:\myapp>MyApp.exe

You must install or update .NET to run this application.

App: F:\myapp\MyApp.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: F:\myapp\

No frameworks were found.

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=win10-x64

dotnet --list-runtimes

Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
like image 414
coalmee Avatar asked Feb 23 '26 04:02

coalmee


1 Answers

Check if you have a remnant hostfxr.dll file in your target deployment directory by any chance - that caused the same problem for us.

like image 172
e-master Avatar answered Feb 24 '26 19:02

e-master