Deploying Azure deployment with TargetProfile

Terry Denham's Avatar

Terry Denham

22 Jul, 2014 03:32 PM

I have an Azure solution with 1 web site and 1 worker role. I've setup a QA environment and a production environment in Azure ( and The production environment I can publish to using the <myproject>.Cloud.cscfg configuration. The QA environment I publishing using the <myproject>.Testing.cscfg configuration. This works correctly from within VS2013.

I've setup an AppVeyor Environment "MyProject QA" and "MyProject". In the "MyProject QA" Environment page, I can see my two projects. I verified that the Settings page on the "MyProject QA Environment" page has the TargetProfile/Testing environment variable. When I go back to the Deployments page and deploy the "MyProject QA" project, I end up with production configuration values in my QA Azure environment. This also happens when I setup a Deployment in the "MyProject QA" build settings.

I can find the cspkg file that is uploaded to Azure, but I can't find the cscfg file. I assume this file is just used by the PushArtifact script and is not actually uploaded to Azure Blob Storage.

What am I doing wrong?

  1. Support Staff 1 Posted by Feodor Fitsner on 22 Jul, 2014 04:33 PM

    Feodor Fitsner's Avatar

    Hi Terry,

    Thanks for trying it out and describing your scenario. Setting TargetProfile on Environment page doesn't take any effect because when Azure project is packaged during the build a single ("Cloud" by default) target profile is pushed to artifacts.

    I see the issue in the current way of packaging Azure CS projects. Ideally, AppVeyor should create .cspkg package and push all .cscfg files, found in CS project, to artifacts along with it. Then during deployment you specify "profile" to deploy thus the rule "package once, deploy anywhere" works.

    I'm going to fix the packaging and deploy update shortly.

  2. Support Staff 2 Posted by Feodor Fitsner on 23 Jul, 2014 11:04 AM

    Feodor Fitsner's Avatar

    Hi Terry,

    We've just deployed AppVeyor update with support of multiple Azure profiles.

    If you build your Azure Cloud Service project again all .cscfg files will be automatically pushed to build artifacts. Then you can specify which target profile to use during deployment - there is a new "Target profile" field on Azure CS provider/environment settings. See attached screenshot.

    Let me know how it goes.

  3. 3 Posted by Terry Denham on 23 Jul, 2014 06:36 PM

    Terry Denham's Avatar

    Works great. Thanks for adding support for deploying a specific Azure configuration.

  4. Terry Denham closed this discussion on 24 Jul, 2014 02:53 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac