@joebigelow / wix / commits / 3261d8d9

Require SourceFile for BundleExtension.

Sean Hall committed Dec 7, 2020 at 19:38 UTC 3261d8d93365d866f5323b7806837655f1e5e084
1 file changed +1 -14
src/WixToolset.Core/Compiler_Bundle.cs
+1 -14
@@ -1122,7 +1122,7 @@ namespace WixToolset.Core
1122 var previousType = ComplexReferenceChildType.Unknown;
1123
1124 // The BundleExtension element acts like a Payload element so delegate to the "Payload" attribute parsing code to parse and create a Payload entry.
1125 - if (this.ParsePayloadElementContent(node, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId, previousType, previousId, false, out var id))
1125 + if (this.ParsePayloadElementContent(node, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId, previousType, previousId, true, out var id))
1126 {
1127 previousId = id;
1128 previousType = ComplexReferenceChildType.Payload;
@@ -1153,19 +1153,6 @@ namespace WixToolset.Core
1153 }
1154 }
1155
1156 - if (null == previousId)
1157 - {
1158 - // We need *either* <Payload> or <PayloadGroupRef> or even just @SourceFile on the BundleExtension...
1159 - // but we just say there's a missing <Payload>.
1160 - // TODO: Is there a better message for this?
1161 - this.Core.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "Payload"));
1162 - }
1163 -
1164 - if (null == id)
1165 - {
1166 - this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1167 - }
1168 -
1156 // Add the BundleExtension.
1157 if (!this.Core.EncounteredError)
1158 {