Что вызывает ошибку WIX: «Задача« GenerateHarvestedSourceFiles »неожиданно завершилась неудачей.»? - PullRequest
0 голосов
/ 31 октября 2018

Я вижу эту ошибку в некоторых моих файлах проекта .wixproj, скомпилированных в Visual Studio 2015 с использованием WiX Toolset v3.11.0.1701 и WiX Expansion Pack v3.11.26. Трассировка стека содержит ошибку вставки дубликата ключа.

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() 
...