A new feature of the Visual Studio 2005 is the introduction of the Setting.settings file, which generates a class that maps your application configuration file. This avoids creating this class by yourself, and it supports updating and saving. What is is more interesting is that WebServices automatically add their WSDL locations in there, as well as data connection strings.
There is a problem though when you let VS2005 create the file by itself in a multi-assembly setup, where it creates a settings.settings for a "dll" packaged assembly. You end up with one settings.settings file for each of your assemblies, which is particularily not useful.
So, because there's a solution, you just have to share the only settings.setting file that matters to your application and here's how :
- Remove the settings.settings file from all your assemblies, except the one that will be the master.
- Add the master settings.settings file as a linked file in each of your projects, and you're done.
Just in case you've never linked a file in VS, when you're about to add the file to your project, just click on the little arrow next to the open button and select Link File. The magic after this is that VS2005 uses the linked file as if it were a local file.
One last note : Don't forget to copy all your existing settings from each assemblies to your master settings file.