Aug 24, 2012

How to get the full path of an Assembly in C# ?


Following are the way to get the physical path of an assembly.

string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
or
string = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);

No comments: