title: C# Compiler and Windows.Forms
body: <p>I've just created a little app that programmatically compiles code using the C# Compiler, and it works brilliantly. But, one thing that I need it to do is compile Windows.Forms code. Like, I can create a console app with it, but I can't create a GUI-based form. Here's the link that got me started:</p>
  
  <p><a href="http://support.microsoft.com/kb/304655" rel="nofollow noreferrer">http://support.microsoft.com/kb/304655</a></p>
  
  <p>Can somebody please help?</p>
  
  <p>Thank you :)</p>
  
  <p><b>update</b></p>
  
  <pre><code>using System;
  using System.Collections;
  using System.ComponentModel;
  using System.ComponentModel.Design;
  using System.Diagnostics;
  using System.Drawing.Design;
  using System.Windows.Forms;
  using System.Windows.Forms.Design;
  
  namespace WindowsFormsApplication1
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              MessageBox.Show("hi jason");
          }
      }
  }
  </code></pre>
  
  <p>The above code is what I type into my application. And when I try to compile this code, my application gives me heaps of errors, and does not produce an exe (obviously). But, my application always successfully compiles straightup console apps...</p>