Azure DevOps XML Transformation During Release Not Working

前端 未结 4 678
北荒
北荒 2020-12-17 01:29

I want to configure our pipeline to allow one build to be used for multiple environments without having to create separate builds. According to the docs, it seems like it is

4条回答
  •  生来不讨喜
    2020-12-17 02:34

    1) Make sure you transform works. Test it here.

    2) Ensure in your VS project that you are including the transform file, Web.Preview.config, and copying to output dir.

    3) Disable the config transform during the build, you just need to add argument /p:TransformWebConfigEnabled=False in MSBuild Arguments section of your Build task. You also need to add /p:AutoParameterizationWebConfigConnectionStrings=False if you want to update the connection string during the release. This will use the Web.Preview.config to "transform" the web.config.

    4) Double check that in your release for the IIS Web App Deploy task under File Transforms & Variable Substitution Options you have XML transformation checked.

提交回复
热议问题