There are a few ways to do this... Simpler way is to do a little "hacking" of the CCPROJ file:
1) create a clone of the CSDEF file for every environment that matches the Configuration Name (Release/Debug/QA/UAT/etc):
ServiceDefinition.Release.csdef, ServiceDefinition.Debug.csdef, etc.
2) Add those files manually to the CCPROJ file by using a notepad editor
3) Define a Pre-Build Event command that copies the ServiceDefinition.$(ConfigurationName).csdef into ServiceDefintion.csdef
voila, now your ServiceDefintion will adapt to whatever configuration you're using.
If you want to get fancier or see more details, check out this blog entry that can help you switch all sorts of settings in unison
http://www.paraleap.com/blog/post/Managing-environments-in-a-distributed-Azure-or-other-cloud-based-NET-solution.aspx
Edit: Here is a config that works. Notice that other files are included as type "None" instead of ServiceDefinition to avoid the multiple definitions error.
<ItemGroup>
<ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.Development 1.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.Development 2.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.Local Dev 1.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.Local Dev 2.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.QA 1.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.QA 2.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.Pre-Production 1.cscfg" />
<ServiceConfiguration Include="ServiceConfiguration.Production.cscfg" />
<ServiceDefinition Include="ServiceDefinition.csdef" />
<None Include="ServiceDefinition.Local.csdef" />
<None Include="ServiceDefinition.Development 1.csdef" />
<None Include="ServiceDefinition.Development 2.csdef" />
<None Include="ServiceDefinition.Local Dev 1.csdef" />
<None Include="ServiceDefinition.Local Dev 2.csdef" />
<None Include="ServiceDefinition.QA 1.csdef" />
<None Include="ServiceDefinition.QA 2.csdef" />
<None Include="ServiceDefinition.Pre-Production 1.csdef" />
<None Include="ServiceDefinition.Production.csdef" />
</ItemGroup>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…