1

I am getting this error in wix when I tried to add registry entries:

light.exe(0,0): error LGHT0001: Item has already been added. Key in dictionary: 'reg9F526ACB527353E75143C421DB80ABA9'  Key being added: 'reg9F526ACB527353E75143C421DB80ABA9'
        Exception Type: System.ArgumentException
        Stack Trace:
           at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
           at System.Collections.Hashtable.Add(Object key, Object value)
           at Microsoft.Tools.WindowsInstallerXml.Binder.SetComponentGuids(Output output)
           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)
Done building project "TestReg.wixproj" -- FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========



<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="47e1c2be-1025-4bf3-8f81-9cb0938f8544" Name="TestReg" Language="1033" Version="1.0.0.0" Manufacturer="TestReg" UpgradeCode="f84d7f1a-9349-4ee2-9540-50ea3038358e">
        <Package InstallerVersion="200" Compressed="yes" />

        <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLLOCATION" Name="TestReg">
                    <Component Id="ProductComponent" Guid="b143b690-8730-4cd4-b26b-e0a61247504b">
                    </Component>
                </Directory>
            </Directory>
        </Directory>

        <Feature Id="ProductFeature" Title="TestReg" Level="1">

        </Feature>


      <DirectoryRef Id="INSTALLLOCATION">
        <Component Id="RegistryEntry1" Guid="*">
          <RegistryKey Root="HKCR" Key="AppID\{2D273A44-7EA1-4A31-9C00-FCC2FD992A10}">
            <RegistryValue Type="string" Value=" " />
            <RegistryValue Name="LocalService" Value="Service" Type="string" />
          </RegistryKey>
          <RegistryKey Root="HKCR" Key="CLSID\{FCFF4228-81D1-440D-BB70-FDC516204A77}">
            <RegistryValue Type="string" Value="" />
            <RegistryValue Value=" Class" Type="string" />
          </RegistryKey>
        </Component>
      </DirectoryRef>

    </Product>
</Wix>

Please help. I am new to wix. THanks

Mark

Mark
  • 2,181
  • 3
  • 19
  • 28
  • 1
    Got the issue resolved. I was using tallow to generate the registry entries from .reg. Now I am using the code pasted in the answers from http://stackoverflow.com/questions/269423/how-to-generate-wix-xml-from-a-reg-file to convert and it works like a charm and no issues. Thanks :) – Mark Jan 27 '12 at 17:01
  • Convert your comment to the answer so that the question is answered. – Alexey Ivanov Jan 30 '12 at 18:37

1 Answers1

0

Got the issue resolved. I was using tallow to generate the registry entries from .reg. Now I am using the code pasted in the answers from stackoverflow.com/questions/269423/… to convert and it works like a charm and no issues.

Mark
  • 2,181
  • 3
  • 19
  • 28