Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Exception thrown once upgrading WiX 4 project again #40

@FireGiantHelp

Description

@FireGiantHelp

HeatWave Version

1.0.1

Visual Studio Version

17.6.2

Repro Steps

  1. Upgrade WiX v3 to WiX v4 in VS2019
  2. Upgrade to VS2022
  3. Open v4 .wixproj
  4. Prompted to upgrade v4 .wixproj again
  5. Exception thrown

Actual Result

We already upgraded from WiX 3 to 4 when using Visual Studio 2019 and all was working well.

We are now moving to VS 2022. After installing Heatwave for VS 2022, Heatwave asked to convert the wixproj, even though it already is in WiX 4 format.

The following stack exception was shown and written to the HeatWaveConvert.log

[05/30/2023 13:55:30.777]: Converting project file Setup.wixproj...
[05/30/2023 13:55:32.281]: *** ERROR ***: Import failed with an exception.
System.InvalidOperationException: Duplicate attribute.
at System.Xml.Linq.XElement.AddAttribute(XAttribute a)
at System.Xml.Linq.XContainer.Add(Object content)
at FireGiant.HeatWave.ProjectConversion.VotiveProjectConverter.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at FireGiant.HeatWave.ProjectConversion.VotiveProjectConverter.d__11.MoveNext().
[05/30/2023 13:55:32.284]: ---- Project Setup: Converted 0 files.
[05/30/2023 13:55:32.284]: ---- Total time: 01.514
[05/30/2023 13:55:32.284]: ========== Import complete: 1 errors, 0 warnings

However, after this, the wixproj works fine and we have no other issues. Also, no changes were made to any of the setup files such as the wxs and wixproj files.

Expected Result

No upgrade of a v4 .wixproj

This was original reported at wixtoolset/issues#7524

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmoreinfoMore information requested to diagnose the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions