Damien Ryan
Damien Ryan

Reputation: 1591

Change web.config belonging to Mandatory WiX feature based on another optional feature

In our WiX installer we've had a mandatory feature which installs all our websites. Up till now this was enough, but now we have an optional feature that not only contains a single file, but will also require changes to the web.config if it's not installed.

Since the web.config is already installed as part of the mandatory feature, is there any way to only do the XmlFile parts to remove sections as a part of the optional feature? I've tried duplicating the web.config Components, but I end up getting a whole load of ICE30 errors.

Upvotes: 3

Views: 303

Answers (1)

Yan Sklyarenko
Yan Sklyarenko

Reputation: 32270

I would try the following in your situation:

  • keep the web.config in a separate component
  • include this component in both features (mandatory and optional)
  • place XmlConfig elements into a separate component and include it into optional feature only

Upvotes: 3

Related Questions