FileSystemWatcher & Visual Studio 2005
Okay, I've this very strange bug. I got an application that watch over a folder for changes in the files. When I edit the files in Visual Studio 2005, the application doesn't do anything. But when I edit the file in notepad, the change event is fired and everything is fine. Anyone knows what is going on there?
Here is sample code the shows the problem:
- 
import System
 - 
import System.IO
 - 
 - 
class Bug:
 - 
watch as FileSystemWatcher
 - 
 - 
def StartWatching():
 - 
watcher = FileSystemWatcher("""C:\Test""", Filter: "*.*")
 - 
watcher.Changed += def(source, e as FileSystemEventArgs):
 - 
print "${e.FullName} has changed ${DateTime.Now}"
 - 
watcher.EnableRaisingEvents = true;
 - 
print "Watching..."
 - 
 - 
Bug().StartWatching.BeginInvoke()
 - 
 - 
Console.Read()
 

Comments
Comment preview