开发者

ILMerge: Rename internalized assemblies' namespaces?

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.开发者_如何学Go..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.)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜