Apply config transform to web.config on target and not in package

Hi,

I’m trying to have a configuration transform applied and having some issues. The situation is:

  • the web.config exists on the deployment target, but it will never be in the deployment package
  • the transform file Web.Helix.config is in the depoloyment package
  • the ‘Additional transforms’ is set to: Web.Helix.config => #{Environment.WebRoot}\Web.config, where {Environment.WebRoot} is the website root.

The message from the Deploy Package step is:
No files were found that match the substitution target pattern ‘Web.config’

Is this possible? If so, what am I getting wrong?

Thanks

Hi Euan,

Thanks for getting in touch! Unfortunately defining absolute paths is only supported for transform files, and not for target config files. The Web.config file has to exist in the package you’re deploying. I haven’t had a chance yet to confirm, but you might be able to use an absolute path for the transform using this library step template written by the community called XML Transform using XDT.

https://library.octopus.com/step-templates/569a5f1b-bb57-491a-9c4e-a6d6e44e6b26/actiontemplate-xml-transform-using-xdt

I hope this helps! Let me know if you have any further questions or concerns moving forward. :slight_smile:

Best regards,

Kenny

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.