Is it possible for a program to "get out of time and step on itself"?
Sorry I don't have anything better to call it. Here is what is happening!
The application I am developing is to open a file, read the file's contents into memory, then close the file. Next do some operations on the file copy that is in the memory, then overwrite the original file because some of the data could have changed in the processing phase.
I have tested and what I would consider completed this piece of software, and it works beautifully running from the IDE. But when I install the compiled Setup1.MSI or Setup1.Exe file for my solution an exception is caught. This exception was not caught or thrown while the code was being executed in the IDE. Please help!
My code goes somthing like this:
string inputFilePath = @"c:\test directory\testfile.dat";
MyObject obj = new MyObject();
obj = MyFileManager.Read( inputFilePath );
try
{
MyFileManager.Write( inputFilePath );
}
catch( Exception ex)
{
MessageBox.Show(ex.ToString());
}
The MyFileManager Object is a static class that is responsible for opening / writing the file and utilizes the System.IO.StreamReader and System.IO.StreamWriter Objects from the .NET libraries.
Like I say this works perfect running under the IDE, but not from the installed *.exe
The onlything that I can think of is the problem has to be a timing issue between running under the IDE and Just running in the Operating system?
Is that even possible?
Pleas help?
Thanks - Mike