Solution 1:
var path = AppDomain.CurrentDomain.BaseDirectory;
Solution 2:
var fullCurrentAssemblyPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
var path = Path.GetDirectoryName(fullCurrentAssemblyPath);
Solution 3:
var codeBase = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
var uri = new UriBuilder(codeBase);
var path = Path.GetDirectoryName(Uri.UnescapeDataString(uri.Path));
Solution 4:
var filePath = new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath;
var path = Path.GetDirectoryName(filePath);
Solution 5:
var path = Environment.CurrentDirectory;
Hope this helps