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]
Check if you have a remnant hostfxr.dll file in your target deployment directory by any chance - that caused the same problem for us.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With