All pastes #944614 Raw Edit

Something

public text v1 · immutable
·published 2008-03-16 07:32 UTC
rendered paste body
#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
{
    /// <summary>
    /// 
    /// </summary>
    public class Script_Compile
    {
        /// <summary>
        /// 
        /// </summary>
        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/");;             
        }
    }
}