public static int Main(string[] args){
AppDomainSetup setup = new AppDomainSetup();
// fusion settings
setup.PrivateBinPath = "";
setup.PrivateBinPathProbe = "*"; // disable loading from app base
try {
AppDomain appDomain = null;
Evidence evidence = new Evidence(AppDomain.CurrentDomain.Evidence);
appDomain = AppDomain.CreateDomain("Compiler", evidence, setup);
JScriptCompiler jsc = (JScriptCompiler)(appDomain.CreateInstance(
Assembly.GetAssembly(typeof(JScriptCompiler)).FullName, "JScriptCompiler").Unwrap());
return jsc.Run(args);
}
catch (Exception e) {
Console.WriteLine(JScriptCompiler.Localize("INTERNAL COMPILER ERROR", e.Message));
return 10;
}
catch {
Console.WriteLine(JScriptCompiler.Localize("INTERNAL COMPILER ERROR"));
return 10;
}
}
}