I've a project that runs perfectly as "Framework-Dependent Single-File" on Linux-x64, and also as a "Self-Contained" application.
But when I compile as "Self-Contained Single-File", the Visual Studio 2022 (17.1.2) creates a file without any extension (exe or dll), and I cannot run it anyway on Ubuntu 21.x.
When I call it, I always get an "invalid application" error. I tried:
- dotnet myproject
- dotnet myproject.dll (adding the DLL extension manually before the call)
- dotnet myproject.exe (adding the EXE extension manually before the call)
Is there something I could be doing wrong?
I appreciate any help you can provide.
As Heretic Monkey stated, you need to run it with
./
NAMEAlso you need to make sure that the user has Execute permissions for that file. See chown/chmod