什么是强命名以及如何强名称的二进制?

什么是强命名以及如何强名称的二进制?

问题描述:

我听到的地方,我需要强大的名字我的二进制文件之前,我分发。任何想法这是什么?

I heard somewhere that I need to strong name my binaries before I distribute them. Any ideas what this is?

埃里克利珀公布有关强签名程序集最近:

Eric Lippert posted about strong signing assemblies recently:

强名称的目的完全是为了确保当你通过名称加载程序集,要装载完全组装你以为你是装。你说:我想加载Frobber,4版本,来自FooCorp。强名称齿轮确保您实际加载precisely该DLL,而不是所谓的Frobber另一个程序集,第4版,即来自邪恶博士的企业。然后,您可以设置安全策略,它说:如果我有一个从FooCorp组装我的机器上,完全信任它。这些方案是唯一通过设计用途的强名称。

The purpose of a strong name is solely to ensure that when you load an assembly by name, you are loading exactly the assembly you think you are loading. You say "I want to load Frobber, version 4, that came from FooCorp". The strong name gear ensures that you actually load precisely that DLL, and not another assembly called Frobber, version 4, that came from Dr. Evil Enterprises. You can then set security policy which says "if I have an assembly from FooCorp on my machine, fully trust it." These scenarios are the only by-design purposes of strong names.