Solved

prevent xml config file from being deleted when recompiling?????????

Posted on 2003-11-26
3
227 Views
Last Modified: 2010-05-18
I use xml configuration file:
For example, if the application's name is Test.exe, the configuration file is: Test.exe.config.
The problem is: everytime when rebuild/compile, Test.exe will be renewed, and Test.exe.config will be deleted(this is not desirable. I don't want config file to be deleted).

1.How to keep config file when compiling the project? I am using Visual Studio. Is there a config option that I can switch between delete and not delete?

2.Another question, someone uses App.config as the configuration file name, it works too. What is the difference btn using App.config and Test.exe.config?

0
Comment
Question by:emeraldtea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
ptmcomp earned 50 total points
ID: 9827783
Create a file named app.config in the root folder of your project and place the configuration inside there.
Everytime you compile your project it will be named <YourAppName>.exe.config and copied in the bin folder.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question