I am getting this error on code that used to work. I have not changed the code.
Here is the full error:
The CLR has been unable to transition
Figured it out - it automatically brings you to the last location you looked in every time the dialog opens. If that location is a network location that no longer exists (ex. the other computer is off), it will just hang forever.
My workaround looks like this:
string initialDirectory = ...; //Figure out an initial directory from somewhere
openFileDialog1.InitialDirectory = !Directory.Exists(initialDirectory)
? Path.GetPathRoot(Environment.SystemDirectory)
: initialDirectory;