Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Get Assembly full name from Visual Studio (VersionNo, Culture, PublickeyToken)

0.00/5 (No votes)
23 Mar 2012 1  
Getting Assembly full name from Visual Studio

Introduction

This tip helped me to save a lot time, while I was trying to find an assemblies full name. 

Background 

I was learning Unity 2.1. This IOC Container can be configured ( the mapping, life time etc) declaratively using application configuration file. I was just doing the same as mentioned in Microsoft Enterprise Library Hands on Lab (Lab 03). In that lab you need to include a configsection for unity configuration, where the assembly full name (ie, assembly name, version, culture, publicKeyToken) was not mentioned properly and as a result I was getting assembly load exception. After searching for at least 2 hrs, I opened up VS 2010 to create a solution for that (by code :)). But, when I saw System.Runtime.Assembly class, I simple but effective idea came into my mind. Why not to use Visual Studios own power rather than creating a new application. So I opened the Immediate Window of Visual Studio and written the following command. 

Using the code 

Open Visual Studio, and then open the Immediate Window (Alt + Ctrl + i) 

?System.Reflection.Assembly.LoadFile(@"C:\Path\Microsoft.Practices.Unity.Configuration.dll").FullName  

And that's what made my life easy.  

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here