Skip to content

Instantly share code, notes, and snippets.

@robertstefan
Created September 22, 2015 17:37
Show Gist options
  • Save robertstefan/2de9b97c01a4189cf523 to your computer and use it in GitHub Desktop.
Save robertstefan/2de9b97c01a4189cf523 to your computer and use it in GitHub Desktop.
Get current running folder path
public static string AssemblyDirectory
{
get
{
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
UriBuilder uri = new UriBuilder(codeBase);
string path = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(path);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment