2 ms·
You have to set up "dotnet publish" for the project that makes the executable. It then makes a stub loader "your program.exe" which looks and behaves normally.
by pjc50 6y ago
You have to set up "dotnet publish" for the project that makes the executable.
It then makes a stub loader "your program.exe" which looks and behaves normally. You can then make it "self contained", which bundles the assemblies for you and transparently unpacks them.
You can have different publish profiles for the different targets.
- benaadams 6y ago.NET 5.0 can now create true single file that doesn't need any unpacking on first run (except on Windows where the Jit and GC dlls will live or be unpacked separately; but that should be resolved in .NET 6.0)