[英]How do I get a fully-qualified assembly reference if I only have the class name and dll name?
[英]How to get fully qualified assembly name
是否有任何简单的方法来获得组合的完全限定名称? 例如
<section name="unity" type=" Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
这是来自I Note It Down的无耻复制粘贴,是获取项目输出的FQAN的简单方法:
Open Visual Studio
Go to Tools –> External Tools –> Add
Title: Get Qualified Assembly Name
Command: Powershell.exe
Arguments: -command "[System.Reflection.AssemblyName]::GetAssemblyName(\"$(TargetPath)\").FullName"
Check "Use Output Window".
新工具显示在“ Tools –> Get Qualified Assembly Name
。 选择菜单项后,将在输出窗口中给出程序集名称。
此文章(如何:确定了大会的完全合格的名称)可能会帮助你
来自MSDN的代码
//s if the Fully Qualified assembly name
Type t = typeof(System.Data.DataSet);
string s = t.Assembly.FullName.ToString();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.