Solved

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

Posted on 2003-11-26
3
219 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

16 Experts available now in Live!

Get 1:1 Help Now