Solved

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

Posted on 2003-11-26
3
221 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

943 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now