Troubleshooting Exceptions: System.IO.DirectoryNotFoundException

A DirectoryNotFoundException exception is thrown when part of a file path or a directory is not found.

Verify that the directory appears in the specified location.

Check that the directory exists in the specified location.

When using relative paths, make sure the current directory is correct.

The path may be incorrect if you are assuming an incorrect current directory.

Community Additions