ILMerge:重命名内在组件“的命名空间? [英] ILMerge: Rename internalized assemblies' namespaces?

查看:186
本文介绍了ILMerge:重命名内在组件“的命名空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,假设我想使用充气城堡在我的DLL。因为我想简化部署,我使用ILMerge结合 MYDLL.DLL BouncyCastle.Crypto.dll 制作 MyDllMerged.dll 。我用的是 /内在标志ILMerge,这样客户端不使用我的充气城堡。

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.

如果我消费 EndUser.exe 还采用了充气城堡,他将看到 Org.BouncyCastle ... TypeFoo MyDllMerged.dll 。因此,他是注定的,不能用他的图书馆自己。

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.

反正是有告诉ILMerge重命名所有的命名空间中的组件,除了内在呢?或者有什么其他的方法来解决这个问题? (我想的没有的有单独分发的合并版和未合并的版本。)

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.)

推荐答案

一种方法是使用混淆(SmartAssembly,Dotfuscator等)混淆了生产组装的只是Org.BouncyCastle命名空间。

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

这篇关于ILMerge:重命名内在组件“的命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆