My problem with that had to do with the platform configuration:
At the Configuration Manager window, you can choose the config name ("Active solution configuration" combobox) and the target platform ("Active solution platform" combobox). I correctly made the setup of my new configuration ("MyStagingConfig", say) for each project, but forgot about the platform - so I configured it all in "Mixed platform".
When I published the project using "MyStagingConfig - Any CPU", it transformed the config with the Web.Staging.config
file, instead of Web.MyStagingConfig.config
. After a little headache, I realised that the "Any CPU" platform, which I hadn't configured, was configured by default to publish the project with the "Staging" config (as I had imported the settings from the "Staging" config when creating "MyStagingConfig").