The reason for the exception: you make false assumption that some file which exists on your particular system should be present on all systems.
Solution:
Learn how OS works and never rely on existence and predefined locations of any files. Know all ins and outs of your own code. Everything should be based on some path calculations. In particular, please see my past answers:
How to find my programs directory (
executable directory),
How to find my programs directory (
current directory, "special folders").
There are no cases when hard-coded file path can be used. File names can be supplied be the users, defined in some configuration files, and so on. Your code should check up
System.File.Exists
before opening a file, stream or
StreamReader
.
—SA