Hi guys/gals,

I've recently developed a piece of software and it currently uses 1 external .txt file (located in the bin\debug folder of the project folder) that is used to store data long term.

The program works wonderfully when i use the visual studio 2008 debugger, but when i either publish it, use the .exe from the project folder or save it as a release version it gives me various errors with regards to not being able to find the .txt which its trying to read.

Does anyone have any idea's as to why this might be?

Many thanks,
Connor

Wich is the path you use to open the file?

well im using the stream read/write statements so i dont have to define a path, but its in the project>bin>debug folder.

Are you running on Vista or Win7? Do you install to the Program Files directory?

windows 7 and i run the installer to the default directory, which is the program files directory.

By default on Vista and Windows 7 you can not write to the Program Files directory. External Files need to go to the directory returned by Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) . I wrote all about that here.