I’m having an issue attempting to transform a Web.config file using a Web.Release.config file when the Web.config file has two different applicationSettings configuration blocks that have a key with the same name.
Thanks for getting in touch! This is an interesting question that I actually haven’t come across before! Transforming two different configuration blocks with the same name will probably be tricky, and my first thought was to try to avoid it if possible. However, I can think of a few possible solutions to handle this.
You can substitute Octopus variable values into one of the blocks using the syntax #{Variable} in your config file, and define the file name in the Substitute Variables in Files feature in your package step. However, your config file would have #{Variable} written into it, so it wouldn’t work locally. You can refer to our documentation page on this feature. https://octopus.com/docs/deployment-process/configuration-files/substitute-variables-in-files
Manually modify the XML yourself after deployment.