Introduction
In this article we will learn how to determine the public key token of a DLL that we add as a reference to our project. I hope you will like it.
Background
Today I was trying to determine a public key of a DLL that I added to my MVC project. I learned that we can determine this by using our Visual Studio itself. Here I am sharing that information and will use Visual Studio 2012.
Using the code
To determine the DLL information, you need to run your project, since this process will work only in debug mode. You need to put a breakpoint somewhere in your cs page.
And when the break hits, you need to go to the immediate window by pressing Alt+Ctrl+I.
Now a window will open, there you need to type the following:
- ?System.Reflection.Assembly.LoadFile(@"C:\SVenu\TestApp\TestApp\bin\CellSetGrid2.dll").FullName
Then you can see the output in the immediate window as follows:

If you are not in debug mode or you are in design mode, you will get a warning as follows.
“The expression cannot be evaluated while in design mode.”

You can always check the entire details of the DLL by giving the following command.
- ?System.Reflection.Assembly.LoadFile(@"C:\SVenu\TestApp\TestApp\bin\CellSetGrid2.dll")
Then you can see the output in the immediate window as follows.

Please note that the output given here will be different depending on your DLL.
Conclusion
That is all. I hope you liked this article. Please share me your feedback.

Santhakumar MunuswamyPosted Jul 16, 2015, 3:53 PM
Nice Article! Thanks for sharing
Sibeesh VenuPosted Jul 16, 2015, 1:15 PM
Narasimha Reddy Chennupalli thank you
Narasimha Reddy ChennupalliPosted Jul 16, 2015, 8:50 AM
Nice one..
Sibeesh VenuPosted Jul 16, 2015, 12:41 AM
Sathish Kumar Yes. We can find out using SN.exe also
Sibeesh VenuPosted Jul 16, 2015, 12:40 AM
Gopi Chand Thank you
Sathish KumarPosted Jul 15, 2015, 9:28 PM
Hi sibeesh, thanks for sharing us. I hope using the SN.exe also able to find out the public key token.
Gopi ChandPosted Jul 15, 2015, 12:39 PM
Nice
Sibeesh VenuPosted Jul 15, 2015, 8:42 AM
Rakesh Chavda Thank you
Sibeesh VenuPosted Jul 15, 2015, 8:42 AM
Nilesh Jadav Thank you
RakeshPosted Jul 15, 2015, 7:50 AM
Good one
Nilesh JadavPosted Jul 15, 2015, 6:45 AM
Nice one sir !