I\'m developing a console
application that is supposed to run under WinCE 6.0
and WinCE 7.0
. I\'m using C#
, Compact Fra
Try calling Application.Exit
This works in windowed applications, and may force the console window to close.
Are you putting you .exe file in Arguments
property of ProcessStartInfo
?
If you must do that, I believe that you're using CMD in FileName
property, so you must use /K
before your .exe name.
Or just put in FileName
the .exe path.
You can clarify a lot if you put the code that calls your application.
Try this:
Tools > Options > Debugging > Automatically Close the Console When Debugging Stops
try this code:
Environment.Exit(0);
I had exactly the same problem. Running console app on Beckhoff PLC which never closed.
Instead of creating Console app I created Windows App. My code stayed the same as for console app. I just commented out:
// Application.Run(new Form1());
Seems now codes run without opening a form.