简体   繁体   English

如何获得完全限定的程序集名称

[英]How to get fully qualified assembly name

is there any easy way to get the fully qualified name for assembbly? 是否有任何简单的方法来获得组合的完全限定名称? eg 例如

<section name="unity" type=" Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration, Version=2.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

This is a shameless copy-paste from I Note It Down and is a simple way to get the FQAN for the project output: 这是来自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".

The new tool appears under Tools –> Get Qualified Assembly Name . 新工具显示在“ Tools –> Get Qualified Assembly Name When the menu item is selected, the assembly name is given in the output window. 选择菜单项后,将在输出窗口中给出程序集名称。

This article (How to: Determine an Assembly's Fully Qualified Name ) will probably help you 文章(如何:确定了大会的完全合格的名称)可能会帮助你


Code from MSDN 来自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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM