Transforming variables from web.release.comfig to web.config

I am using Octopus deploy to replace appsettings and connectionstrings

In my web.config i have the following these files are excluded from checkin

Then in my web.release.config

i have the following

In Octopus I have variables setup with the same name. I also have the following steps ticket in the deployment see attached image

But when I deploy Octopus says

No matching appSetting, applicationSetting, nor connectionString names were found in: C:\Octopus\Applications\XXX\XX\1.0.1\Web.config


Thanks for reaching out. During your deployment there are 2 features running:

  1. Configuration Variables (which replaces appsettings, connectionstrings,etc)
  2. Configuration Transforms (which uses Web.release.config to transform web.config)

These features run in the above order. So by the time “Configuration Variables” ran, web.config still hasn’t been transformed by web.release.config as the “Configuration transforms” feature hasnt run yet, and for that reason web.config still doesn’t have those appsettings values.

The order in which these features are executed (outlined in this doc) cannot be changed, and what you should be expecting is the “appSettings” replacement to happen on Web.Release.Config, and then use that modified file to transform Web.Config.

Now my question is: isn’t his happening already? Because Octopus should also attempt to replace appsettings on web.release.config. How does your web.config file look at the end of the deployment, regardless of that message you are getting?

Hope that makes sense.


FYI - I’ve updated my phrasing a bit on the above reply as there were parts that might have sounded a bit harsh (which I absolutely didn’t want to do!). Please know that while you read the email version you got of my first reply (which was un-editted).

Sorry about that :slight_smile: