当我尝试添加注册表项时,我在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>
请帮忙。我是wix的新手。 感谢
标记
答案 0 :(得分:0)
解决了问题。我使用tallow从.reg生成注册表项。现在我使用stackoverflow.com/questions/269423 / ...的答案中粘贴的代码进行转换,它就像一个魅力而没有任何问题。