Skip to content

Commit

Permalink
- Fixed problem with ComponentRef not being updated when user sets …
Browse files Browse the repository at this point in the history
…custom `WixEntity.ComponentId`
  • Loading branch information
oleg.shilo authored and oleg.shilo committed Sep 26, 2021
1 parent c27a9ce commit 37946a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/src/WixSharp/AutoElements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,16 @@ static bool DefaultExpandCustomAttribute(XElement source, string item, WixProjec

destElement.AddElement(name, null, data);
}
else if (key == "Id")
{
var refs = destElement.Document.Root
.FindAll("ComponentRef")
.Where(x => x.HasAttribute("Id", destElement.GetAttribute(key)));

refs.ForEach(x => x.SetAttribute(key, value)); // reference a new Id

destElement.SetAttribute(key, value);
}
else
{
destElement.SetAttribute(key, value);
Expand Down

0 comments on commit 37946a5

Please sign in to comment.