‘Impaled by my own sword’, ‘shot myself in the foot’ would be some fine explanations for this exception. Ages ago, I checked ‘break on first chance exception’ for Debug > Exceptions > System.IO.FileNotFoundException. Then, I spent 30 minutes wondering and arguing with others why there was this exception when my code was doing exactly what it should have been doing and nothing changed.
It was long before I remembered to check this setting. So, next time you are bitten by some unexplained exception better see if it is a first chance catch and whether you are catching it as such. Setting is global in VS and persists across projects.
Leave a Reply