EF Bundle (not self contained) on Ubuntu server: 'No frameworks were found'
Installed/Using: .NET SDK Version: 8.0.100-preview.5.23303.2 On my Windows Development PC & on my Ubuntu 22.04 VPS
When it works:
If I publish 'efbundle' as self contained on my Windows 11 PC with
Bundle-Migration -SelfContained -TargetRuntime linux-x64 -force
then upload and run the executable on my Ubuntu 22.04 VPS everything works. It's a great tool!
When it does not work:
If I publish without -SelfContained and try to run it on my Ubuntu VPS this happens:
Command: ./efbundle --verbose
You must install or update .NET to run this application.
App: /home/jack/www/IctzHosted/efbundle
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.0-preview.5.23280.8' (x64)
.NET location: /home/jack/www/IctzHosted/
No frameworks were found.
Learn more:
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-preview.5.23280.8&arch=x64&rid=ubuntu.22.04-x64
But .NET is installed, everything else compiles (Hosted Blazor WASM, YARP, .NET Web APIs)
Command: dotnet --info
.NET SDK:
Version: 8.0.100-preview.5.23303.2
Commit: 3fe444af72
Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: ubuntu.22.04-x64
Base Path: /root/dotnet/sdk/8.0.100-preview.5.23303.2/
.NET workloads installed:
[wasm-tools]
Installation Source: SDK 8.0.100-preview.5
Manifest Version: 8.0.0-preview.5.23280.8/8.0.100-preview.5
Manifest Path: /root/dotnet/sdk-manifests/8.0.100-preview.5/microsoft.net.workload.mono.toolchain.current/WorkloadManifest.json
Install Type: FileBased
[wasm-experimental]
Installation Source: SDK 8.0.100-preview.5
Manifest Version: 8.0.0-preview.5.23280.8/8.0.100-preview.5
Manifest Path: /root/dotnet/sdk-manifests/8.0.100-preview.5/microsoft.net.workload.mono.toolchain.current/WorkloadManifest.json
Install Type: FileBased
Host:
Version: 8.0.0-preview.5.23280.8
Architecture: x64
Commit: bc78804f5d
.NET SDKs installed:
8.0.100-preview.5.23303.2 [/root/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.0-preview.5.23302.2 [/root/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [/root/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/root/dotnet]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
I would like to publish it as not self contained because the executable is in that case +/- 30MB and as self contained +/- 115MB.
There is another (closed) issue here with a similar error: https://github.com/dotnet/efcore/issues/30823, but it offers no solution, so I thought maybe this is a bug?