Background
When you create a new web project in Visual Studio, you start with 2 web.config transformation files by default:
Web.config
Web.Debug.config
Web.Release.config
Goal
However, I'd like to transform the output of those transformations by nesting a level deeper:
Web.config
Web.Debug.config
Web.Release.config
Web.Release.Azure.config
Web.Release.WebServer.config
Attempt
I was able to create a new solution configuration with a corresponding project configuration called "Release.Azure". I was also able to create the new transform file (Web.Release.Azure.config) and I edited the csproj file to nest that file under Web.Release.config (as shown in the above diagram):
<Content Include="Web.Release.Azure.config">
<DependentUpon>Web.Release.config</DependentUpon>
</Content>
Problem
However, when I published against the Release.Azure configuration, the Web.Release.Azure.config file directly transformed the Web.config file, rather transforming the output of the Web.Release.config transformation of the Web.config file.
Is there a way to nest / chain web.config transformations, so that I can reduce the amount of typing I have to repeat in each configuration?
Example
Here is a simple scenario where I'd want to do this. Suppose all release configurations have the same connection strings (say, to 500 different databases). I'd put that into Web.Release.config. However, I might want to use InProc session for a WebServer release and Database session for an Azure release (so the session would be configured differently in Web.Release.Azure.config and Web.Release.WebServer.config).