title: FileSystemWatcher causes crash to desktop
body: <p>I'm writing a solution where I use some configuration files that should be editable at runtime. I've been using <code>FileSystemWatcher</code> for this purpose before and never had much issues with it but now it's causing a CTD on the 'rename' event.</p>
  
  <p>This (useless) piece of code will recreate the problem in my setup:</p>
  
  <pre><code>private static int _s_renamed;
  private static int _s_created;
  private static int _s_errors;
  
  private static void monitorConfiguration(string configRootFolder)
  {
      var fsw = new FileSystemWatcher(configRootFolder, ConfigFilePattern)
      {
          NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName,
          IncludeSubdirectories = false
      };
      fsw.Renamed += (sender, args) =&gt; ++_s_renamed; // &lt;-- ! CTD efter this one !
      fsw.Created += (sender, args) =&gt; ++_s_created;
      fsw.Error += (sender, args) =&gt; ++_s_errors; 
      fsw.EnableRaisingEvents = true;
  }
  </code></pre>
  
  <p>The crash comes from <code>FileSystemWatcher</code> it seems. If I set a breakpoint in the event handler for <code>FileSystemWatcher.Renamed</code> it gets hit but the app crashes when I step out of it. If I set a breakpoint in the <code>FileSystemWatcher.Created</code> event handler this does not happen.</p>
  
  <p>Any suggestions?</p>
  
  <hr>
  
  <p>EDIT 1:
  I'm running .NET 4 on a Windows 7 x64 (Ultimate) platform
  I have seen several discussions concerning this type of problems but all has been related to people trying to update UI stuff (which must be done from the main/UI thread) from the event handlers. That's why I just try to increment some counters in the experimental code.</p>