To Create an Executable Your code must have an Entry Point Method declared and set properly to run in CodeDom. I do not see one declared in your example above. Below I have an example from MSDN located at
http://msdn.microsoft.com/en-us/library/y2k85ax6.aspx
CodeEntryPointMethod start = new CodeEntryPointMethod();
CodeMethodInvokeExpression cs1 = new CodeMethodInvokeExpression(
new CodeTypeReferenceExpression("System.Console"),
"WriteLine", new CodePrimitiveExpression("Hello World!"));
start.Statements.Add(cs1);