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
Solved

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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

789 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