Reader small image

You're reading from  WiX Cookbook

Product typeBook
Published inJan 2015
Reading LevelBeginner
Publisher
ISBN-139781784393212
Edition1st Edition
Languages
Right arrow
Author (1)
Nicholas Matthew Ramirez
Nicholas Matthew Ramirez
author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez

Right arrow

Adding a new element to an XML file during installation


In this recipe, we'll learn how to add an element to an XML file. One place where this might be useful is to enable tracing in an ASP.NET web application. Tracing lets you see diagnostic information about a running web application. We'll start with a basic Web.config file that doesn't have any tracing configuration in it and add a trace element to set it up.

Getting ready

To prepare for this recipe, perform the following steps:

  1. Create a new setup project and name it XmlElementInstaller.

  2. So that we'll have something to modify, add an XML file to the project and call it Web.config. Add the following markup to it:

    <?xml version="1.0"?>
    <configuration>
      <appSettings />
      <connectionStrings />
    
      <system.web>
        <authentication mode="Windows" />
      </system.web>
    </configuration>
  3. Add a Component element to Product.wxs to include the file in the installation:

    <ComponentGroup Id="ProductComponents...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
WiX Cookbook
Published in: Jan 2015Publisher: ISBN-13: 9781784393212

Author (1)

author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez