我在使用WiX Toolset v3.11.0.1701和WiX Expansion Pack v3.11.26在Visual Studio 2015中编译的某些.wixproj项目文件中看到此错误。堆栈跟踪具有重复的键插入错误。
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: The "GenerateHarvestedSourceFiles" task failed unexpectedly.
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: System.ArgumentException: An item with the same key has already been added.
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.ExpandHarvestDirectivesCommand.ExpandComponentElement(XName directiveType, String directiveId, WixComponent element, IEnumerable`1 files, String keyId, String keyPathNameSeed, HeatWaveHarvestStrategy strategy, Boolean suppressFont, Dictionary`2 generatedFolders)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.ExpandHarvestDirectivesCommand.ExpandElement(XName directiveType, String directiveId, String documentPath, WixElement element, IEnumerable`1 files, String keyId, String keyPathNameSeed, HeatWaveHarvestStrategy strategy, Boolean suppressFont, Dictionary`2 generatedFolders)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.ExpandHarvestDirectivesCommand.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.Commands.HarvestToSourceFilesCommand.ExpandDocumentsWithHarvestDirectives(IEnumerable`1 directives)
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.Commands.HarvestToSourceFilesCommand.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at FireGiant.HeatWave.Harvesting.GenerateHarvestedSourceFiles.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\Program Files (x86)\WiX Toolset v3.11\bin\FireGiant.HeatWave.targets(70,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()