Background: I am struggling to add command line and batch processing capabilities to an existing WPF Windows Application. When I detect some options at startup I su
In the project properties, you can change the project type from a Windows application to a Console application, and AFAIK the only difference is that you get a console to use throughout the application's lifetime. I haven't tried it with WPF though.
If you want to open and close a console, you should use Alloc/FreeConsole, but it is usually simpler to change the project type.