diff --git a/Source/src/WixSharp/AutoElements.cs b/Source/src/WixSharp/AutoElements.cs index 6838cb05..287183ff 100644 --- a/Source/src/WixSharp/AutoElements.cs +++ b/Source/src/WixSharp/AutoElements.cs @@ -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);