This is a mirror of official site: http://jasper-net.blogspot.com/

C# Compiler

| Wednesday, October 20, 2004
Заначка для своего собственного C# компилятора

private CompilerResults Compile()
{
   CodeDomProvider provider = new CSharpCodeProvider();
   ICodeCompiler compiler = provider.CreateCompiler();
   CompilerParameters parameters = new CompilerParameters();
   parameters.WarningLevel = 4;
   parameters.GenerateInMemory = true;
   parameters.GenerateExecutable = false;
   parameters.ReferencedAssemblies.Add("System.Web.Services.dll");
   parameters.ReferencedAssemblies.Add("System.Xml.dll");
   parameters.ReferencedAssemblies.Add("System.dll");
   return compiler.CompileAssemblyFromSource(parameters, textBoxSource.Text);
}

0 comments: