Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Exception thrown without Media* and with Tag #4158

wixbot opened this Issue Oct 21, 2013 · 4 comments


None yet
2 participants

wixbot commented Oct 21, 2013

If you have a Product with no Media or MediaTemplate element but with a swid:Tag element and no other files, Light throws an exception:

    C:\Program Files (x86)\WiX Toolset v3.8\bin\Light.exe -out "c:\users\barnson\documents\visual studio 2013\Projects\SetupProject3\SetupProject3\bin\Debug\SetupProject3.msi" -pdbout "c:\users\barnson\documents\visual studio 2013\Projects\SetupProject3\SetupProject3\bin\Debug\SetupProject3.wixpdb" -cultures:null -ext "C:\Program Files (x86)\WiX Toolset v3.8\bin\\WixTagExtension.dll" -contentsfile obj\Debug\SetupProject3.wixproj.BindContentsFileListnull.txt -outputsfile obj\Debug\SetupProject3.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj\Debug\SetupProject3.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile "c:\users\barnson\documents\visual studio 2013\Projects\SetupProject3\SetupProject3\SetupProject3.wixproj" obj\Debug\Product.wixobj
    Windows Installer XML Toolset Linker version 3.8.1020.0
    Copyright (c) Outercurve Foundation. All rights reserved.
light.exe(0,0): error LGHT0001: Key cannot be null.
    Parameter name: key
    Exception Type: System.ArgumentNullException
    Stack Trace:
       at System.Collections.Hashtable.get_Item(Object key)
       at Microsoft.Tools.WindowsInstallerXml.AutoMediaAssigner.ManuallyAssignFiles(Table mediaTable, MediaRow mergeModuleMediaRow, FileRowCollection fileRows)
       at Microsoft.Tools.WindowsInstallerXml.AutoMediaAssigner.AssignFiles(FileRowCollection fileRows)
       at Microsoft.Tools.WindowsInstallerXml.Binder.BindDatabase(Output output, String databaseFile)
       at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output, String file)
       at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
    The command exited with code 1.

Source is from a Dev12 template with modifications:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:swid="http://schemas.microsoft.com/wix/TagExtension">
    <Product Id="*" Name="SetupProject3" Language="1033" Version="" Manufacturer="asdf" UpgradeCode="00666089-eb3d-4e46-8cd3-1ccf0e610871">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <swid:Tag Regid="regid.2008-09.org.wixtoolset" Type="component" />
        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
        <!--<MediaTemplate />-->

        <Feature Id="ProductFeature" Title="SetupProject3" Level="1">
            <!--<ComponentGroupRef Id="ProductComponents" />-->

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

        <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
            <!-- 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> -->

Originally opened by barnson


wixbot commented Oct 22, 2013

Originally changed by barnson
AssignedTo set to bobarnson


wixbot commented Oct 22, 2013

Investigate fix to see if it fits in v3.8.

Originally posted by barnson


wixbot commented Oct 24, 2013

Originally changed by barnson
Resolution set to fixed
Status changed from Open to Resolved

@wixbot wixbot added bug linker labels Dec 20, 2015

@wixbot wixbot added this to the v3.8 milestone Dec 20, 2015

@wixbot wixbot closed this Dec 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment