Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does my C# program pause so often when running from the Windows 7 command line?

I've had this problem with several different C# apps. These are all utility programs I've written to make my life as a sysadmin easier. Things like migrating data between database servers.

They print their current step to the console (old versions through System.Console.WriteLine(), newer ones through log4net's ConsoleAppender), so I always run them from a command prompt. When doing so, they often seem to pause at random intervals until I hit enter a few times. I notice they're paused because a step that usually takes a second or two has been on the screen for a long time. After hitting enter, things start processing normally again for a while.

Why is this? How can I fix it?

like image 714
sh-beta Avatar asked Jan 19 '23 02:01

sh-beta


1 Answers

If you select text on the command window screen using the mouse, it often pauses execution of the program that is running. You might be accidentally creating a text selection when clicking on the window with the mouse.

like image 109
RobSiklos Avatar answered Jan 29 '23 13:01

RobSiklos