问题描述
什么是找到一个组件的公钥标记最简单的方法?
What is the simplest way to find the Public Key Token of an assembly?
我能想到的最简单的方法将是一个简单的单击鼠标右键,得到的公钥,但这fonctionnality是不存在的,也许有一个VS扩展为。
The simplest way i can think of would be a simple right-click, get public key, but this fonctionnality isn't there, maybe there is a VS Extension for that.
我使用的是VS2010,如果可以延期办理
I'm using VS2010, if an extension is available
推荐答案
打开命令提示符,然后键入:
Open a command prompt and type:
"%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\sn.exe" -T <assemblyname>
或者如果你有VS 2010
or if you have VS 2010
"%ProgramFiles%\Microsoft SDKs\Windows\v7.0A\bin\sn.exe" -T <assemblyname>
其中&lt;&的AssemblyName GT;是一个完整的文件路径,你有兴趣在装配时,用引号引起来,如果有空格。
where <assemblyname> is a full file path to the assembly you're interested in, surrounded by quotes if it has spaces.
您可以添加此作为VS外部工具,如下所示:http://blogs.msdn.com/b/miah/archive/2008/02/19/visual-studio-tip-get-public-key-token-for-a-stong-named-assembly.aspx
You can add this as an external tool in VS, as shown here:http://blogs.msdn.com/b/miah/archive/2008/02/19/visual-studio-tip-get-public-key-token-for-a-stong-named-assembly.aspx
这篇关于获得.NET程序集的公钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!