如何将 .net 程序集的清单设为私有?
如果我想发布 .net 程序集,但希望在清单中保留其内部详细信息(通过诸如 ildasm.exe) ?
What should I do if I want to release a .net assembly but wish to keep its internals detailed in the manifest private (from a utility such as ildasm.exe) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CLR 无法直接加载不包含清单的模块。 因此,除非您还想让程序集可卸载,否则您不能将其设置为完全私有;)
但是,正如马克上面提到的,您可以使用混淆工具来隐藏您想要真正保留在内部的部分。
太糟糕了 internal 关键字不排除该元数据
编辑:它看起来像 这个问题高度相关
The CLR cannot directly load modules that contain no manifest. So you can't make an assembly completely private unless you also want to make it unloadable ;)
You can however, as Mark noted above, use obfuscation tools to hide the parts you would like to keep truly internal.
It's too bad the internal keyword doesn't exclude that metadata
EDIT: it looks like this question is highly related
我认为你所说的是“混淆”。
网上有很多关于它的文章:
http://en.wikipedia.org/wiki/Obfuscation< /a>
.NET 上的混淆“标准”工具由 Preemptive Solutions 提供:
http://www.preemptive .com/obfuscator.html
他们有一个随 Visual Studio 一起提供的社区版本,您可以使用它。
您提到了 ILDasm,您看过 .NET Reflector 吗?
http://aisto.com/roeder/dotnet/
它让您更好地了解什么人们可以看到您是否发布清单!
I think what you're talking about is "obfuscation".
There are lots of articles about it on the net:
http://en.wikipedia.org/wiki/Obfuscation
The "standard" tool for obfuscation on .NET is by Preemptive Solutions:
http://www.preemptive.com/obfuscator.html
They have a community edition that ships with Visual Studio which you can use.
You mentioned ILDasm, have you looked at the .NET Reflector?
http://aisto.com/roeder/dotnet/
It gives you an even better idea as to what people can see if you release a manifest!