0

I am new to WiX, but I have one issue that I can't figure out. I have the following code which "installs" fine (basically it just adds a text file to the Program Files folder).

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="WixTemplate" Language="1033" Version="1.0.0.0" Manufacturer="My Company" UpgradeCode="d7c4cfc2-4e50-4002-9273-e900112e2b03">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes"/>
    <Feature Id="ProductFeature" Title="WixTemplate" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>
  </Product>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="WixTemplate" />
      </Directory>
    </Directory>
  </Fragment>

  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="TextFileComponent">
        <File Id="FooTxt" Source="foo.txt" />
      </Component>
    </ComponentGroup>
  </Fragment>

</Wix>

However, if I move the Feature section to its own Fragment, it compiles fine, but when I run it with logging, it fails with an overall "Installation success or error status: 1603" and the first error value of 3 indicating "Note: 1: 2205 2: 3: ActionText" meaning that the ActionText table was not found.

Here is the code that fails to install:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="WixTemplate" Language="1033" Version="1.0.0.0" Manufacturer="Blue Ribbon Technologies, LLC" UpgradeCode="d7c4cfc2-4e50-4002-9273-e900112e2b03">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes"/>
  </Product>

  <Fragment>
    <Feature Id="ProductFeature" Title="WixTemplate" Level="1">
      <ComponentGroupRef Id="ProductComponents" />
    </Feature>
  </Fragment>

  <Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="WixTemplate" />
      </Directory>
    </Directory>
  </Fragment>

  <Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="TextFileComponent">
        <File Id="FooTxt" Source="foo.txt" />
      </Component>
    </ComponentGroup>
  </Fragment>

</Wix>

So what's special about the Feature section that it can't be a fragment where Components and Directories can?

1
  • A missing ActionText table doesn't typically cause a fatal 1603 error - it just goes ahead and displays the default data. Is there nothing else in the log? Perhaps post all of it somewhere? Commented Mar 26, 2015 at 16:11

1 Answer 1

2

Nothing in your Product references the Feature. WiX won't link in a Fragment unless something references a resource in it. Add a FeatureRef to your Product to pull in the Feature which will in turn pull in the ComponentGroup which pulls in the Component.

Sign up to request clarification or add additional context in comments.

2 Comments

That makes sense. Thanks for the clarification. I'm surprised the the code passed the candle and light compilers/linkers without issue, but I appreciate you pointing me in the right direction.
It's legal to have stuff that isn't referenced -- that's how you can build libraries. There is an error if you reference a component but don't connect it to a feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.