Running latest Visual Studio Community on Win10 20H2.
I'm working on a C# winforms desktop app which monitors some local drive properties and displays a status message. If a drive selected for monitoring is missing an error message is displayed providing the user an option to plugin missing drives than rerun analysis.
System.IO.DriveInfo is used to detect available drives. Data is saved/accessed with CSV files. For testing I unplug/plug-in a USB drive.
When I plug-in the "missing" drive and rerun the scan/analysis (with new instances of all contributing methods) the DriveInfo scan is not picking up the change even though Windows Explorer/file manager is detecting the change.
If I terminate and than restart the debug session the change is picked up.
Is this behavior due to VS keeping some sort of working cache during a debug session or due to my not having figured out how to Dispose of old instances properly (or something else entirely)?
Thanx in advance for your help.