Jan 16, 2014 at 2:45 PM
Edited Jan 16, 2014 at 2:46 PM
I am looking for a way to minimize the need for duplication when providing .transform files as part of our in-house NuGet package.
I have a setup as follows:
- Foo.Services: A class library which contains the Service References to the used web services. This library calls and consumes the web services.
- Foo.Web: A web application which uses Foo.Services.
- Foo.Console: A console application which uses Foo.Services.
library will be provided as a NuGet package. The connection strings and binding configurations for the web services used by
are provided by a number of transformation files, one for each environment:
When adding the NuGet package to the solution the transformations are correctly applied to the corresponding config files.
As you might suspect, the app.Debug.config.transform and web.Debug.config.transform files are identical. This means that we must remember to update both files when a value in one of them changes. Is there a way to minimize this duplication?
For a while I thought about moving the actual configuration in another .config file which would then be included, but the problem is that I have other packages who use the same configuration section, so that's not an option.
Any thoughts or suggestions are greatly appreciated.