var codebase = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
var path = Path.GetDirectoryName(codebase);
It does work on windows. On mono version 4.2.1 the result is:
codebase: file:///home/...
path: file:/home/...
Is this a bug, or am I doing something wrong?