问题是通知过滤器。该程序试图打开一个仍在复制的文件。我删除了除LastWrite之外的所有通知过滤器。
private void watch(){ FileSystemWatcher watcher = new FileSystemWatcher(); watcher.Path = path; watcher.NotifyFilter = NotifyFilters.LastWrite; watcher.Filter = "*.*"; watcher.Changed += new FileSystemEventHandler(OnChanged); watcher.EnableRaisingEvents = true;}


