Friday, August 29, 2008

How to Get Calling Assembly

I work on a product which has more than 80 assemblies call around each other. We have build with pdb file specially distributed to developers for debugging purpose but all are not so fortunate :)
It is obvious that you cannot be sure about which assembly you will need to compile in order to get full call stack. But with : System.Reflection.Assembly.GetCallingAssembly()

This way you get the calling assembly so you can compile that assembly. There are a lot of goodies to explore in System.Reflection.Assembly class for debugging.

Happy Debugging!!

No comments: