0
votes

I have an azure web job that I am deploying onto a test environment using TFS Release pipeline. Most of my configuration settings are in the Config settings of App Service Web app except the WCF end point section which is in the app.config.

Here are the settings I have on both the solution as well as build/release pipelines -

  • Kept the config files (app.config, app.release.config, app..config) of "Content" build action.
  • Removed the <DependentUpon>.
  • Verified the config transform files are in the drop file in the same directory
    ".....\Local\Package\PackageTmp\app_data\jobs\continuous\JobName"
  • On the build pipeline I have disabled the config transformation using /p:TransformWebConfigEnabled=false
  • On the release pipeline I am using "Azure App Service deploy" version 4.* with XML Transformation enabled.

But somehow, the deployed JobName.exe.config doesn't get transformed with neither app.release.config nor app.environment.config.

Could someone help me on what I am missing here? Thanks in advance.

1

1 Answers

0
votes

But somehow, the deployed JobName.exe.config doesn't get transformed with neither app.release.config nor app.environment.config.

Please check Configuration transform file naming conventions

XML transformation will be run on the *.config file for transformation configuration files named *.Release.config or *..config and will be executed in the following order:

  • *.Release.config (for example, fabrikam.Release.config)

  • *.<stage>.config (for example, fabrikam.Production.config) For example, if your package contains the following files:

    Web.config, Web.Debug.config, Web.Release.config, Web.Production.config

and your stage name is Production, the transformation is applied for Web.config with Web.Release.config followed by Web.Production.config.

To sum up:

It's expected behavior that your JobName.exe.config doesn't get transformed. Cause the XML Transformation options is used to transform your app.config file with app.release.config. (You can check content of your app.config file, it should be changed.)

To get a more powerful transform task, consider using File Transform task.