This is just one of the compilation options. Creating a console is just an optional but not alternative to the Windows Application. There are two options in both C# and VB.NET compilers: "/target:winexe" or "/target:exe". The first one does not really instruct a compiler about anything related to Windows application (how could it possibly do it? there is no such thing as "windows", there are
System.Windows.Forms
, WPF and could be anything else). It simply says "do not create a default console". And the second option enables the console. Probably you got it by default.
So, one real problem is not quite clear terminology used by Microsoft in compilation options.
You need to use the first option using the string property
System.CodeDom.Compiler.CompilerParameters. CompilerOptions
, see
http://msdn.microsoft.com/en-us/library/system.codedom.compiler.compilerparameters.aspx[
^].
—SA