Click here to Skip to main content
15,883,744 members
Articles / Programming Languages / ASM
Tip/Trick

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

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
23 Mar 2012CPOL 22.5K   2  
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) 

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

And that's what made my life easy.  

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Siemens
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --