Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best Approach For Configuring Multiple .Net Applications

We have a suite of interlinked .Net 3.5 applications. Some are web sites, some are web services, and some are windows applications. Each app currently has its own configuration file (app.config or web.config), and currently there are some duplicate keys across the config files (which at the moment are kept in sync manually) as multiple apps require the same config value. Also, this suite of applications is deployed across various envrionemnts (dev, test, live etc)

What is the best approach to managing the configuration of these multiple apps from a single configuration source, so configuration values can be shared between multiple apps if required? We would also like to have separate configs for each environment (so when deploying you don't have to manually change certain config values that are environment specific such as conenction strings), but at the same time don't want to maintain multiple large config files (one for each environment) as keeping this in sync when adding new config keys will prove troublesome.

like image 591
Robin Weston Avatar asked Dec 17 '22 10:12

Robin Weston


1 Answers

Visual Studio has a relatively obscure feature that lets you add existing items as links, which should accomplish what you're looking for. Check out Derik Whittaker's post on this topic for more detail.

Visual Studio really should make this option more visible. Nobody really thinks to click on that little arrow next to the "Add" button.

like image 129
Kevin Pang Avatar answered Dec 31 '22 18:12

Kevin Pang