I'm not certain why you'd get that behavior, but I can hazard a guess that the OS is dispatching the file notification messages only to the active application.
The SDF's FileSystemWatcher
is dependent on the application message pump to operate because it uses the aygshell APIs under the hood, and aygshell uses Windows messages for dispatching (Microsoft's choice, not mine). I didn't like that for several reasons, so I wrote an alternative called the FileSystemMonitor
that you'll find in the same namespace and DLL and the FileSystemWatcher
. IIRC, it doesn't work 100% identical but I made it as close as possible given the file system APIs that I had to work with.