- Assembly [] assemblies = AppDomain.CurrentDomain.GetAssemblies ();
-
- foreach (Assembly a in assemblies){
- string codebase = a.Location;
- string fn = System.IO.Path.GetFileName (codebase);
- if (fn == "corlib.dll" || fn == "mscorlib.dll"){
- return codebase.Substring (0, codebase.LastIndexOf (System.IO.Path.DirectorySeparatorChar));
- }
- }
-
- Report.Error (-15, "Can not compute my system path");
- return "";