#region Usings... using System; using System.Collections.Generic; using System.Collections; using System.ComponentModel; using System.Linq; using System.Text; using System.Data; using System.Reflection; using System.IO; using System.CodeDom.Compiler; using Microsoft.CSharp; #endregion namespace Core { /// /// /// public class Script_Compile { /// /// /// public void Script() { CSharpCodeProvider ccp = new CSharpCodeProvider(); ICodeCompiler icc = ccp.CreateCompiler(); string[] ReferanceAssemblies = { "System.dll" }; string BuildName = Environment.CurrentDirectory + "/Scripts.dll"; CompilerParameters cp = new CompilerParameters(ReferanceAssemblies, BuildName); cp.GenerateExecutable = false; cp.GenerateInMemory = false; CompilerResults cr = icc.CompileAssemblyFromSource(cp, Environment.CurrentDirectory + "/Scripts/");; } } }