VS2015 Azure Resource Manager deploy dialog ignore

2019-09-05 23:30发布

问题:

Goal is to deploy Azure App Service with WebDeploy package from VS2015 with all web.config transformations applied according to current solution build configuration.

I have tried adding build configuration to ARM deployment project and it works fine when you build it from Visual Studio. WebDeploy package for web project is created with correct web.config transformation applied. However if you use Deploy dialog referenced web project is always built and packaged with default build configuration (Debug) from Deployment.targets file.

Is it possible to use current solution configuration for ARM deployment?

VS2015 dialog:

回答1:

samfromlv - I think we have a bug here, try this... open the deployment.targets file for your resource group project. Towards the top change configuration default to whatever your configuration name is (e.g. Release)

    <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>

Try that, it may depend on what version of the SDK your project was created under so if it doesn't work lmk.