what is the best way to embed all of this .dll from system.text.json into my final .exe file?
Asked
Active
Viewed 365 times
-1
-
You should use install shield application to zip all files in one exe file. – Musulmon Aug 26 '20 at 04:05
-
Do you mean you want to fuse DLLs _into_ the .EXE so that there is only one file or are you talking about creating a _self-executing_ installer? – Aug 26 '20 at 04:08
-
yes @MickyD I want to merge them into one file – zacky Aug 26 '20 at 04:12
-
Possible duplicate: https://stackoverflow.com/questions/126611/can-a-net-windows-application-be-compressed-into-a-single-exe – Leandro Aug 26 '20 at 13:59
1 Answers
1
With .NET Core 3, you can use <PublishSingleFile>
in your .csproj to create a single executable. You can also use <PublishTrimmed>
to reduce the size of the executable by only including what your application actually uses.
https://www.hanselman.com/blog/MakingATinyNETCore30EntirelySelfcontainedSingleExecutable.aspx
If you're on .NET Framework, you can use ILMerge.

Eric J.
- 147,927
- 63
- 340
- 553