vrijdag 17 januari 2014

"Default Settings" for configuration transformations in Visual Studio using SlowCheetah

Hopefully as a result of my User voice but mostly just helpful in writing configuration transformations. It is especially helpful in the scenario where you are given predefined web.config files and where you have multiple build configurations for instance with CMS implementations like Sitecore.

I like to define all my custom configuration changes in transformation files, and leave the main web.config untouched. This makes upgrades a lot easier.

I'm unable to find anything related to "Default Settings" with SlowCheetah, but I noticed that when I created a transformation for a project I'm working on there was suddenly an extra "File.Default Settings.config". Upon further investigation this seems to behave the way I requested.

1. You define a *.config file


2. You 'Add transformations'



 - In "Default Settings" you define transformations that need to be applied to all build configurations


 - For each *.[Build configuration].config file you define transformations specific for that configuration


3. Configuration is transformed in the following order:

 - *.config
 - *.Default Settings.config applied
 - *.[Build Configuration].config applied

This is the resulting configuration file for a "Release" build of the examples shown in the screenshots:



So now you have an extra layer for defining transformations. Does anyone know with which version this functionality came?