Skip to content

Commit

Permalink
#1733: (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-shilo committed Jan 22, 2025
1 parent 7780192 commit fa52036
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Source/src/WixSharp/ComRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -515,18 +515,22 @@ public void Process(ProcessingContext context)
}
else
{
var findComponent = context.XParent.FindFirst("Component");
//Debug.Assert(false);

var findComponent = context.XParent.Parent("Component") ?? // lookup upwards
context.XParent.FindFirst("Component"); // lookup downwards

if (findComponent != null)
{
findComponent.Add(element);
}
else
{
XElement newComponent = this.WrapInNewParentComponent(element);
context.XParent.Add(newComponent);
context.XParent.Add(element);
//XElement newComponent = this.WrapInNewParentComponent(element);
//context.XParent.Add(newComponent);

MapComponentToFeatures(newComponent.Attr("Id"), ActualFeatures, context);
//MapComponentToFeatures(newComponent.Attr("Id"), ActualFeatures, context);
}
}

Expand Down

0 comments on commit fa52036

Please sign in to comment.