Skip to content

Commit

Permalink
wix4: Issue #1667: AddDefaultNamespaces removing processing instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-shilo committed Nov 9, 2024
1 parent ff1ad85 commit c5a8446
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/src/WixSharp/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2014,9 +2014,9 @@ internal static XDocument AddDefaultNamespaces(this XDocument doc)

doc.Root.RemoveAll();

//need to add namespaces (via attributes) as well
doc.Root.Add(newRoot.Attributes());
doc.Root.Add(newRoot.Elements());
// Walking all nodes will pick up XProcessingInstruction too
foreach (XNode node in newRoot.Nodes())
doc.Root.Add(node);
}
return doc;
}
Expand Down

0 comments on commit c5a8446

Please sign in to comment.