I did something similar to what you need to distinguish between test and live environments. First of all, you need to create a new .csdef file that you want to use for your alternative settings. This should be a complete file, as we are just going to replace it with the original one. Now we need to add this to the cloud project. Right-click on the cloud project and select the offload project. Right-click on it again and select "Edit" [Project Name]. There's a section that looks something like this:
<ItemGroup>
<ServiceConfiguration Include="ServiceConfiguration.Test.cscfg" />
<ServiceDefinition Include="ServiceDefinition.csdef" />
<ServiceConfiguration Include="ServiceConfiguration.cscfg" />
</ItemGroup>
Add a new ServiceDefinition element that points to your newly created file. Now find the following line:
<Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" />
, TargeProfile, , , , .csdef
<Target Name="AfterResolveServiceModel">
<ItemGroup>
<SourceServiceDefinition Remove="@(SourceServiceDefinition)" />
<TargetServiceDefinition Remove="@(TargetServiceDefinition)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetProfile)' == 'Test'">
<SourceServiceDefinition Include="ServiceDefinition.Test.csdef" />
</ItemGroup>
<ItemGroup Condition="'$(TargetProfile)' != 'Test'">
<SourceServiceDefinition Include="ServiceDefinition.csdef" />
</ItemGroup>
<ItemGroup>
<TargetServiceDefinition Include="@(SourceServiceDefinition->'%(RecursiveDirectory)%(Filename).build%(Extension)')" />
</ItemGroup>
<Message Text="Source Service Definition Changed To Be: @(SourceServiceDefinition)" />
</Target>
, " ". , , , .csdef. , .csdef, , , .