Reputation: 8981
I have a .svc file which I would like to modify during installation of my application. Normally when editing xml files using wix, we use the XmlFile
option. How can I add text to this .svc file using WiX toolset? Do I need to create a custom action?
<%@ ServiceHost Language="C#" Debug="true" Service="Certificate.Server.HelloService" CodeBehind="HelloService.svc.cs" %>
Upvotes: 2
Views: 1960
Reputation: 12245
Yes, you assumption is correct - you need a custom action to do that. There are WIX extensions available that can do that, I believe I have seen some on github (text replacement by regex).
But it is probably better to avoid "edit file" operation on installation - it may prevent self-repair for example. Common practice is to install "stock" package using MSI, and then have another "configuration" wizard (written by you) that will configure your program.
Upvotes: 3