Hi. This is a C# project.
I have a configuration file (parameters.txt) stored in ...\bin\release.
Running the application while under Visual Studio 2005 ran fine. Moreover, running the *.exe and its shortcut ran fine. However, if I just copy and paste the *.exe application to desktop, the "...can't open parameters.txt file" error appears. however, if I copy the shortcut to the desktop then everything ran fine. What is the difference? I tried copying the parameters.txt file to the same location as the project solution location. This this not work. What is the solution? Thank you in advance.

Did you try putting the text file in the same place as the exe on your desktop?

Storing configuration info etc. in a separate file is a very bad thing to do. Store such information inside your application in the form of resources or settings. Learn more about it here : http://msdn.microsoft.com/en-us/library/cftf714c.aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.