I just implemented this with Igorek's answer to my question here . Not as strong as msbuild, but easier to implement.
The solution is to create a .csdef file that matches each service configuration. Then, during the pre-build phase of your Azure project, you will copy the correct .csdef file from the main .csdef file. These custom .csdef files can be added to your solution, but you must do this manually using a text editor.
Each of my .csdef configuration files has SSL in my test and production certificate, but the endpoint definition is configured to use the correct one for the configuration. This is necessary because Visual Studio will complain about the certificates specified in your .cscfg files that are not in the .csdef file. This means that you need to upload both SSL certificates for both test and production services on the Azure portal, but after the deployment is completed, the correct certificate will be used.
source share