简体   繁体   中英

How to hide all of dll files in C# .exe project

I created an .exe project from C# project. It has a lot of DLL files. How can I hide this files or embed into project? Because, I don't want to be seen DLLs that I've used.

Thanks in advance.

Edit : Some of DLLs are mine, some of not mine, They are third party DLLS.

You can use ILMerge, a utility from Microsoft to merge assemblies into a single assembly (.EXE).

Find out more at http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx

If, however, you have a WPF project, the recommended alternative is to embed the referenced assemblies as resources and to load them as necessary. You can find out more about that approach at Jeffrey Richter's blog at http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx .

Integrate the Code from the DLLS as a part of the EXE in your project.

Alternatively you can try ILMerge :

ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly. ILMerge takes a set of input assemblies and merges them into one target assembly. The first assembly in the list of input assemblies is the primary assembly. When the primary assembly is an executable, then the target assembly is created as an executable with the same entry point as the primary assembly. Also, if the primary assembly has a strong name, and a .snk file is provided, then the target assembly is re-signed with the specified key so that it also has a strong name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM