Miral
Miral

Reputation: 6038

configuration file management for .net applications

We are having 7 different components and 7 different enviournments where we install all of these components.

So when these components are installed on these different env there are chances that we missout changing the server names in urls.

Any suggestions of managing these many eviournment config files in nicely fashioned way.

Upvotes: 0

Views: 377

Answers (4)

Tj Kellie
Tj Kellie

Reputation: 6476

Have you looked into using a build tool that would let you target your different environments?

I have used Visual Build and MS build to do similar deployments. Another user here also reccomended a tool under development called "dashy" if you want to be able to check it out too.

Upvotes: 4

Gerrie Schenck
Gerrie Schenck

Reputation: 22368

I've seen a number of companies having a custom-written tool for this, with a little database which contains the keys which need to be changed and the value per environment. After building the project, but before deploying, the tool is run on the build output to change the config files appropriately.

Upvotes: 0

Joshua Cauble
Joshua Cauble

Reputation: 1349

well, depending on you need you could store all changeable items in a database. Another approach that we have used in our environment is to have a config file per environment and let our deployment process push the correct file to the correct location.

The downside is that you have to maintain the different versions of the files and if you make a change you have to make sure they are all kept up-to-date.

Upvotes: 0

Graviton
Graviton

Reputation: 83254

What about using an installer, when you install the application, make sure that the user actually changes the config file via the installer?

Upvotes: 0

Related Questions