private ProjectCompiler RunCode_CompileCode(CompilerProjectReader projectReader, string assemblyFilename, string sourceFile) { ProjectCompiler compiler = new ProjectCompiler(CompilerManager.Current.Win32ResourceCompiler, CompilerManager.Current.ResourceCompiler); //try //{ compiler.SetOutputAssembly(assemblyFilename + ".dll"); //compiler.AddSource(new CompilerFile(sourceFile)); compiler.AddSource(new CompilerFile { File = sourceFile }); //if (projectReader != null) // compiler.SetProjectCompilerFile(projectReader.GetProjectCompilerFile()); // CompilerDefaultValues from runsource.runsource.config.xml runsource.runsource.config.local.xml //compiler.SetParameters(GetRunSourceConfigCompilerDefaultValues(), runCode: true); compiler.SetParameters(projectReader, runCode: true); compiler.SetTarget("library"); CompilerManager.Current.UpdateAssemblies(compiler.Assemblies.Values); compiler.Compile(); return(compiler); }
public GenerateAndExecute(string assemblyFilename) { _assemblyFilename = assemblyFilename; //_nameSpace = __defaultNameSpace; _className = __defaultClassName; _runMethodName = __defaultRunMethodName; _initMethodName = __defaultInitMethodName; _endMethodName = __defaultEndMethodName; _compiler = new ProjectCompiler(); _compiler.SetOutputAssembly(assemblyFilename); }
public GenerateAndExecute(string assemblyFilename) { _assemblyFilename = assemblyFilename; //_nameSpace = __defaultNameSpace; _className = __defaultClassName; _runMethodName = __defaultRunMethodName; _initMethodName = __defaultInitMethodName; _endMethodName = __defaultEndMethodName; _compiler = new ProjectCompiler(); _compiler.SetOutputAssembly(assemblyFilename); }
private ProjectCompiler RunCode_CompileCode(CompilerProjectReader compilerProject, string assemblyFilename, string sourceFile) { ProjectCompiler compiler = new ProjectCompiler(CompilerManager.Current.Win32ResourceCompiler, CompilerManager.Current.ResourceCompiler); //try //{ compiler.SetOutputAssembly(assemblyFilename + ".dll"); compiler.AddSource(new CompilerFile(sourceFile)); if (compilerProject != null) compiler.SetProjectCompilerFile(compilerProject.GetProjectCompilerFile()); // CompilerDefaultValues from runsource.runsource.config.xml runsource.runsource.config.local.xml //compiler.SetParameters(GetRunSourceConfigCompilerDefaultValues(), runCode: true); compiler.SetParameters(compilerProject, runCode: true); compiler.SetTarget("library"); CompilerManager.Current.UpdateAssemblies(compiler.Assemblies.Values); compiler.Compile(); return compiler; }