ILMerge: Rename internalized assemblies' namespaces?

断了今生、忘了曾经 提交于 2019-12-12 15:24:23

问题


For example, let's say I want to use Bouncy Castle in my DLL. Since I want to ease deployment, I use ILMerge to combine MyDll.dll and BouncyCastle.Crypto.dll to produce MyDllMerged.dll. I use the /internalize flag in ILMerge so that clients do not use my Bouncy Castle.

If my consumer EndUser.exe also uses Bouncy Castle, he'll see that "Org.BouncyCastle...TypeFoo is already defined in MyDllMerged.dll". Therefore, he is doomed and cannot use his that library himself.

Is there anyway to tell ILMerge to rename all namespace in an assembly, in addition to internalizing it? Or any other ways to solve this problem? (I'd like not to have to distribute the "merged" version and "unmerged" version separately.)


回答1:


One way would be to use an obfuscator (SmartAssembly, Dotfuscator, etc) to obfuscate just the Org.BouncyCastle namespace of the produced assembly.



来源:https://stackoverflow.com/questions/4830066/ilmerge-rename-internalized-assemblies-namespaces

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!