- try
- {
- // *** Generate dynamic compiler
- Dictionary<string, string> loCompilerOptions = new Dictionary<string, string>();
- loCompilerOptions.Add("CompilerVersion", "v3.5");
- CSharpCodeProvider loCompiler = new CSharpCodeProvider(loCompilerOptions);
- CompilerParameters loParameters = new CompilerParameters();
-
- // *** Start by adding any referenced assemblies
- loParameters.ReferencedAssemblies.Add("OpenMetaverse.StructuredData.dll");
- loParameters.ReferencedAssemblies.Add("OpenMetaverseTypes.dll");
- loParameters.ReferencedAssemblies.Add("OpenMetaverse.dll");
- loParameters.ReferencedAssemblies.Add("Radegast.exe");
- loParameters.ReferencedAssemblies.Add("System.dll");
- loParameters.ReferencedAssemblies.Add("System.Core.dll");
- loParameters.ReferencedAssemblies.Add("System.Drawing.dll");
- loParameters.ReferencedAssemblies.Add("System.Windows.Forms.dll");
-
- // *** Load the resulting assembly into memory
- loParameters.GenerateInMemory = true;
- loParameters.GenerateExecutable = false;
-
- // *** Now compile the whole thing
- CompilerResults loCompiled =
- loCompiler.CompileAssemblyFromSource(loParameters, code);
-
- // *** Check for compilation erros
- if (loCompiled.Errors.HasErrors)
- {
- string lcErrorMsg = "";
- lcErrorMsg = "Compilation failed: " + loCompiled.Errors.Count.ToString() + " errors:";
+ // *** Generate dynamic compiler
+ Dictionary<string, string> loCompilerOptions = new Dictionary<string, string>();
+ loCompilerOptions.Add("CompilerVersion", "v3.5");
+ CSharpCodeProvider loCompiler = new CSharpCodeProvider(loCompilerOptions);
+ CompilerParameters loParameters = new CompilerParameters();