3 ms·
This is a little out of date; the .NET single-file situation is pretty good as of .NET 5 (which came out in 2020). These days, if you publish a single-file app
by ripley12 5y ago
This is a little out of date; the .NET single-file situation is pretty good as of .NET 5 (which came out in 2020).
These days, if you publish a single-file app all .NET libraries live in the executable and do not need to be unpacked at runtime. Native libraries still need to get unpacked at runtime (if your application uses any; many don't), but you just set the IncludeNativeLibrariesForSelfExtract build property and everything else happens automatically for you.
I'm working on getting IncludeNativeLibrariesForSelfExtract set by default, upvote here if you think that's a good idea: https://github.com/dotnet/sdk/issues/24181 https://github.com/dotnet/sdk/issues/24181