I have a program that opens an Excel COM object, does some stuff, and closes it. Then I want to move that file after it's closed. This works fine if I run the program without break points. But, if I step into something in debug mode before I attempt to move the file I get an IOException: "The process cannot access the file because it is being used by another process."
So what's the deal? Is garbage collection performing better while a program is allowed to run at full speed as opposed to while I am stepping through it? Is stepping through my code doing more than just very slowly running it? Are there other consequences to the debug mode? Other errors that are encountered simply because I am in debug and not running an exe?