开发者

configuration file management for .net applications

开发者 https://www.devze.com 2022-12-16 14:06 出处:网络
We are having 7 different components 开发者_开发问答and 7 different enviournments where we install all of these components.

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.


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.


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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号