0

I have a hybrid app which basically only shows the available commandline modifiers when started from the command prompt. There is then no windows Application code involved or initialized. If started from the commandline I try to attach the console to have ability for seeing output via Console.Writeline. I have now a "--help" command which only prints out the available commands and then exits the application. Basically nothing from the WinForm application is executed or initialized at this stage. The output to the console works fine, however the process is terminated as seen e.g. ProcMon, but I have to hit "Enter" to get the commandline prompt back. I use "FreeConsole", Environment.Exit, Application.Exit or the simple direct "return Exitcode", but it still waits for an "Enter" char until the prompt is back. I'm very sure the process is terminated as I can see the termination in ProcMon. What can be the cause for this behaviour ? I'm also using the log4net ColoredConsoleAppender whose output could be seen, but I meanwhile removed it from the configuration to have no interference here. This didn't changed also the described behaviour.

Florian Storck
  • 509
  • 8
  • 22

0 Answers0