Get Current Executing assembly’s Directory

Sometimes it becomes necessary to find out the folder where the current executing assembly is running. Using following code snippet, you can get it very easily –

string currentAssemblyDirectoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

2 Responses to “Get Current Executing assembly’s Directory”

  1. Alex Says:

    Thanks that was very helpgul

  2. Andreas Says:

    Hello,

    I’d add the required using declaration

    using System.Reflection;

    Thanks & best regards,
    Andreas

Leave a Reply