[wix-users] warning LGHT1076: ICE69: Mismatched component reference for a target

Blair Murri osito at live.com
Sun Mar 15 14:29:05 PDT 2020


Two quick comments:
1. If anything causes one of those components to not be installed (like, say, a condition) then the shortcut may either point to a non-existent resource or an incorrect location.
2. You often don't want to have the shortcut on the same component as its target, but that is the canonical way to "solve" that warning. It's safe to ignore once you've verified that the generated properties used to create the shortcut will always be correct in all supported scenarios.

ICE69 does not look at the existence of conditions, since those can be added in minor upgrades/small updates/patches/semi-custom actions. BTW, it "errors" if the features are different, because then it's a lot easier to create the conditions that cause the problem mentioned in my comment #1, but even that can be mitigated in your authoring.

Blair

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Angus Comber via wix-users <wix-users at lists.wixtoolset.org>
Sent: Wednesday, February 26, 2020 10:15:07 AM
To: Wix users list <wix-users at lists.wixtoolset.org>
Cc: Angus Comber <anguscomber at gmail.com>
Subject: [wix-users] warning LGHT1076: ICE69: Mismatched component reference for a target

I am getting the warning:

warning LGHT1076: ICE69: Mismatched component reference.  Entry
'ApplicationStartMenuShortcut' of the Shortcut table belongs to component
'ApplicationShortcut'.  However, the formatted string in column 'Target'
references file 'http_server.exe' which belongs to component
'http_server.exe'. Components are in the same feature.

But a shortcut component surely will refer to another component as the
target?

Or am I misunderstanding?

Can someone please clarify?

I have looked at:
https://docs.microsoft.com/en-us/windows/win32/msi/ice69

But possibly I am not understanding.

Here is my Product.wxs:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="8341AA09-7AA4-4B7B-8A1E-C06C0FFB0391" Name="Call Identifier"
Language="1033" Version="1.0.0.0" Manufacturer="Itel Office Software Ltd"
UpgradeCode="e8776fa0-2873-4d73-a359-f96ace790225">
     <Package InstallerVersion="300" Compressed="yes"/>
     <Media Id="1" Cabinet="myapplication.cab" EmbedCab="yes" />

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLFOLDER" Name="CallIdentifierz">
</Directory>
      <!-- Step 1: Define the directory structure -->
      <Directory Id="ProgramMenuFolder">
        <Directory Id="MyShortcutsDir" Name="Screen Pop" />
      </Directory>
</Directory>

    <DirectoryRef Id="INSTALLFOLDER">
      <Component Id="http_server.exe"
Guid="E1E2F8AB-02DF-4627-AA2B-5916F8199BCD">
         <File Id="http_server.exe"
               Source="http_server.exe"
               KeyPath="yes" />
      </Component>
      <Component Id="http_server.conf"
Guid="A9D577F3-89F7-49FF-8426-AC7DA866F168">
          <File Id="http_server.conf" Source="http_server.conf"
KeyPath="yes"/>
      </Component>
    </DirectoryRef>

    <!-- Step 2: Add the shortcut to your installer package -->
    <DirectoryRef Id="MyShortcutsDir">
            <Component Id="ApplicationShortcut"
Guid="7E69A1AC-558A-483C-8FBE-BFDFABA4C6E7">
                <Shortcut Id="ApplicationStartMenuShortcut"
                     Name="Cuba Web Server"
                   Description="Cuba web server executable"
                    Target="[#http_server.exe]"
                          WorkingDirectory="INSTALLFOLDER"/>
                <RemoveFolder Id="MyShortcutsDir" On="uninstall"/>
                <RegistryValue Root="HKCU" Key="Software\Itel Office\Call
Identifier" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
           </Component>
    </DirectoryRef>
<!-- TODO: Remove the comments around this Component element and the
ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->

    <Feature Id="ProductFeature" Title="Main Feature" Level="1">
            <ComponentRef Id="http_server.exe" />
            <ComponentRef Id="http_server.conf" />
            <!-- Step 3: Tell WiX to install the shortcut -->
            <ComponentRef Id="ApplicationShortcut" />
</Feature>
</Product>
</Wix>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list