Octopus is making transforms outside of the <appSettings> and <connectionStrings> tags

Hi,
Please can you tell me what I am doing wrong?
As I understand it Octopus automatically transforms things within the and tags in the web.config file.
If I need to transform anything outside of these tags I need to do this via a file like a Web.Release.config file.

The problem I am having is that Octopus seems to be jumping into the tags in my web.config file and changing them as well.

e.g

The variable I have set-up for the connection string below is called "dependencyConnectionString"
Octopus successfully inserts the variable values into the code below.

But within the web.config file I have several that contain the variable name as well. “dependencyConnectionString”

dependencyConnectionString

Please can you tell me why Octopus is putting my “dependencyConnectionString” variable values into my tags I know that the tag contains a setting that has a variable name (dependencyConnectionString) but as it is outside of the and tags I did not expect Octopus to change anything within the within the tag.

Thanks

Lee

Hi Lee,

Thanks for getting in touch. I’m sorry this took you by surprise. Updating applicationSettings was added due to customer demand in Octopus 2.x, but the documentation and some of the messaging wasn’t updated.

I’ve since gone and updated all of our documentation and code to make it very clear that appSettings, applicationSettings and connectionStrings will be replaced with Variables by naming convention.

Unfortunately for your situation it’s all-or-nothing, you cannot opt-in to appSettings and connectionStrings and opt-out of applicationSettings. The best recommendation I have is to:

  1. Change the variable name and things that reference it - this may have the least impact on your application.
  2. Change the applicationSetting name which would require your application to be updated.

I’m sorry if this is not the news you were hoping for.

Hope this helps!
Mike