It immediately adds some size to the output but you can mitigate it with AOT and trimming.
It immediately adds some size to the output but you can mitigate it with AOT and trimming.
And naturally single-file + trimmed works almost everywhere, in some situations requiring to add attribute annotations for un-analyzable reflection usage patterns.
"Only managed DLLs are bundled with the app into a single executable. When the app starts, the managed DLLs are extracted and loaded in memory, avoiding the extraction to a folder. With this approach, the managed binaries are embedded in the single file bundle, but the native binaries of the core runtime itself are separate files."
https://learn.microsoft.com/en-us/dotnet/core/deploying/sing...
For """embedding""" native dependencies into the binary without self-extract, you can't really do that, the closest alternative is statically linking them into AOT compilation instead (but that gets tricky with large dependencies).