如何获得完全限定的程序集名称
本文关键字:程序集 何获得 | 更新日期: 2023-09-27 18:06:45
是否有任何简单的方法来获得程序集的完全限定名称?例如
<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();