【问题标题】:wix Item has already been added Key in dictionarywix 项目已添加 字典中的键
【发布时间】:2012-01-27 10:56:55
【问题描述】:

当我尝试添加注册表项时,我在 wix 中收到此错误:

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>

请帮忙。我是新来的蜡。 谢谢

标记

【问题讨论】:

  • 问题已解决。我使用tallow 从.reg 生成注册表项。现在我正在使用粘贴在stackoverflow.com/questions/269423/… 答案中的代码进行转换,它就像一个魅力,没有问题。谢谢:)
  • 将您的评论转换为答案,以便问题得到解答。

标签: wix wix3.5


【解决方案1】:

问题已解决。我使用tallow 从.reg 生成注册表项。现在我正在使用粘贴在 stackoverflow.com/questions/269423/... 答案中的代码进行转换,它就像一个魅力,没有问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-16
    • 2013-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-05
    相关资源
    最近更新 更多