Compile WinExe with CodeDom [solved]
I saw a codedom tutorial for compiling a console application
but then i tried changing the source code to a windows forms
Works fine except when i execute it , it runs with a console application
same happens when u code a windows forms application and change the output type
but i can't find any similar property or method , is there a way to do that?
You need to set the compiler option that sets it to windows executable:
[highlight=vb]Dim CProvider = CodeDomProvider.CreateProvider("VisualBasic")
Dim params As New CompilerParameters()
params.CompilerOptions = "/t:winexe"
CProvider.CompileAssemblyFromSource(params,sourceC odeToCompile)[/highlight]