4 Comments

  1. Great blog post! I only wish I would’ve found it sooner as I just spent the past few weeks figuring all of this out on my own (still using on-prem TFS 2017 though)!

    I have a couple questions though:
    1. What do you recommend for replacing application settings that are not in the or sections of the app/web.config? The easiest thing I could find was to use the Tokenizer task in the Release Management Utility tasks (https://marketplace.visualstudio.com/items?itemName=ms-devlabs.utilitytasks). However, doing that involves me having to unzip the web deploy package, use the task to replace tokens via a JSON file, and then zip them back up. It’s not hard, but seems a bit cumbersome. Do you know an an easier/better way?

    2. We host all of our SQL servers in availability groups. When doing a SQL deployment via the .dacpac file, it tries to modify database properties that aren’t allowed when the database is in an availability group, such as changing the database’s Recovery mode. Do you know of any way around this?

    I understand that you may not have these answers, so I’ll likely post them on Stack Overflow as well, but though it’s worth a shot. Thanks again for the very thorough and detailed post. It will be a great help to lots of organizations that still have hardware purchased and aren’t ready/able to fully commit to moving to the cloud.

  2. Nick Foster

    I’d also love to know what you use for swapping out config that’s not in appSettings. We still have applications that call WCF services and need to change endpoint urls or other configuration values depending on environment.
    At the moment we use web.xxxx.config transforms but those files don’t get published in the default artifacts and so I end up creating artifacts from the projects, but then they include all the uncompiled source files.
    There must be a better way!

    • abel

      If you are using the IIS Web App Deploy Task (or Azure App Service Task if you are going into Azure) you can do file transforms and variable substitutions https://cda.ms/rm. There are also tasks in marketplace that will let you swap values from config files. Also you can tweak your copy task in build so you only copy your config files and not all the uncompiled source!

Leave a Reply

Your email address will not be published. Required fields are marked *