MergeModule Additional information: Merge Module XXX does not belong to any feature and "Complete" feature is not found

May 5, 2015 at 6:17 PM
Edited May 5, 2015 at 6:18 PM
Hello dear Wix# Community,

I tried to define 2 merge modules (WixSharp.Merge) in my component without making them part of a feature. (They are part of a UI component I'm using and have to be always installed).

But now I get the error:

Additional information: Merge Module XXX does not belong to any feature and "Complete" feature is not found

When I check the WXS I generate from the same project there is a Complete Feature (where are all my files of the setup are stored) but for some reason this is not found by the compiler.

I checked the Source Code of the Compiler class and there it searches for A XmlElement Feature with the name, is maybe the Completed feature added later?

How can I add the feature Complete? Or can I add a custom feature which is installed by default? Or do I have to use _WixSourceGenerated?

My second attept was to create a custom feature called Complete, but this only created a Completed.1. Also since I add two merge modules there is a bug that the Complete.1 feature is added twice in the xml which causes an error.

Thank you for Help and Greetings
Michi

Side Note:
I also noticed a bug setting the project.ControlPanelInfo.UrlInfoAbout causes the property to be written multiple times in the wxs, which causes a WiX error. Is this a known issue?
May 6, 2015 at 9:02 AM
- Additional information: Merge Module XXX does not belong to any feature and "Complete" feature is not found
"Complete" is an auto-generated feature generated in case you did not declared any. Though I tested and can confirm that indeed it is a challenge to implement the scenario like yours. I have created the ticket.

- I also noticed a bug setting the project.ControlPanelInfo.UrlInfoAbout causes the property to be written multiple times in the wxs, which causes a WiX error. Is this a known issue?

Can you please provide the test case for this. The ProductInfo sample doesn't exhibit the problem:
<?xml version="1.0" encoding="Windows-1252"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="6f330b47-2577-43ad-9095-1861ca25889c" Name="MyProduct" Language="1033" Codepage="Windows-1252" Version="1.0.0.0" UpgradeCode="6f330b47-2577-43ad-9095-1861ba25889b" Manufacturer="My Company">
    <Package InstallerVersion="200" Compressed="yes" SummaryCodepage="Windows-1252" Languages="1033" />
    <Media Id="1" Cabinet="MyProduct.cab" EmbedCab="yes" />

    <Directory Id="TARGETDIR" Name="SourceDir" >
      <Directory Id="ProgramFilesFolder" Name="ProgramFilesFolder">
        <Directory Id="ProgramFilesFolder.My_Company" Name="My Company">
          <Directory Id="INSTALLDIR" Name="My Product">

            <Component Id="Component.readme.txt" Guid="6f330b47-2577-43ad-9095-18615e463af3">
              <File Id="readme.txt" Source="readme.txt" />
            </Component>

          </Directory>
        </Directory>
      </Directory>
    </Directory>

    <Property Id="ARPCOMMENTS" Value="Simple test msi"  />
    <Property Id="ARPCONTACT" Value="Product owner"  />
    <Property Id="ARPHELPLINK" Value="https://wixsharp.codeplex.com/support"  />
    <Property Id="ARPHELPTELEPHONE" Value="111-222-333-444"  />
    <Property Id="ARPPRODUCTICON" Value="app_icon.ico"  />
    <Property Id="ARPREADME" Value="https://wixsharp.codeplex.com/manual"  />
    <Property Id="ARPURLINFOABOUT" Value="https://wixsharp.codeplex.com/About"  />
    <Property Id="ARPURLUPDATEINFO" Value="https://wixsharp.codeplex.com/update"  />

    <CustomAction Id="Set_ARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]"  />
    <CustomAction Id="Set_ARPNOMODIFY" Property="ARPNOMODIFY" Value="True"  />

    <UIRef Id="WixUI_Minimal"  />

    <Feature Id="Complete" Title="Complete" Absent="allow" Level="1" >
      <ComponentRef Id="Component.readme.txt" />
    </Feature>

    <InstallExecuteSequence >
      <Custom Action="Set_ARPINSTALLLOCATION" After="InstallInitialize"> (NOT Installed) </Custom>
      <Custom Action="Set_ARPNOMODIFY" After="Set_ARPINSTALLLOCATION"> (NOT Installed) </Custom>
    </InstallExecuteSequence>

    <Icon Id="app_icon.ico" SourceFile="app_icon.ico"  />

  </Product>
</Wix>


May 6, 2015 at 9:03 AM
And yes, WixSourceGenerated would be the way to go until a proper solution is available.
May 6, 2015 at 9:43 AM
Hi thank your for your quick response, sorry not for providing a sample for the second case:

I just checked and it seems the bug is caused because I call both BuildWxs and then BuildMsi. First I call BuildWxs (For generating a debug sample) and then Build the msi.

            var testWix = new Wix.Project("TestProj");
            testWix.ControlPanelInfo.Manufacturer = "MyManufacturer";
            testWix.ControlPanelInfo.UrlInfoAbout = "http://mywebpage.net";
            testWix.Language = "en-US";
            //testWix.Dirs = new Wix.Dir[] { installDir, startMenuDir };
            testWix.GUID = Guid.NewGuid(); // Dummy guid

            testWix.UpgradeCode = Guid.NewGuid(); // Dummy guid
            testWix.Version = new Version(1, 0, 0, 0);
            //Property[] arr = project.Properties;
            testWix.MajorUpgradeStrategy = Wix.MajorUpgradeStrategy.Default;
            testWix.MajorUpgradeStrategy.RemoveExistingProductAfter = Wix.Step.InstallInitialize;

            Wix.Compiler.WixLocation = @"C:\Libaries\WixSharp\Wix_bin\bin";
            //Wix.Compiler.WixSourceGenerated += OnCompiler_WixSourceGenerated;
            Wix.Compiler.BuildWxs(testWix, @"C:\Test\Testwix.wsx", Wix.Compiler.OutputType.MSI);
            Wix.Compiler.BuildMsi(testWix, @"C:\Test\Testmsi.msi");
May 6, 2015 at 1:12 PM
Edited May 7, 2015 at 11:18 AM
A few points:
  • You should call BuildWxs or BuildMsi but not both. Remove BuildWxs and it will fix all problems. If you want to preserve Wxs call
Wix.Compiler.PreserveTempFiles = true;
  • You don't have to use 'dummy guids' they will be generated for you automatically.
May 7, 2015 at 11:19 AM
The Release v1.0.18.0 now handles the double WXS compilation.