0

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

3
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by Momerath
0

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

0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.