简体   繁体   中英

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:

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 . 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

//s if the Fully Qualified assembly name
Type t = typeof(System.Data.DataSet);
string s = t.Assembly.FullName.ToString();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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