- static CSharpCodeCompiler ()
- {
- if (Path.DirectorySeparatorChar == '\\') {
- PropertyInfo gac = typeof (Environment).GetProperty ("GacPath", BindingFlags.Static|BindingFlags.NonPublic);
- MethodInfo get_gac = gac.GetGetMethod (true);
- string p = Path.GetDirectoryName (
- (string) get_gac.Invoke (null, null));
- windowsMonoPath = Path.Combine (
- Path.GetDirectoryName (
- Path.GetDirectoryName (p)),
- "bin\\mono.bat");
- if (!File.Exists (windowsMonoPath))
- windowsMonoPath = Path.Combine (
- Path.GetDirectoryName (
- Path.GetDirectoryName (p)),
- "bin\\mono.exe");
- if (!File.Exists (windowsMonoPath))
- windowsMonoPath = Path.Combine (
- Path.GetDirectoryName (
- Path.GetDirectoryName (
- Path.GetDirectoryName (p))),
- "mono\\mono\\mini\\mono.exe");
- if (!File.Exists (windowsMonoPath))
- throw new FileNotFoundException ("Windows mono path not found: " + windowsMonoPath);
-
- windowsMcsPath = Path.Combine (p, "4.5\\mcs.exe");
- if (!File.Exists (windowsMcsPath))
- windowsMcsPath = Path.Combine(Path.GetDirectoryName (p), "lib\\build\\mcs.exe");
-
- if (!File.Exists (windowsMcsPath))
- throw new FileNotFoundException ("Windows mcs path not found: " + windowsMcsPath);
- }
- }
-