A
Author
This may sound like a silly question.
I rarely do console or windows form applications.
In a console application, I have an XML configuration file. I place
it under my application root. In my code, I also say
string configFilePath = "./configuration.xml";
When I debug the application with VS 2005, I get an error which says
the configuration file cannot be found. The reason is because when
debug starts, the executable is placed under ApplicationRoot/bin/
Debug/. And as long as I don't copy this configuration.xml file to
ApplicationRoot/bin/Debug/, the complaint is justified. But to keep
copying the file is annoying every time a change is made.
And this bin/Debug folder isn't available in the VS 2005 Solution
Explorer pane. In other words, I cannot directly put the
configuration.xml file under bin/Debug/.
How do you gurus go about this? There must a more professional/easier
way to handle this. Any hint is highly appreciated.
I rarely do console or windows form applications.
In a console application, I have an XML configuration file. I place
it under my application root. In my code, I also say
string configFilePath = "./configuration.xml";
When I debug the application with VS 2005, I get an error which says
the configuration file cannot be found. The reason is because when
debug starts, the executable is placed under ApplicationRoot/bin/
Debug/. And as long as I don't copy this configuration.xml file to
ApplicationRoot/bin/Debug/, the complaint is justified. But to keep
copying the file is annoying every time a change is made.
And this bin/Debug folder isn't available in the VS 2005 Solution
Explorer pane. In other words, I cannot directly put the
configuration.xml file under bin/Debug/.
How do you gurus go about this? There must a more professional/easier
way to handle this. Any hint is highly appreciated.