I have an application that writes to a folder on the C:\ drive. The program works fine on my computer, but on another laptop when running the .exe (The other laptop has no visual studio etc.), i get a filenotfoundexception and i cannot pinpoint the line of code where this happens from the error report.
Here is the code for creating the directory (assuming this is the issue)
try
{
WriteDirectory = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\SMS Notifier\");
if (!WriteDirectory.Exists)
WriteDirectory.Create();
}
catch (Exception e)
{
throw e;
}
Any ideas what the problem could be? Should i check for write permission ?!
Help greatly appreciated!