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/");