Compartilhar via


Troubleshooting Exceptions: System.IO.FileNotFoundException 

A FileNotFoundException exception is thrown when an attempt is made to access a file or directory that does not exist on disk.

Associated Tips

  • Verify that the file exists in the specified location.
    If the file does not exist, this exception is thrown. For more information, see FileExists.
  • When using relative paths, make sure the current directory is correct.
    If you are assuming the current directory incorrectly, relative paths will be incorrect as well.

See Also

Tasks

How to: Find Out More About an Exception with the Exception Assistant
How to: View a File

Reference

FileNotFoundException