aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Compiler.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-12-19 12:25:40 -0800
committerRob Mensching <rob@firegiant.com>2017-12-19 12:25:40 -0800
commit155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 (patch)
tree59d1f151bfde8068b6014b05b5c8cfea3402c974 /src/WixToolset.Core/Compiler.cs
parent6f1665ed759b31bd095f186f9239232c653597cd (diff)
downloadwix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.tar.gz
wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.tar.bz2
wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.zip
Integrate simplified message handling
Diffstat (limited to 'src/WixToolset.Core/Compiler.cs')
-rw-r--r--src/WixToolset.Core/Compiler.cs1250
1 files changed, 625 insertions, 625 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs
index 78461b44..74ca86ac 100644
--- a/src/WixToolset.Core/Compiler.cs
+++ b/src/WixToolset.Core/Compiler.cs
@@ -112,7 +112,7 @@ namespace WixToolset.Core
112 } 112 }
113 else 113 else
114 { 114 {
115 Messaging.Instance.OnMessage(WixErrors.DuplicateExtensionXmlSchemaNamespace(extension.GetType().ToString(), extension.Namespace.NamespaceName, collidingExtension.GetType().ToString())); 115 this.Context.Messaging.Write(ErrorMessages.DuplicateExtensionXmlSchemaNamespace(extension.GetType().ToString(), extension.Namespace.NamespaceName, collidingExtension.GetType().ToString()));
116 } 116 }
117 117
118 extension.PreCompile(context); 118 extension.PreCompile(context);
@@ -123,9 +123,9 @@ namespace WixToolset.Core
123 { 123 {
124 var parseHelper = context.ServiceProvider.GetService<IParseHelper>(); 124 var parseHelper = context.ServiceProvider.GetService<IParseHelper>();
125 125
126 this.Core = new CompilerCore(target, parseHelper, extensionsByNamespace); 126 this.Core = new CompilerCore(target, this.Context.Messaging, parseHelper, extensionsByNamespace);
127 this.Core.ShowPedanticMessages = this.ShowPedanticMessages; 127 this.Core.ShowPedanticMessages = this.ShowPedanticMessages;
128 this.componentIdPlaceholdersResolver = new WixVariableResolver(); 128 this.componentIdPlaceholdersResolver = new WixVariableResolver(this.Context.Messaging);
129 129
130 // parse the document 130 // parse the document
131 var source = context.Source; 131 var source = context.Source;
@@ -140,17 +140,17 @@ namespace WixToolset.Core
140 { 140 {
141 if (String.IsNullOrEmpty(source.Root.Name.NamespaceName)) 141 if (String.IsNullOrEmpty(source.Root.Name.NamespaceName))
142 { 142 {
143 this.Core.OnMessage(WixErrors.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", CompilerCore.WixNamespace.ToString())); 143 this.Core.Write(ErrorMessages.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", CompilerCore.WixNamespace.ToString()));
144 } 144 }
145 else 145 else
146 { 146 {
147 this.Core.OnMessage(WixErrors.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", source.Root.Name.NamespaceName, CompilerCore.WixNamespace.ToString())); 147 this.Core.Write(ErrorMessages.InvalidWixXmlNamespace(sourceLineNumbers, "Wix", source.Root.Name.NamespaceName, CompilerCore.WixNamespace.ToString()));
148 } 148 }
149 } 149 }
150 } 150 }
151 else 151 else
152 { 152 {
153 this.Core.OnMessage(WixErrors.InvalidDocumentElement(sourceLineNumbers, source.Root.Name.LocalName, "source", "Wix")); 153 this.Core.Write(ErrorMessages.InvalidDocumentElement(sourceLineNumbers, source.Root.Name.LocalName, "source", "Wix"));
154 } 154 }
155 155
156 // Resolve any Component Id placeholders compiled into the intermediate. 156 // Resolve any Component Id placeholders compiled into the intermediate.
@@ -189,7 +189,7 @@ namespace WixToolset.Core
189 this.Core = null; 189 this.Core = null;
190 } 190 }
191 191
192 return Messaging.Instance.EncounteredError ? null : target; 192 return this.Context.Messaging.EncounteredError ? null : target;
193 } 193 }
194 194
195 /// <summary> 195 /// <summary>
@@ -204,7 +204,7 @@ namespace WixToolset.Core
204 return s; 204 return s;
205 } 205 }
206 206
207 return String.Concat(s.Substring(0, 1).ToUpper(CultureInfo.InvariantCulture), s.Substring(1)); 207 return String.Concat(s.Substring(0, 1).ToUpperInvariant(), s.Substring(1));
208 } 208 }
209 209
210 /// <summary> 210 /// <summary>
@@ -254,7 +254,7 @@ namespace WixToolset.Core
254 { 254 {
255 if (property.Id != property.Id.ToUpperInvariant()) 255 if (property.Id != property.Id.ToUpperInvariant())
256 { 256 {
257 this.Core.OnMessage(WixErrors.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id)); 257 this.Core.Write(ErrorMessages.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id));
258 } 258 }
259 259
260 var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppSearch, property); 260 var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.AppSearch, property);
@@ -290,7 +290,7 @@ namespace WixToolset.Core
290 Group group = match.Groups["identifier"]; 290 Group group = match.Groups["identifier"];
291 if (group.Success) 291 if (group.Success)
292 { 292 {
293 this.Core.OnMessage(WixWarnings.PropertyValueContainsPropertyReference(sourceLineNumbers, property.Id, group.Value)); 293 this.Core.Write(WarningMessages.PropertyValueContainsPropertyReference(sourceLineNumbers, property.Id, group.Value));
294 } 294 }
295 } 295 }
296 } 296 }
@@ -330,7 +330,7 @@ namespace WixToolset.Core
330 { 330 {
331 if (secure && property.Id != property.Id.ToUpperInvariant()) 331 if (secure && property.Id != property.Id.ToUpperInvariant())
332 { 332 {
333 this.Core.OnMessage(WixErrors.SecurePropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id)); 333 this.Core.Write(ErrorMessages.SecurePropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id));
334 } 334 }
335 335
336 if (null == section) 336 if (null == section)
@@ -426,12 +426,12 @@ namespace WixToolset.Core
426 426
427 if (null == appId) 427 if (null == appId)
428 { 428 {
429 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 429 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
430 } 430 }
431 431
432 if ((YesNoType.No == advertise && YesNoType.Yes == appIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == appIdAdvertise)) 432 if ((YesNoType.No == advertise && YesNoType.Yes == appIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == appIdAdvertise))
433 { 433 {
434 this.Core.OnMessage(WixErrors.AppIdIncompatibleAdvertiseState(sourceLineNumbers, node.Name.LocalName, "Advertise", appIdAdvertise.ToString(), advertise.ToString())); 434 this.Core.Write(ErrorMessages.AppIdIncompatibleAdvertiseState(sourceLineNumbers, node.Name.LocalName, "Advertise", appIdAdvertise.ToString(), advertise.ToString()));
435 } 435 }
436 else 436 else
437 { 437 {
@@ -468,7 +468,7 @@ namespace WixToolset.Core
468 { 468 {
469 if (null != description) 469 if (null != description)
470 { 470 {
471 this.Core.OnMessage(WixErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Description")); 471 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Description"));
472 } 472 }
473 473
474 if (!this.Core.EncounteredError) 474 if (!this.Core.EncounteredError)
@@ -569,7 +569,7 @@ namespace WixToolset.Core
569 569
570 if (null == id) 570 if (null == id)
571 { 571 {
572 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 572 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
573 } 573 }
574 574
575 this.Core.ParseForExtensionElements(node); 575 this.Core.ParseForExtensionElements(node);
@@ -609,12 +609,12 @@ namespace WixToolset.Core
609 case "src": 609 case "src":
610 if (null != sourceFile) 610 if (null != sourceFile)
611 { 611 {
612 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile", "src")); 612 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile", "src"));
613 } 613 }
614 614
615 if ("src" == attrib.Name.LocalName) 615 if ("src" == attrib.Name.LocalName)
616 { 616 {
617 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile")); 617 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
618 } 618 }
619 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 619 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
620 break; 620 break;
@@ -634,27 +634,27 @@ namespace WixToolset.Core
634 634
635 if (null == id) 635 if (null == id)
636 { 636 {
637 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 637 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
638 id = Identifier.Invalid; 638 id = Identifier.Invalid;
639 } 639 }
640 else if (!String.IsNullOrEmpty(id.Id)) // only check legal values 640 else if (!String.IsNullOrEmpty(id.Id)) // only check legal values
641 { 641 {
642 if (55 < id.Id.Length) 642 if (55 < id.Id.Length)
643 { 643 {
644 this.Core.OnMessage(WixErrors.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 55)); 644 this.Core.Write(ErrorMessages.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 55));
645 } 645 }
646 else if (!this.compilingProduct) // if we're not doing a product then we can't be sure that a binary identifier will fit when modularized 646 else if (!this.compilingProduct) // if we're not doing a product then we can't be sure that a binary identifier will fit when modularized
647 { 647 {
648 if (18 < id.Id.Length) 648 if (18 < id.Id.Length)
649 { 649 {
650 this.Core.OnMessage(WixWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 18)); 650 this.Core.Write(WarningMessages.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 18));
651 } 651 }
652 } 652 }
653 } 653 }
654 654
655 if (null == sourceFile) 655 if (null == sourceFile)
656 { 656 {
657 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 657 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
658 } 658 }
659 659
660 this.Core.ParseForExtensionElements(node); 660 this.Core.ParseForExtensionElements(node);
@@ -710,27 +710,27 @@ namespace WixToolset.Core
710 710
711 if (null == id) 711 if (null == id)
712 { 712 {
713 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 713 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
714 id = Identifier.Invalid; 714 id = Identifier.Invalid;
715 } 715 }
716 else if (!String.IsNullOrEmpty(id.Id)) // only check legal values 716 else if (!String.IsNullOrEmpty(id.Id)) // only check legal values
717 { 717 {
718 if (57 < id.Id.Length) 718 if (57 < id.Id.Length)
719 { 719 {
720 this.Core.OnMessage(WixErrors.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 57)); 720 this.Core.Write(ErrorMessages.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 57));
721 } 721 }
722 else if (!this.compilingProduct) // if we're not doing a product then we can't be sure that a binary identifier will fit when modularized 722 else if (!this.compilingProduct) // if we're not doing a product then we can't be sure that a binary identifier will fit when modularized
723 { 723 {
724 if (20 < id.Id.Length) 724 if (20 < id.Id.Length)
725 { 725 {
726 this.Core.OnMessage(WixWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 20)); 726 this.Core.Write(WarningMessages.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 20));
727 } 727 }
728 } 728 }
729 } 729 }
730 730
731 if (null == sourceFile) 731 if (null == sourceFile)
732 { 732 {
733 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 733 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
734 } 734 }
735 735
736 this.Core.ParseForExtensionElements(node); 736 this.Core.ParseForExtensionElements(node);
@@ -776,7 +776,7 @@ namespace WixToolset.Core
776 776
777 if (null == property) 777 if (null == property)
778 { 778 {
779 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property")); 779 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
780 } 780 }
781 781
782 // find unexpected child elements 782 // find unexpected child elements
@@ -845,12 +845,12 @@ namespace WixToolset.Core
845 845
846 if (null == id) 846 if (null == id)
847 { 847 {
848 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 848 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
849 } 849 }
850 850
851 if (null == productCode) 851 if (null == productCode)
852 { 852 {
853 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProductCode")); 853 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProductCode"));
854 } 854 }
855 855
856 this.Core.ParseForExtensionElements(node); 856 this.Core.ParseForExtensionElements(node);
@@ -917,12 +917,12 @@ namespace WixToolset.Core
917 917
918 if (null == id) 918 if (null == id)
919 { 919 {
920 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 920 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
921 } 921 }
922 922
923 if (null == qualifier) 923 if (null == qualifier)
924 { 924 {
925 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Qualifier")); 925 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Qualifier"));
926 } 926 }
927 927
928 this.Core.ParseForExtensionElements(node); 928 this.Core.ParseForExtensionElements(node);
@@ -1066,7 +1066,7 @@ namespace WixToolset.Core
1066 1066
1067 if (null == classId) 1067 if (null == classId)
1068 { 1068 {
1069 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1069 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1070 } 1070 }
1071 1071
1072 HashSet<string> uniqueContexts = new HashSet<string>(); 1072 HashSet<string> uniqueContexts = new HashSet<string>();
@@ -1074,7 +1074,7 @@ namespace WixToolset.Core
1074 { 1074 {
1075 if (uniqueContexts.Contains(context)) 1075 if (uniqueContexts.Contains(context))
1076 { 1076 {
1077 this.Core.OnMessage(WixErrors.DuplicateContextValue(sourceLineNumbers, context)); 1077 this.Core.Write(ErrorMessages.DuplicateContextValue(sourceLineNumbers, context));
1078 } 1078 }
1079 else 1079 else
1080 { 1080 {
@@ -1093,7 +1093,7 @@ namespace WixToolset.Core
1093 1093
1094 if ((YesNoType.No == advertise && YesNoType.Yes == classAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == classAdvertise)) 1094 if ((YesNoType.No == advertise && YesNoType.Yes == classAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == classAdvertise))
1095 { 1095 {
1096 this.Core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, classAdvertise.ToString(), advertise.ToString())); 1096 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, classAdvertise.ToString(), advertise.ToString()));
1097 } 1097 }
1098 else 1098 else
1099 { 1099 {
@@ -1108,12 +1108,12 @@ namespace WixToolset.Core
1108 1108
1109 if (YesNoType.Yes == advertise && 0 == contexts.Length) 1109 if (YesNoType.Yes == advertise && 0 == contexts.Length)
1110 { 1110 {
1111 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Context", "Advertise", "yes")); 1111 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Context", "Advertise", "yes"));
1112 } 1112 }
1113 1113
1114 if (!String.IsNullOrEmpty(parentAppId) && !String.IsNullOrEmpty(appId)) 1114 if (!String.IsNullOrEmpty(parentAppId) && !String.IsNullOrEmpty(appId))
1115 { 1115 {
1116 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AppId", node.Parent.Name.LocalName)); 1116 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AppId", node.Parent.Name.LocalName));
1117 } 1117 }
1118 1118
1119 if (!String.IsNullOrEmpty(localFileServer)) 1119 if (!String.IsNullOrEmpty(localFileServer))
@@ -1173,12 +1173,12 @@ namespace WixToolset.Core
1173 { 1173 {
1174 if (null != fileServer || null != localFileServer) 1174 if (null != fileServer || null != localFileServer)
1175 { 1175 {
1176 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Server", "Advertise", "yes")); 1176 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Server", "Advertise", "yes"));
1177 } 1177 }
1178 1178
1179 if (null != foreignServer) 1179 if (null != foreignServer)
1180 { 1180 {
1181 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Advertise", "yes")); 1181 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Advertise", "yes"));
1182 } 1182 }
1183 1183
1184 if (null == appId && null != parentAppId) 1184 if (null == appId && null != parentAppId)
@@ -1226,16 +1226,16 @@ namespace WixToolset.Core
1226 { 1226 {
1227 if (null == fileServer && null == localFileServer && null == foreignServer) 1227 if (null == fileServer && null == localFileServer && null == foreignServer)
1228 { 1228 {
1229 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server")); 1229 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server"));
1230 } 1230 }
1231 1231
1232 if (null != fileServer && null != foreignServer) 1232 if (null != fileServer && null != foreignServer)
1233 { 1233 {
1234 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "File")); 1234 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "File"));
1235 } 1235 }
1236 else if (null != localFileServer && null != foreignServer) 1236 else if (null != localFileServer && null != foreignServer)
1237 { 1237 {
1238 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server")); 1238 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ForeignServer", "Server"));
1239 } 1239 }
1240 else if (null == fileServer) 1240 else if (null == fileServer)
1241 { 1241 {
@@ -1244,7 +1244,7 @@ namespace WixToolset.Core
1244 1244
1245 if (null != appId) // need to use nesting (not a reference) for the unadvertised Class elements 1245 if (null != appId) // need to use nesting (not a reference) for the unadvertised Class elements
1246 { 1246 {
1247 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "AppId", "Advertise", "no")); 1247 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "AppId", "Advertise", "no"));
1248 } 1248 }
1249 1249
1250 // add the core registry keys for each context in the class 1250 // add the core registry keys for each context in the class
@@ -1254,7 +1254,7 @@ namespace WixToolset.Core
1254 { 1254 {
1255 if (null != argument) 1255 if (null != argument)
1256 { 1256 {
1257 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Arguments", "Context", context)); 1257 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Arguments", "Context", context));
1258 } 1258 }
1259 1259
1260 if (null != fileServer) 1260 if (null != fileServer)
@@ -1291,7 +1291,7 @@ namespace WixToolset.Core
1291 } 1291 }
1292 else 1292 else
1293 { 1293 {
1294 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Context", context, "InprocServer", "InprocServer32", "LocalServer", "LocalServer32")); 1294 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Context", context, "InprocServer", "InprocServer32", "LocalServer", "LocalServer32"));
1295 } 1295 }
1296 1296
1297 this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context), String.Empty, formattedContextString, componentId); // ClassId context 1297 this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("CLSID\\", classId, "\\", context), String.Empty, formattedContextString, componentId); // ClassId context
@@ -1342,7 +1342,7 @@ namespace WixToolset.Core
1342 1342
1343 if (YesNoType.NotSet != relativePath) // ClassId's RelativePath 1343 if (YesNoType.NotSet != relativePath) // ClassId's RelativePath
1344 { 1344 {
1345 this.Core.OnMessage(WixErrors.RelativePathForRegistryElement(sourceLineNumbers)); 1345 this.Core.Write(ErrorMessages.RelativePathForRegistryElement(sourceLineNumbers));
1346 } 1346 }
1347 } 1347 }
1348 1348
@@ -1454,12 +1454,12 @@ namespace WixToolset.Core
1454 1454
1455 if (null == interfaceId) 1455 if (null == interfaceId)
1456 { 1456 {
1457 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1457 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1458 } 1458 }
1459 1459
1460 if (null == name) 1460 if (null == name)
1461 { 1461 {
1462 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 1462 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
1463 } 1463 }
1464 1464
1465 this.Core.ParseForExtensionElements(node); 1465 this.Core.ParseForExtensionElements(node);
@@ -1537,17 +1537,17 @@ namespace WixToolset.Core
1537 1537
1538 if (null == mask) 1538 if (null == mask)
1539 { 1539 {
1540 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Mask")); 1540 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Mask"));
1541 } 1541 }
1542 1542
1543 if (CompilerConstants.IntegerNotSet == offset) 1543 if (CompilerConstants.IntegerNotSet == offset)
1544 { 1544 {
1545 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset")); 1545 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset"));
1546 } 1546 }
1547 1547
1548 if (null == value) 1548 if (null == value)
1549 { 1549 {
1550 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 1550 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
1551 } 1551 }
1552 1552
1553 this.Core.ParseForExtensionElements(node); 1553 this.Core.ParseForExtensionElements(node);
@@ -1556,7 +1556,7 @@ namespace WixToolset.Core
1556 { 1556 {
1557 if (mask.Length != value.Length) 1557 if (mask.Length != value.Length)
1558 { 1558 {
1559 this.Core.OnMessage(WixErrors.ValueAndMaskMustBeSameLength(sourceLineNumbers)); 1559 this.Core.Write(ErrorMessages.ValueAndMaskMustBeSameLength(sourceLineNumbers));
1560 } 1560 }
1561 cb = mask.Length / 2; 1561 cb = mask.Length / 2;
1562 } 1562 }
@@ -1628,7 +1628,7 @@ namespace WixToolset.Core
1628 1628
1629 if (null == minimum && null == maximum) 1629 if (null == minimum && null == maximum)
1630 { 1630 {
1631 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Minimum", "Maximum")); 1631 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Minimum", "Maximum"));
1632 } 1632 }
1633 1633
1634 this.Core.ParseForExtensionElements(node); 1634 this.Core.ParseForExtensionElements(node);
@@ -1697,7 +1697,7 @@ namespace WixToolset.Core
1697 type = 2; 1697 type = 2;
1698 break; 1698 break;
1699 default: 1699 default:
1700 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "directory", "file", "raw")); 1700 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "directory", "file", "raw"));
1701 break; 1701 break;
1702 } 1702 }
1703 } 1703 }
@@ -1729,17 +1729,17 @@ namespace WixToolset.Core
1729 1729
1730 if (null == key) 1730 if (null == key)
1731 { 1731 {
1732 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 1732 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
1733 } 1733 }
1734 1734
1735 if (CompilerConstants.IntegerNotSet == root) 1735 if (CompilerConstants.IntegerNotSet == root)
1736 { 1736 {
1737 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root")); 1737 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root"));
1738 } 1738 }
1739 1739
1740 if (CompilerConstants.IntegerNotSet == type) 1740 if (CompilerConstants.IntegerNotSet == type)
1741 { 1741 {
1742 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type")); 1742 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
1743 } 1743 }
1744 1744
1745 signature = id.Id; 1745 signature = id.Id;
@@ -1753,7 +1753,7 @@ namespace WixToolset.Core
1753 case "DirectorySearch": 1753 case "DirectorySearch":
1754 if (oneChild) 1754 if (oneChild)
1755 { 1755 {
1756 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1756 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1757 } 1757 }
1758 oneChild = true; 1758 oneChild = true;
1759 1759
@@ -1763,7 +1763,7 @@ namespace WixToolset.Core
1763 case "DirectorySearchRef": 1763 case "DirectorySearchRef":
1764 if (oneChild) 1764 if (oneChild)
1765 { 1765 {
1766 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1766 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1767 } 1767 }
1768 oneChild = true; 1768 oneChild = true;
1769 signature = this.ParseDirectorySearchRefElement(child, id.Id); 1769 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -1771,7 +1771,7 @@ namespace WixToolset.Core
1771 case "FileSearch": 1771 case "FileSearch":
1772 if (oneChild) 1772 if (oneChild)
1773 { 1773 {
1774 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1774 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1775 } 1775 }
1776 oneChild = true; 1776 oneChild = true;
1777 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 1777 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -1780,7 +1780,7 @@ namespace WixToolset.Core
1780 case "FileSearchRef": 1780 case "FileSearchRef":
1781 if (oneChild) 1781 if (oneChild)
1782 { 1782 {
1783 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1783 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1784 } 1784 }
1785 oneChild = true; 1785 oneChild = true;
1786 string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures 1786 string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures
@@ -1844,7 +1844,7 @@ namespace WixToolset.Core
1844 1844
1845 if (null == id) 1845 if (null == id)
1846 { 1846 {
1847 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 1847 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1848 } 1848 }
1849 1849
1850 this.Core.ParseForExtensionElements(node); 1850 this.Core.ParseForExtensionElements(node);
@@ -1933,7 +1933,7 @@ namespace WixToolset.Core
1933 case "DirectorySearch": 1933 case "DirectorySearch":
1934 if (oneChild) 1934 if (oneChild)
1935 { 1935 {
1936 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 1936 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
1937 } 1937 }
1938 oneChild = true; 1938 oneChild = true;
1939 signature = this.ParseDirectorySearchElement(child, "CCP_DRIVE"); 1939 signature = this.ParseDirectorySearchElement(child, "CCP_DRIVE");
@@ -1941,7 +1941,7 @@ namespace WixToolset.Core
1941 case "DirectorySearchRef": 1941 case "DirectorySearchRef":
1942 if (oneChild) 1942 if (oneChild)
1943 { 1943 {
1944 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 1944 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
1945 } 1945 }
1946 oneChild = true; 1946 oneChild = true;
1947 signature = this.ParseDirectorySearchRefElement(child, "CCP_DRIVE"); 1947 signature = this.ParseDirectorySearchRefElement(child, "CCP_DRIVE");
@@ -1959,7 +1959,7 @@ namespace WixToolset.Core
1959 1959
1960 if (null == signature) 1960 if (null == signature)
1961 { 1961 {
1962 this.Core.OnMessage(WixErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName)); 1962 this.Core.Write(ErrorMessages.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
1963 } 1963 }
1964 1964
1965 return signature; 1965 return signature;
@@ -2005,13 +2005,13 @@ namespace WixToolset.Core
2005 else if (signature != sig) 2005 else if (signature != sig)
2006 { 2006 {
2007 // all signatures under a ComplianceCheck must be the same 2007 // all signatures under a ComplianceCheck must be the same
2008 this.Core.OnMessage(WixErrors.MultipleIdentifiersFound(sourceLineNumbers, node.Name.LocalName, sig, signature)); 2008 this.Core.Write(ErrorMessages.MultipleIdentifiersFound(sourceLineNumbers, node.Name.LocalName, sig, signature));
2009 } 2009 }
2010 } 2010 }
2011 2011
2012 if (null == signature) 2012 if (null == signature)
2013 { 2013 {
2014 this.Core.OnMessage(WixErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName)); 2014 this.Core.Write(ErrorMessages.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
2015 } 2015 }
2016 2016
2017 if (!this.Core.EncounteredError) 2017 if (!this.Core.EncounteredError)
@@ -2110,7 +2110,7 @@ namespace WixToolset.Core
2110 bits |= MsiInterop.MsidbComponentAttributesSourceOnly; 2110 bits |= MsiInterop.MsidbComponentAttributesSourceOnly;
2111 break; 2111 break;
2112 default: 2112 default:
2113 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "either", "local", "source")); 2113 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "either", "local", "source"));
2114 break; 2114 break;
2115 } 2115 }
2116 } 2116 }
@@ -2181,30 +2181,30 @@ namespace WixToolset.Core
2181 2181
2182 if (null == directoryId) 2182 if (null == directoryId)
2183 { 2183 {
2184 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Directory")); 2184 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Directory"));
2185 } 2185 }
2186 2186
2187 if (String.IsNullOrEmpty(guid) && MsiInterop.MsidbComponentAttributesShared == (bits & MsiInterop.MsidbComponentAttributesShared)) 2187 if (String.IsNullOrEmpty(guid) && MsiInterop.MsidbComponentAttributesShared == (bits & MsiInterop.MsidbComponentAttributesShared))
2188 { 2188 {
2189 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Shared", "yes", "Guid", "")); 2189 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Shared", "yes", "Guid", ""));
2190 } 2190 }
2191 2191
2192 if (String.IsNullOrEmpty(guid) && MsiInterop.MsidbComponentAttributesPermanent == (bits & MsiInterop.MsidbComponentAttributesPermanent)) 2192 if (String.IsNullOrEmpty(guid) && MsiInterop.MsidbComponentAttributesPermanent == (bits & MsiInterop.MsidbComponentAttributesPermanent))
2193 { 2193 {
2194 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Permanent", "yes", "Guid", "")); 2194 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Permanent", "yes", "Guid", ""));
2195 } 2195 }
2196 2196
2197 if (null != feature) 2197 if (null != feature)
2198 { 2198 {
2199 if (this.compilingModule) 2199 if (this.compilingModule)
2200 { 2200 {
2201 this.Core.OnMessage(WixErrors.IllegalAttributeInMergeModule(sourceLineNumbers, node.Name.LocalName, "Feature")); 2201 this.Core.Write(ErrorMessages.IllegalAttributeInMergeModule(sourceLineNumbers, node.Name.LocalName, "Feature"));
2202 } 2202 }
2203 else 2203 else
2204 { 2204 {
2205 if (ComplexReferenceParentType.Feature == parentType || ComplexReferenceParentType.FeatureGroup == parentType) 2205 if (ComplexReferenceParentType.Feature == parentType || ComplexReferenceParentType.FeatureGroup == parentType)
2206 { 2206 {
2207 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Feature", node.Parent.Name.LocalName)); 2207 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Feature", node.Parent.Name.LocalName));
2208 } 2208 }
2209 else 2209 else
2210 { 2210 {
@@ -2236,7 +2236,7 @@ namespace WixToolset.Core
2236 if (null != condition) 2236 if (null != condition)
2237 { 2237 {
2238 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 2238 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2239 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 2239 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
2240 } 2240 }
2241 condition = this.ParseConditionElement(child, node.Name.LocalName, null, null); 2241 condition = this.ParseConditionElement(child, node.Name.LocalName, null, null);
2242 break; 2242 break;
@@ -2369,7 +2369,7 @@ namespace WixToolset.Core
2369 2369
2370 if (keyFound && YesNoType.Yes == keyPathSet) 2370 if (keyFound && YesNoType.Yes == keyPathSet)
2371 { 2371 {
2372 this.Core.OnMessage(WixErrors.ComponentMultipleKeyPaths(sourceLineNumbers, node.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource")); 2372 this.Core.Write(ErrorMessages.ComponentMultipleKeyPaths(sourceLineNumbers, node.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
2373 } 2373 }
2374 2374
2375 // if a possible KeyPath has been found and that value was explicitly set as 2375 // if a possible KeyPath has been found and that value was explicitly set as
@@ -2398,13 +2398,13 @@ namespace WixToolset.Core
2398 { 2398 {
2399 if (encounteredODBCDataSource) 2399 if (encounteredODBCDataSource)
2400 { 2400 {
2401 this.Core.OnMessage(WixErrors.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers)); 2401 this.Core.Write(ErrorMessages.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers));
2402 isGeneratableGuidOk = false; 2402 isGeneratableGuidOk = false;
2403 } 2403 }
2404 2404
2405 if (0 != files && MsiInterop.MsidbComponentAttributesRegistryKeyPath == keyBits) 2405 if (0 != files && MsiInterop.MsidbComponentAttributesRegistryKeyPath == keyBits)
2406 { 2406 {
2407 this.Core.OnMessage(WixErrors.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers, true)); 2407 this.Core.Write(ErrorMessages.IllegalComponentWithAutoGeneratedGuid(sourceLineNumbers, true));
2408 isGeneratableGuidOk = false; 2408 isGeneratableGuidOk = false;
2409 } 2409 }
2410 } 2410 }
@@ -2412,7 +2412,7 @@ namespace WixToolset.Core
2412 // check for implicit KeyPath which can easily be accidentally changed 2412 // check for implicit KeyPath which can easily be accidentally changed
2413 if (this.ShowPedanticMessages && !keyFound && !isGeneratableGuidOk) 2413 if (this.ShowPedanticMessages && !keyFound && !isGeneratableGuidOk)
2414 { 2414 {
2415 this.Core.OnMessage(WixErrors.ImplicitComponentKeyPath(sourceLineNumbers, id.Id)); 2415 this.Core.Write(ErrorMessages.ImplicitComponentKeyPath(sourceLineNumbers, id.Id));
2416 } 2416 }
2417 2417
2418 // if there isn't an @Id attribute value, replace the placeholder with the id of the keypath. 2418 // if there isn't an @Id attribute value, replace the placeholder with the id of the keypath.
@@ -2428,14 +2428,14 @@ namespace WixToolset.Core
2428 } 2428 }
2429 else 2429 else
2430 { 2430 {
2431 this.Core.OnMessage(WixErrors.CannotDefaultComponentId(sourceLineNumbers)); 2431 this.Core.Write(ErrorMessages.CannotDefaultComponentId(sourceLineNumbers));
2432 } 2432 }
2433 } 2433 }
2434 2434
2435 // If an id was not determined by now, we have to error. 2435 // If an id was not determined by now, we have to error.
2436 if (null == id) 2436 if (null == id)
2437 { 2437 {
2438 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 2438 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2439 } 2439 }
2440 2440
2441 // finally add the Component table row 2441 // finally add the Component table row
@@ -2524,7 +2524,7 @@ namespace WixToolset.Core
2524 2524
2525 if (null == id) 2525 if (null == id)
2526 { 2526 {
2527 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 2527 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2528 id = Identifier.Invalid; 2528 id = Identifier.Invalid;
2529 } 2529 }
2530 2530
@@ -2609,7 +2609,7 @@ namespace WixToolset.Core
2609 2609
2610 if (null == id) 2610 if (null == id)
2611 { 2611 {
2612 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 2612 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2613 } 2613 }
2614 2614
2615 this.Core.ParseForExtensionElements(node); 2615 this.Core.ParseForExtensionElements(node);
@@ -2658,7 +2658,7 @@ namespace WixToolset.Core
2658 2658
2659 if (null == id) 2659 if (null == id)
2660 { 2660 {
2661 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 2661 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2662 } 2662 }
2663 2663
2664 this.Core.ParseForExtensionElements(node); 2664 this.Core.ParseForExtensionElements(node);
@@ -2705,7 +2705,7 @@ namespace WixToolset.Core
2705 type = MsiInterop.MsidbLocatorTypeFileName; 2705 type = MsiInterop.MsidbLocatorTypeFileName;
2706 break; 2706 break;
2707 default: 2707 default:
2708 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue, "directory", "file")); 2708 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue, "directory", "file"));
2709 break; 2709 break;
2710 } 2710 }
2711 } 2711 }
@@ -2737,7 +2737,7 @@ namespace WixToolset.Core
2737 case "DirectorySearch": 2737 case "DirectorySearch":
2738 if (oneChild) 2738 if (oneChild)
2739 { 2739 {
2740 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2740 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2741 } 2741 }
2742 oneChild = true; 2742 oneChild = true;
2743 2743
@@ -2747,7 +2747,7 @@ namespace WixToolset.Core
2747 case "DirectorySearchRef": 2747 case "DirectorySearchRef":
2748 if (oneChild) 2748 if (oneChild)
2749 { 2749 {
2750 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2750 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2751 } 2751 }
2752 oneChild = true; 2752 oneChild = true;
2753 signature = this.ParseDirectorySearchRefElement(child, id.Id); 2753 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -2755,7 +2755,7 @@ namespace WixToolset.Core
2755 case "FileSearch": 2755 case "FileSearch":
2756 if (oneChild) 2756 if (oneChild)
2757 { 2757 {
2758 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2758 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2759 } 2759 }
2760 oneChild = true; 2760 oneChild = true;
2761 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 2761 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -2764,7 +2764,7 @@ namespace WixToolset.Core
2764 case "FileSearchRef": 2764 case "FileSearchRef":
2765 if (oneChild) 2765 if (oneChild)
2766 { 2766 {
2767 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2767 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2768 } 2768 }
2769 oneChild = true; 2769 oneChild = true;
2770 string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures 2770 string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures
@@ -2907,7 +2907,7 @@ namespace WixToolset.Core
2907 case "FileId": 2907 case "FileId":
2908 if (null != fileId) 2908 if (null != fileId)
2909 { 2909 {
2910 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); 2910 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
2911 } 2911 }
2912 fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 2912 fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2913 this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId); 2913 this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId);
@@ -2934,22 +2934,22 @@ namespace WixToolset.Core
2934 2934
2935 if (null != sourceFolder && null != sourceDirectory) // SourceFolder and SourceDirectory cannot coexist 2935 if (null != sourceFolder && null != sourceDirectory) // SourceFolder and SourceDirectory cannot coexist
2936 { 2936 {
2937 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceDirectory")); 2937 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceDirectory"));
2938 } 2938 }
2939 2939
2940 if (null != sourceFolder && null != sourceProperty) // SourceFolder and SourceProperty cannot coexist 2940 if (null != sourceFolder && null != sourceProperty) // SourceFolder and SourceProperty cannot coexist
2941 { 2941 {
2942 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceProperty")); 2942 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "SourceProperty"));
2943 } 2943 }
2944 2944
2945 if (null != sourceDirectory && null != sourceProperty) // SourceDirectory and SourceProperty cannot coexist 2945 if (null != sourceDirectory && null != sourceProperty) // SourceDirectory and SourceProperty cannot coexist
2946 { 2946 {
2947 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "SourceDirectory")); 2947 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "SourceDirectory"));
2948 } 2948 }
2949 2949
2950 if (null != destinationDirectory && null != destinationProperty) // DestinationDirectory and DestinationProperty cannot coexist 2950 if (null != destinationDirectory && null != destinationProperty) // DestinationDirectory and DestinationProperty cannot coexist
2951 { 2951 {
2952 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationProperty", "DestinationDirectory")); 2952 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationProperty", "DestinationDirectory"));
2953 } 2953 }
2954 2954
2955 // generate a short file name 2955 // generate a short file name
@@ -2970,7 +2970,7 @@ namespace WixToolset.Core
2970 // DestinationDirectory or DestinationProperty must be specified 2970 // DestinationDirectory or DestinationProperty must be specified
2971 if (null == destinationDirectory && null == destinationProperty) 2971 if (null == destinationDirectory && null == destinationProperty)
2972 { 2972 {
2973 this.Core.OnMessage(WixErrors.ExpectedAttributesWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationDirectory", "DestinationProperty", "FileId")); 2973 this.Core.Write(ErrorMessages.ExpectedAttributesWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DestinationDirectory", "DestinationProperty", "FileId"));
2974 } 2974 }
2975 2975
2976 if (!this.Core.EncounteredError) 2976 if (!this.Core.EncounteredError)
@@ -3007,32 +3007,32 @@ namespace WixToolset.Core
3007 { 3007 {
3008 if (null != sourceDirectory) 3008 if (null != sourceDirectory)
3009 { 3009 {
3010 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceDirectory", "FileId")); 3010 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceDirectory", "FileId"));
3011 } 3011 }
3012 3012
3013 if (null != sourceFolder) 3013 if (null != sourceFolder)
3014 { 3014 {
3015 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "FileId")); 3015 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFolder", "FileId"));
3016 } 3016 }
3017 3017
3018 if (null != sourceName) 3018 if (null != sourceName)
3019 { 3019 {
3020 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceName", "FileId")); 3020 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceName", "FileId"));
3021 } 3021 }
3022 3022
3023 if (null != sourceProperty) 3023 if (null != sourceProperty)
3024 { 3024 {
3025 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "FileId")); 3025 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "SourceProperty", "FileId"));
3026 } 3026 }
3027 3027
3028 if (delete) 3028 if (delete)
3029 { 3029 {
3030 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Delete", "FileId")); 3030 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Delete", "FileId"));
3031 } 3031 }
3032 3032
3033 if (null == destinationName && null == destinationDirectory && null == destinationProperty) 3033 if (null == destinationName && null == destinationDirectory && null == destinationProperty)
3034 { 3034 {
3035 this.Core.OnMessage(WixWarnings.CopyFileFileIdUseless(sourceLineNumbers)); 3035 this.Core.Write(WarningMessages.CopyFileFileIdUseless(sourceLineNumbers));
3036 } 3036 }
3037 3037
3038 if (!this.Core.EncounteredError) 3038 if (!this.Core.EncounteredError)
@@ -3084,7 +3084,7 @@ namespace WixToolset.Core
3084 case "BinaryKey": 3084 case "BinaryKey":
3085 if (null != source) 3085 if (null != source)
3086 { 3086 {
3087 this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script")); 3087 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3088 } 3088 }
3089 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 3089 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3090 sourceBits = MsiInterop.MsidbCustomActionTypeBinaryData; 3090 sourceBits = MsiInterop.MsidbCustomActionTypeBinaryData;
@@ -3093,7 +3093,7 @@ namespace WixToolset.Core
3093 case "Directory": 3093 case "Directory":
3094 if (null != source) 3094 if (null != source)
3095 { 3095 {
3096 this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script")); 3096 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3097 } 3097 }
3098 source = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null); 3098 source = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
3099 sourceBits = MsiInterop.MsidbCustomActionTypeDirectory; 3099 sourceBits = MsiInterop.MsidbCustomActionTypeDirectory;
@@ -3101,7 +3101,7 @@ namespace WixToolset.Core
3101 case "DllEntry": 3101 case "DllEntry":
3102 if (null != target) 3102 if (null != target)
3103 { 3103 {
3104 this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3104 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3105 } 3105 }
3106 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3106 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3107 targetBits = MsiInterop.MsidbCustomActionTypeDll; 3107 targetBits = MsiInterop.MsidbCustomActionTypeDll;
@@ -3109,7 +3109,7 @@ namespace WixToolset.Core
3109 case "Error": 3109 case "Error":
3110 if (null != target) 3110 if (null != target)
3111 { 3111 {
3112 this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3112 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3113 } 3113 }
3114 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3114 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3115 targetBits = MsiInterop.MsidbCustomActionTypeTextData | MsiInterop.MsidbCustomActionTypeSourceFile; 3115 targetBits = MsiInterop.MsidbCustomActionTypeTextData | MsiInterop.MsidbCustomActionTypeSourceFile;
@@ -3140,7 +3140,7 @@ namespace WixToolset.Core
3140 case "ExeCommand": 3140 case "ExeCommand":
3141 if (null != target) 3141 if (null != target)
3142 { 3142 {
3143 this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3143 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3144 } 3144 }
3145 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3145 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3146 targetBits = MsiInterop.MsidbCustomActionTypeExe; 3146 targetBits = MsiInterop.MsidbCustomActionTypeExe;
@@ -3173,7 +3173,7 @@ namespace WixToolset.Core
3173 bits |= MsiInterop.MsidbCustomActionTypeClientRepeat; 3173 bits |= MsiInterop.MsidbCustomActionTypeClientRepeat;
3174 break; 3174 break;
3175 default: 3175 default:
3176 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, execute, "commit", "deferred", "firstSequence", "immediate", "oncePerProcess", "rollback", "secondSequence")); 3176 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, execute, "commit", "deferred", "firstSequence", "immediate", "oncePerProcess", "rollback", "secondSequence"));
3177 break; 3177 break;
3178 } 3178 }
3179 } 3179 }
@@ -3181,7 +3181,7 @@ namespace WixToolset.Core
3181 case "FileKey": 3181 case "FileKey":
3182 if (null != source) 3182 if (null != source)
3183 { 3183 {
3184 this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script")); 3184 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3185 } 3185 }
3186 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 3186 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3187 sourceBits = MsiInterop.MsidbCustomActionTypeSourceFile; 3187 sourceBits = MsiInterop.MsidbCustomActionTypeSourceFile;
@@ -3202,7 +3202,7 @@ namespace WixToolset.Core
3202 case "JScriptCall": 3202 case "JScriptCall":
3203 if (null != target) 3203 if (null != target)
3204 { 3204 {
3205 this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3205 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3206 } 3206 }
3207 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3207 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3208 targetBits = MsiInterop.MsidbCustomActionTypeJScript; 3208 targetBits = MsiInterop.MsidbCustomActionTypeJScript;
@@ -3216,7 +3216,7 @@ namespace WixToolset.Core
3216 case "Property": 3216 case "Property":
3217 if (null != source) 3217 if (null != source)
3218 { 3218 {
3219 this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script")); 3219 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3220 } 3220 }
3221 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3221 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3222 sourceBits = MsiInterop.MsidbCustomActionTypeProperty; 3222 sourceBits = MsiInterop.MsidbCustomActionTypeProperty;
@@ -3240,7 +3240,7 @@ namespace WixToolset.Core
3240 bits |= MsiInterop.MsidbCustomActionTypeContinue; 3240 bits |= MsiInterop.MsidbCustomActionTypeContinue;
3241 break; 3241 break;
3242 default: 3242 default:
3243 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, returnValue, "asyncNoWait", "asyncWait", "check", "ignore")); 3243 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, returnValue, "asyncNoWait", "asyncWait", "check", "ignore"));
3244 break; 3244 break;
3245 } 3245 }
3246 } 3246 }
@@ -3248,12 +3248,12 @@ namespace WixToolset.Core
3248 case "Script": 3248 case "Script":
3249 if (null != source) 3249 if (null != source)
3250 { 3250 {
3251 this.Core.OnMessage(WixErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script")); 3251 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3252 } 3252 }
3253 3253
3254 if (null != target) 3254 if (null != target)
3255 { 3255 {
3256 this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3256 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3257 } 3257 }
3258 3258
3259 // set the source and target to empty string for error messages when the user sets multiple sources or targets 3259 // set the source and target to empty string for error messages when the user sets multiple sources or targets
@@ -3277,7 +3277,7 @@ namespace WixToolset.Core
3277 targetBits = MsiInterop.MsidbCustomActionTypeVBScript; 3277 targetBits = MsiInterop.MsidbCustomActionTypeVBScript;
3278 break; 3278 break;
3279 default: 3279 default:
3280 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, script, "jscript", "vbscript")); 3280 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, script, "jscript", "vbscript"));
3281 break; 3281 break;
3282 } 3282 }
3283 } 3283 }
@@ -3294,7 +3294,7 @@ namespace WixToolset.Core
3294 case "Value": 3294 case "Value":
3295 if (null != target) 3295 if (null != target)
3296 { 3296 {
3297 this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3297 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3298 } 3298 }
3299 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3299 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3300 targetBits = MsiInterop.MsidbCustomActionTypeTextData; 3300 targetBits = MsiInterop.MsidbCustomActionTypeTextData;
@@ -3302,7 +3302,7 @@ namespace WixToolset.Core
3302 case "VBScriptCall": 3302 case "VBScriptCall":
3303 if (null != target) 3303 if (null != target)
3304 { 3304 {
3305 this.Core.OnMessage(WixErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3305 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3306 } 3306 }
3307 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3307 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3308 targetBits = MsiInterop.MsidbCustomActionTypeVBScript; 3308 targetBits = MsiInterop.MsidbCustomActionTypeVBScript;
@@ -3327,7 +3327,7 @@ namespace WixToolset.Core
3327 3327
3328 if (null == id) 3328 if (null == id)
3329 { 3329 {
3330 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 3330 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3331 id = Identifier.Invalid; 3331 id = Identifier.Invalid;
3332 } 3332 }
3333 3333
@@ -3348,48 +3348,48 @@ namespace WixToolset.Core
3348 { 3348 {
3349 if (null == source) 3349 if (null == source)
3350 { 3350 {
3351 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "BinaryKey", "FileKey", "Property")); 3351 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "BinaryKey", "FileKey", "Property"));
3352 } 3352 }
3353 else if (MsiInterop.MsidbCustomActionTypeDirectory == sourceBits) 3353 else if (MsiInterop.MsidbCustomActionTypeDirectory == sourceBits)
3354 { 3354 {
3355 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "Directory")); 3355 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "Directory"));
3356 } 3356 }
3357 } 3357 }
3358 else if (MsiInterop.MsidbCustomActionTypeJScript == targetBits) // non-inline jscript 3358 else if (MsiInterop.MsidbCustomActionTypeJScript == targetBits) // non-inline jscript
3359 { 3359 {
3360 if (null == source) 3360 if (null == source)
3361 { 3361 {
3362 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "BinaryKey", "FileKey", "Property")); 3362 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "BinaryKey", "FileKey", "Property"));
3363 } 3363 }
3364 else if (MsiInterop.MsidbCustomActionTypeDirectory == sourceBits) 3364 else if (MsiInterop.MsidbCustomActionTypeDirectory == sourceBits)
3365 { 3365 {
3366 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "Directory")); 3366 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "Directory"));
3367 } 3367 }
3368 } 3368 }
3369 else if (MsiInterop.MsidbCustomActionTypeExe == targetBits) // exe-command 3369 else if (MsiInterop.MsidbCustomActionTypeExe == targetBits) // exe-command
3370 { 3370 {
3371 if (null == source) 3371 if (null == source)
3372 { 3372 {
3373 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryKey", "Directory", "FileKey", "Property")); 3373 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryKey", "Directory", "FileKey", "Property"));
3374 } 3374 }
3375 } 3375 }
3376 else if (MsiInterop.MsidbCustomActionTypeTextData == (bits | sourceBits | targetBits)) 3376 else if (MsiInterop.MsidbCustomActionTypeTextData == (bits | sourceBits | targetBits))
3377 { 3377 {
3378 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Value", "Directory", "Property")); 3378 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Value", "Directory", "Property"));
3379 } 3379 }
3380 else if (!String.IsNullOrEmpty(innerText)) // inner text cannot be specified with non-script CAs 3380 else if (!String.IsNullOrEmpty(innerText)) // inner text cannot be specified with non-script CAs
3381 { 3381 {
3382 this.Core.OnMessage(WixErrors.CustomActionIllegalInnerText(sourceLineNumbers, node.Name.LocalName, innerText, "Script")); 3382 this.Core.Write(ErrorMessages.CustomActionIllegalInnerText(sourceLineNumbers, node.Name.LocalName, innerText, "Script"));
3383 } 3383 }
3384 3384
3385 if (MsiInterop.MsidbCustomActionType64BitScript == (bits & MsiInterop.MsidbCustomActionType64BitScript) && MsiInterop.MsidbCustomActionTypeVBScript != targetBits && MsiInterop.MsidbCustomActionTypeJScript != targetBits) 3385 if (MsiInterop.MsidbCustomActionType64BitScript == (bits & MsiInterop.MsidbCustomActionType64BitScript) && MsiInterop.MsidbCustomActionTypeVBScript != targetBits && MsiInterop.MsidbCustomActionTypeJScript != targetBits)
3386 { 3386 {
3387 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Win64", "Script", "VBScriptCall", "JScriptCall")); 3387 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Win64", "Script", "VBScriptCall", "JScriptCall"));
3388 } 3388 }
3389 3389
3390 if ((MsiInterop.MsidbCustomActionTypeAsync | MsiInterop.MsidbCustomActionTypeContinue) == (bits & (MsiInterop.MsidbCustomActionTypeAsync | MsiInterop.MsidbCustomActionTypeContinue)) && MsiInterop.MsidbCustomActionTypeExe != targetBits) 3390 if ((MsiInterop.MsidbCustomActionTypeAsync | MsiInterop.MsidbCustomActionTypeContinue) == (bits & (MsiInterop.MsidbCustomActionTypeAsync | MsiInterop.MsidbCustomActionTypeContinue)) && MsiInterop.MsidbCustomActionTypeExe != targetBits)
3391 { 3391 {
3392 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Return", "asyncNoWait", "ExeCommand")); 3392 this.Core.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Return", "asyncNoWait", "ExeCommand"));
3393 } 3393 }
3394 3394
3395 if (MsiInterop.MsidbCustomActionTypeTSAware == (bits & MsiInterop.MsidbCustomActionTypeTSAware)) 3395 if (MsiInterop.MsidbCustomActionTypeTSAware == (bits & MsiInterop.MsidbCustomActionTypeTSAware))
@@ -3397,7 +3397,7 @@ namespace WixToolset.Core
3397 // TS-aware CAs are valid only when deferred so require the in-script Type bit... 3397 // TS-aware CAs are valid only when deferred so require the in-script Type bit...
3398 if (0 == (bits & MsiInterop.MsidbCustomActionTypeInScript)) 3398 if (0 == (bits & MsiInterop.MsidbCustomActionTypeInScript))
3399 { 3399 {
3400 this.Core.OnMessage(WixErrors.IllegalTerminalServerCustomActionAttributes(sourceLineNumbers)); 3400 this.Core.Write(ErrorMessages.IllegalTerminalServerCustomActionAttributes(sourceLineNumbers));
3401 } 3401 }
3402 } 3402 }
3403 3403
@@ -3406,12 +3406,12 @@ namespace WixToolset.Core
3406 MsiInterop.MsidbCustomActionTypeTextData == targetBits && 3406 MsiInterop.MsidbCustomActionTypeTextData == targetBits &&
3407 0 != (bits & MsiInterop.MsidbCustomActionTypeInScript)) 3407 0 != (bits & MsiInterop.MsidbCustomActionTypeInScript))
3408 { 3408 {
3409 this.Core.OnMessage(WixErrors.IllegalPropertyCustomActionAttributes(sourceLineNumbers)); 3409 this.Core.Write(ErrorMessages.IllegalPropertyCustomActionAttributes(sourceLineNumbers));
3410 } 3410 }
3411 3411
3412 if (0 == targetBits) 3412 if (0 == targetBits)
3413 { 3413 {
3414 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3414 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3415 } 3415 }
3416 3416
3417 this.Core.ParseForExtensionElements(node); 3417 this.Core.ParseForExtensionElements(node);
@@ -3475,7 +3475,7 @@ namespace WixToolset.Core
3475 3475
3476 if (null == id) 3476 if (null == id)
3477 { 3477 {
3478 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 3478 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3479 } 3479 }
3480 3480
3481 this.Core.ParseForExtensionElements(node); 3481 this.Core.ParseForExtensionElements(node);
@@ -3520,7 +3520,7 @@ namespace WixToolset.Core
3520 3520
3521 if (null == primaryKeys[0]) 3521 if (null == primaryKeys[0])
3522 { 3522 {
3523 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 3523 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3524 } 3524 }
3525 3525
3526 this.Core.CreateSimpleReference(sourceLineNumbers, "MsiPatchSequence", primaryKeys); 3526 this.Core.CreateSimpleReference(sourceLineNumbers, "MsiPatchSequence", primaryKeys);
@@ -3565,7 +3565,7 @@ namespace WixToolset.Core
3565 3565
3566 if (null == id) 3566 if (null == id)
3567 { 3567 {
3568 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 3568 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3569 id = Identifier.Invalid; 3569 id = Identifier.Invalid;
3570 } 3570 }
3571 3571
@@ -3640,7 +3640,7 @@ namespace WixToolset.Core
3640 3640
3641 if (null == id) 3641 if (null == id)
3642 { 3642 {
3643 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 3643 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3644 } 3644 }
3645 3645
3646 this.Core.ParseForExtensionElements(node); 3646 this.Core.ParseForExtensionElements(node);
@@ -3682,11 +3682,11 @@ namespace WixToolset.Core
3682 3682
3683 if (null == id) 3683 if (null == id)
3684 { 3684 {
3685 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 3685 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3686 } 3686 }
3687 else if (31 < id.Length) 3687 else if (31 < id.Length)
3688 { 3688 {
3689 this.Core.OnMessage(WixErrors.TableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id)); 3689 this.Core.Write(ErrorMessages.TableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id));
3690 } 3690 }
3691 3691
3692 this.Core.ParseForExtensionElements(node); 3692 this.Core.ParseForExtensionElements(node);
@@ -3743,11 +3743,11 @@ namespace WixToolset.Core
3743 3743
3744 if (null == tableId) 3744 if (null == tableId)
3745 { 3745 {
3746 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 3746 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
3747 } 3747 }
3748 else if (31 < tableId.Length) 3748 else if (31 < tableId.Length)
3749 { 3749 {
3750 this.Core.OnMessage(WixErrors.CustomTableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", tableId)); 3750 this.Core.Write(ErrorMessages.CustomTableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", tableId));
3751 } 3751 }
3752 3752
3753 foreach (XElement child in node.Elements()) 3753 foreach (XElement child in node.Elements())
@@ -3833,7 +3833,7 @@ namespace WixToolset.Core
3833 typeName = "CHAR"; 3833 typeName = "CHAR";
3834 break; 3834 break;
3835 default: 3835 default:
3836 this.Core.OnMessage(WixErrors.IllegalAttributeValue(childSourceLineNumbers, child.Name.LocalName, "Type", typeValue, "binary", "int", "string")); 3836 this.Core.Write(ErrorMessages.IllegalAttributeValue(childSourceLineNumbers, child.Name.LocalName, "Type", typeValue, "binary", "int", "string"));
3837 break; 3837 break;
3838 } 3838 }
3839 } 3839 }
@@ -3849,18 +3849,18 @@ namespace WixToolset.Core
3849 3849
3850 if (null == columnName) 3850 if (null == columnName)
3851 { 3851 {
3852 this.Core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Id")); 3852 this.Core.Write(ErrorMessages.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Id"));
3853 } 3853 }
3854 3854
3855 if (null == typeName) 3855 if (null == typeName)
3856 { 3856 {
3857 this.Core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Type")); 3857 this.Core.Write(ErrorMessages.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Type"));
3858 } 3858 }
3859 else if ("SHORT" == typeName) 3859 else if ("SHORT" == typeName)
3860 { 3860 {
3861 if (2 != width && 4 != width) 3861 if (2 != width && 4 != width)
3862 { 3862 {
3863 this.Core.OnMessage(WixErrors.CustomTableIllegalColumnWidth(childSourceLineNumbers, child.Name.LocalName, "Width", width)); 3863 this.Core.Write(ErrorMessages.CustomTableIllegalColumnWidth(childSourceLineNumbers, child.Name.LocalName, "Width", width));
3864 } 3864 }
3865 columnType = String.Concat(nullable ? "I" : "i", width); 3865 columnType = String.Concat(nullable ? "I" : "i", width);
3866 } 3866 }
@@ -3873,7 +3873,7 @@ namespace WixToolset.Core
3873 { 3873 {
3874 if ("Binary" != category) 3874 if ("Binary" != category)
3875 { 3875 {
3876 this.Core.OnMessage(WixErrors.ExpectedBinaryCategory(childSourceLineNumbers)); 3876 this.Core.Write(ErrorMessages.ExpectedBinaryCategory(childSourceLineNumbers));
3877 } 3877 }
3878 columnType = String.Concat(nullable ? "V" : "v", width); 3878 columnType = String.Concat(nullable ? "V" : "v", width);
3879 } 3879 }
@@ -3927,7 +3927,7 @@ namespace WixToolset.Core
3927 3927
3928 if (null == columnName) 3928 if (null == columnName)
3929 { 3929 {
3930 this.Core.OnMessage(WixErrors.ExpectedAttribute(dataSourceLineNumbers, data.Name.LocalName, "Column")); 3930 this.Core.Write(ErrorMessages.ExpectedAttribute(dataSourceLineNumbers, data.Name.LocalName, "Column"));
3931 } 3931 }
3932 3932
3933 dataValue = String.Concat(dataValue, null == dataValue ? String.Empty : Common.CustomRowFieldSeparator.ToString(), columnName, ":", Common.GetInnerText(data)); 3933 dataValue = String.Concat(dataValue, null == dataValue ? String.Empty : Common.CustomRowFieldSeparator.ToString(), columnName, ":", Common.GetInnerText(data));
@@ -3959,7 +3959,7 @@ namespace WixToolset.Core
3959 { 3959 {
3960 if (null == primaryKeys || 0 == primaryKeys.Length) 3960 if (null == primaryKeys || 0 == primaryKeys.Length)
3961 { 3961 {
3962 this.Core.OnMessage(WixErrors.CustomTableMissingPrimaryKey(sourceLineNumbers)); 3962 this.Core.Write(ErrorMessages.CustomTableMissingPrimaryKey(sourceLineNumbers));
3963 } 3963 }
3964 3964
3965 if (!this.Core.EncounteredError) 3965 if (!this.Core.EncounteredError)
@@ -4097,12 +4097,12 @@ namespace WixToolset.Core
4097 { 4097 {
4098 if (!String.IsNullOrEmpty(shortName)) 4098 if (!String.IsNullOrEmpty(shortName))
4099 { 4099 {
4100 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name")); 4100 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name"));
4101 } 4101 }
4102 4102
4103 if (null == parentId) 4103 if (null == parentId)
4104 { 4104 {
4105 this.Core.OnMessage(WixErrors.DirectoryRootWithoutName(sourceLineNumbers, node.Name.LocalName, "Name")); 4105 this.Core.Write(ErrorMessages.DirectoryRootWithoutName(sourceLineNumbers, node.Name.LocalName, "Name"));
4106 } 4106 }
4107 } 4107 }
4108 else if (!String.IsNullOrEmpty(name)) 4108 else if (!String.IsNullOrEmpty(name))
@@ -4116,11 +4116,11 @@ namespace WixToolset.Core
4116 } 4116 }
4117 else if (name.Equals(".")) 4117 else if (name.Equals("."))
4118 { 4118 {
4119 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name", name)); 4119 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name", name));
4120 } 4120 }
4121 else if (name.Equals(shortName)) 4121 else if (name.Equals(shortName))
4122 { 4122 {
4123 this.Core.OnMessage(WixWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name)); 4123 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name));
4124 } 4124 }
4125 } 4125 }
4126 4126
@@ -4128,7 +4128,7 @@ namespace WixToolset.Core
4128 { 4128 {
4129 if (!String.IsNullOrEmpty(shortSourceName)) 4129 if (!String.IsNullOrEmpty(shortSourceName))
4130 { 4130 {
4131 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName")); 4131 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName"));
4132 } 4132 }
4133 } 4133 }
4134 else 4134 else
@@ -4142,11 +4142,11 @@ namespace WixToolset.Core
4142 } 4142 }
4143 else if (sourceName.Equals(".")) 4143 else if (sourceName.Equals("."))
4144 { 4144 {
4145 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName", sourceName)); 4145 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ShortSourceName", "SourceName", sourceName));
4146 } 4146 }
4147 else if (sourceName.Equals(shortSourceName)) 4147 else if (sourceName.Equals(shortSourceName))
4148 { 4148 {
4149 this.Core.OnMessage(WixWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName)); 4149 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName));
4150 } 4150 }
4151 } 4151 }
4152 4152
@@ -4191,7 +4191,7 @@ namespace WixToolset.Core
4191 4191
4192 if ("TARGETDIR".Equals(id.Id) && !"SourceDir".Equals(defaultDir)) 4192 if ("TARGETDIR".Equals(id.Id) && !"SourceDir".Equals(defaultDir))
4193 { 4193 {
4194 this.Core.OnMessage(WixErrors.IllegalTargetDirDefaultDir(sourceLineNumbers, defaultDir)); 4194 this.Core.Write(ErrorMessages.IllegalTargetDirDefaultDir(sourceLineNumbers, defaultDir));
4195 } 4195 }
4196 4196
4197 foreach (XElement child in node.Elements()) 4197 foreach (XElement child in node.Elements())
@@ -4293,7 +4293,7 @@ namespace WixToolset.Core
4293 4293
4294 if (null == id) 4294 if (null == id)
4295 { 4295 {
4296 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 4296 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4297 } 4297 }
4298 4298
4299 if (!String.IsNullOrEmpty(fileSource) && !fileSource.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) 4299 if (!String.IsNullOrEmpty(fileSource) && !fileSource.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal))
@@ -4391,7 +4391,7 @@ namespace WixToolset.Core
4391 case "DirectorySearch": 4391 case "DirectorySearch":
4392 if (oneChild) 4392 if (oneChild)
4393 { 4393 {
4394 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4394 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4395 } 4395 }
4396 oneChild = true; 4396 oneChild = true;
4397 signature = this.ParseDirectorySearchElement(child, id.Id); 4397 signature = this.ParseDirectorySearchElement(child, id.Id);
@@ -4399,7 +4399,7 @@ namespace WixToolset.Core
4399 case "DirectorySearchRef": 4399 case "DirectorySearchRef":
4400 if (oneChild) 4400 if (oneChild)
4401 { 4401 {
4402 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4402 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4403 } 4403 }
4404 oneChild = true; 4404 oneChild = true;
4405 signature = this.ParseDirectorySearchRefElement(child, id.Id); 4405 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -4407,7 +4407,7 @@ namespace WixToolset.Core
4407 case "FileSearch": 4407 case "FileSearch":
4408 if (oneChild) 4408 if (oneChild)
4409 { 4409 {
4410 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 4410 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4411 } 4411 }
4412 oneChild = true; 4412 oneChild = true;
4413 hasFileSearch = true; 4413 hasFileSearch = true;
@@ -4416,7 +4416,7 @@ namespace WixToolset.Core
4416 case "FileSearchRef": 4416 case "FileSearchRef":
4417 if (oneChild) 4417 if (oneChild)
4418 { 4418 {
4419 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 4419 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4420 } 4420 }
4421 oneChild = true; 4421 oneChild = true;
4422 signature = this.ParseSimpleRefElement(child, "Signature"); 4422 signature = this.ParseSimpleRefElement(child, "Signature");
@@ -4432,7 +4432,7 @@ namespace WixToolset.Core
4432 { 4432 {
4433 if (!hasFileSearch) 4433 if (!hasFileSearch)
4434 { 4434 {
4435 this.Core.OnMessage(WixErrors.IllegalParentAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AssignToProperty", child.Name.LocalName)); 4435 this.Core.Write(ErrorMessages.IllegalParentAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "AssignToProperty", child.Name.LocalName));
4436 } 4436 }
4437 else if (!oneChild) 4437 else if (!oneChild)
4438 { 4438 {
@@ -4518,7 +4518,7 @@ namespace WixToolset.Core
4518 { 4518 {
4519 if (!String.IsNullOrEmpty(parentSignature)) 4519 if (!String.IsNullOrEmpty(parentSignature))
4520 { 4520 {
4521 this.Core.OnMessage(WixErrors.CanNotHaveTwoParents(sourceLineNumbers, id.Id, parent.Id, parentSignature)); 4521 this.Core.Write(ErrorMessages.CanNotHaveTwoParents(sourceLineNumbers, id.Id, parent.Id, parentSignature));
4522 } 4522 }
4523 else 4523 else
4524 { 4524 {
@@ -4544,7 +4544,7 @@ namespace WixToolset.Core
4544 case "DirectorySearch": 4544 case "DirectorySearch":
4545 if (oneChild) 4545 if (oneChild)
4546 { 4546 {
4547 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4547 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4548 } 4548 }
4549 oneChild = true; 4549 oneChild = true;
4550 signature = this.ParseDirectorySearchElement(child, id.Id); 4550 signature = this.ParseDirectorySearchElement(child, id.Id);
@@ -4552,7 +4552,7 @@ namespace WixToolset.Core
4552 case "DirectorySearchRef": 4552 case "DirectorySearchRef":
4553 if (oneChild) 4553 if (oneChild)
4554 { 4554 {
4555 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4555 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4556 } 4556 }
4557 oneChild = true; 4557 oneChild = true;
4558 signature = this.ParseDirectorySearchRefElement(child, id.Id); 4558 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -4560,7 +4560,7 @@ namespace WixToolset.Core
4560 case "FileSearch": 4560 case "FileSearch":
4561 if (oneChild) 4561 if (oneChild)
4562 { 4562 {
4563 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4563 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4564 } 4564 }
4565 oneChild = true; 4565 oneChild = true;
4566 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 4566 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -4568,7 +4568,7 @@ namespace WixToolset.Core
4568 case "FileSearchRef": 4568 case "FileSearchRef":
4569 if (oneChild) 4569 if (oneChild)
4570 { 4570 {
4571 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 4571 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4572 } 4572 }
4573 oneChild = true; 4573 oneChild = true;
4574 signature = this.ParseSimpleRefElement(child, "Signature"); 4574 signature = this.ParseSimpleRefElement(child, "Signature");
@@ -4636,7 +4636,7 @@ namespace WixToolset.Core
4636 bits = bits | MsiInterop.MsidbFeatureAttributesUIDisallowAbsent; 4636 bits = bits | MsiInterop.MsidbFeatureAttributesUIDisallowAbsent;
4637 break; 4637 break;
4638 default: 4638 default:
4639 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, absent, "allow", "disallow")); 4639 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, absent, "allow", "disallow"));
4640 break; 4640 break;
4641 } 4641 }
4642 } 4642 }
@@ -4657,7 +4657,7 @@ namespace WixToolset.Core
4657 case Wix.Feature.AllowAdvertiseType.yes: // this is the default 4657 case Wix.Feature.AllowAdvertiseType.yes: // this is the default
4658 break; 4658 break;
4659 default: 4659 default:
4660 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, allowAdvertise, "no", "system", "yes")); 4660 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, allowAdvertise, "no", "system", "yes"));
4661 break; 4661 break;
4662 } 4662 }
4663 } 4663 }
@@ -4681,7 +4681,7 @@ namespace WixToolset.Core
4681 case Wix.Feature.InstallDefaultType.followParent: 4681 case Wix.Feature.InstallDefaultType.followParent:
4682 if (ComplexReferenceParentType.Product == parentType) 4682 if (ComplexReferenceParentType.Product == parentType)
4683 { 4683 {
4684 this.Core.OnMessage(WixErrors.RootFeatureCannotFollowParent(sourceLineNumbers)); 4684 this.Core.Write(ErrorMessages.RootFeatureCannotFollowParent(sourceLineNumbers));
4685 } 4685 }
4686 bits = bits | MsiInterop.MsidbFeatureAttributesFollowParent; 4686 bits = bits | MsiInterop.MsidbFeatureAttributesFollowParent;
4687 break; 4687 break;
@@ -4691,7 +4691,7 @@ namespace WixToolset.Core
4691 bits = bits | MsiInterop.MsidbFeatureAttributesFavorSource; 4691 bits = bits | MsiInterop.MsidbFeatureAttributesFavorSource;
4692 break; 4692 break;
4693 default: 4693 default:
4694 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installDefault, "followParent", "local", "source")); 4694 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installDefault, "followParent", "local", "source"));
4695 break; 4695 break;
4696 } 4696 }
4697 } 4697 }
@@ -4703,7 +4703,7 @@ namespace WixToolset.Core
4703 title = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 4703 title = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4704 if ("PUT-FEATURE-TITLE-HERE" == title) 4704 if ("PUT-FEATURE-TITLE-HERE" == title)
4705 { 4705 {
4706 this.Core.OnMessage(WixWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, title)); 4706 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, title));
4707 } 4707 }
4708 break; 4708 break;
4709 case "TypicalDefault": 4709 case "TypicalDefault":
@@ -4719,7 +4719,7 @@ namespace WixToolset.Core
4719 case Wix.Feature.TypicalDefaultType.install: // this is the default 4719 case Wix.Feature.TypicalDefaultType.install: // this is the default
4720 break; 4720 break;
4721 default: 4721 default:
4722 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typicalDefault, "advertise", "install")); 4722 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typicalDefault, "advertise", "install"));
4723 break; 4723 break;
4724 } 4724 }
4725 } 4725 }
@@ -4737,27 +4737,27 @@ namespace WixToolset.Core
4737 4737
4738 if (null == id) 4738 if (null == id)
4739 { 4739 {
4740 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 4740 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4741 id = Identifier.Invalid; 4741 id = Identifier.Invalid;
4742 } 4742 }
4743 else if (38 < id.Id.Length) 4743 else if (38 < id.Id.Length)
4744 { 4744 {
4745 this.Core.OnMessage(WixErrors.FeatureNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id)); 4745 this.Core.Write(ErrorMessages.FeatureNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
4746 } 4746 }
4747 4747
4748 if (null != configurableDirectory && configurableDirectory.ToUpper(CultureInfo.InvariantCulture) != configurableDirectory) 4748 if (null != configurableDirectory && configurableDirectory.ToUpper(CultureInfo.InvariantCulture) != configurableDirectory)
4749 { 4749 {
4750 this.Core.OnMessage(WixErrors.FeatureConfigurableDirectoryNotUppercase(sourceLineNumbers, node.Name.LocalName, "ConfigurableDirectory", configurableDirectory)); 4750 this.Core.Write(ErrorMessages.FeatureConfigurableDirectoryNotUppercase(sourceLineNumbers, node.Name.LocalName, "ConfigurableDirectory", configurableDirectory));
4751 } 4751 }
4752 4752
4753 if ("advertise" == typicalDefault && "no" == allowAdvertise) 4753 if ("advertise" == typicalDefault && "no" == allowAdvertise)
4754 { 4754 {
4755 this.Core.OnMessage(WixErrors.FeatureCannotFavorAndDisallowAdvertise(sourceLineNumbers, node.Name.LocalName, "TypicalDefault", typicalDefault, "AllowAdvertise", allowAdvertise)); 4755 this.Core.Write(ErrorMessages.FeatureCannotFavorAndDisallowAdvertise(sourceLineNumbers, node.Name.LocalName, "TypicalDefault", typicalDefault, "AllowAdvertise", allowAdvertise));
4756 } 4756 }
4757 4757
4758 if (YesNoType.Yes == followParent && ("local" == installDefault || "source" == installDefault)) 4758 if (YesNoType.Yes == followParent && ("local" == installDefault || "source" == installDefault))
4759 { 4759 {
4760 this.Core.OnMessage(WixErrors.FeatureCannotFollowParentAndFavorLocalOrSource(sourceLineNumbers, node.Name.LocalName, "InstallDefault", "FollowParent", "yes")); 4760 this.Core.Write(ErrorMessages.FeatureCannotFollowParentAndFavorLocalOrSource(sourceLineNumbers, node.Name.LocalName, "InstallDefault", "FollowParent", "yes"));
4761 } 4761 }
4762 4762
4763 int childDisplay = 0; 4763 int childDisplay = 0;
@@ -4827,7 +4827,7 @@ namespace WixToolset.Core
4827 int value; 4827 int value;
4828 if (!Int32.TryParse(display, NumberStyles.Integer, CultureInfo.InvariantCulture, out value)) 4828 if (!Int32.TryParse(display, NumberStyles.Integer, CultureInfo.InvariantCulture, out value))
4829 { 4829 {
4830 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Display", display, "collapse", "expand", "hidden")); 4830 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Display", display, "collapse", "expand", "hidden"));
4831 } 4831 }
4832 else 4832 else
4833 { 4833 {
@@ -4892,7 +4892,7 @@ namespace WixToolset.Core
4892 4892
4893 if (null == id) 4893 if (null == id)
4894 { 4894 {
4895 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 4895 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4896 } 4896 }
4897 4897
4898 int lastDisplay = 0; 4898 int lastDisplay = 0;
@@ -4978,7 +4978,7 @@ namespace WixToolset.Core
4978 4978
4979 if (null == id) 4979 if (null == id)
4980 { 4980 {
4981 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 4981 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
4982 id = Identifier.Invalid; 4982 id = Identifier.Invalid;
4983 } 4983 }
4984 4984
@@ -5074,7 +5074,7 @@ namespace WixToolset.Core
5074 5074
5075 if (null == id) 5075 if (null == id)
5076 { 5076 {
5077 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 5077 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
5078 } 5078 }
5079 5079
5080 this.Core.ParseForExtensionElements(node); 5080 this.Core.ParseForExtensionElements(node);
@@ -5133,7 +5133,7 @@ namespace WixToolset.Core
5133 action = "!"; 5133 action = "!";
5134 break; 5134 break;
5135 default: 5135 default:
5136 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, value, "create", "set", "remove")); 5136 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, value, "create", "set", "remove"));
5137 break; 5137 break;
5138 } 5138 }
5139 } 5139 }
@@ -5145,7 +5145,7 @@ namespace WixToolset.Core
5145 part = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 5145 part = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
5146 if (!Wix.Environment.TryParsePartType(part, out partType)) 5146 if (!Wix.Environment.TryParsePartType(part, out partType))
5147 { 5147 {
5148 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Part", part, "all", "first", "last")); 5148 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Part", part, "all", "first", "last"));
5149 } 5149 }
5150 break; 5150 break;
5151 case "Permanent": 5151 case "Permanent":
@@ -5178,14 +5178,14 @@ namespace WixToolset.Core
5178 5178
5179 if (null == name) 5179 if (null == name)
5180 { 5180 {
5181 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 5181 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
5182 } 5182 }
5183 5183
5184 if (Wix.Environment.PartType.NotSet != partType) 5184 if (Wix.Environment.PartType.NotSet != partType)
5185 { 5185 {
5186 if ("+" == action) 5186 if ("+" == action)
5187 { 5187 {
5188 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Part", "Action", "create")); 5188 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Part", "Action", "create"));
5189 } 5189 }
5190 5190
5191 switch (partType) 5191 switch (partType)
@@ -5248,7 +5248,7 @@ namespace WixToolset.Core
5248 5248
5249 if (CompilerConstants.IntegerNotSet == id) 5249 if (CompilerConstants.IntegerNotSet == id)
5250 { 5250 {
5251 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 5251 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
5252 id = CompilerConstants.IllegalInteger; 5252 id = CompilerConstants.IllegalInteger;
5253 } 5253 }
5254 5254
@@ -5288,7 +5288,7 @@ namespace WixToolset.Core
5288 YesNoType extensionAdvertise = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 5288 YesNoType extensionAdvertise = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5289 if ((YesNoType.No == advertise && YesNoType.Yes == extensionAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == extensionAdvertise)) 5289 if ((YesNoType.No == advertise && YesNoType.Yes == extensionAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == extensionAdvertise))
5290 { 5290 {
5291 this.Core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, extensionAdvertise.ToString(), advertise.ToString())); 5291 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, extensionAdvertise.ToString(), advertise.ToString()));
5292 } 5292 }
5293 advertise = extensionAdvertise; 5293 advertise = extensionAdvertise;
5294 break; 5294 break;
@@ -5445,7 +5445,7 @@ namespace WixToolset.Core
5445 assemblyType = FileAssemblyType.Win32Assembly; 5445 assemblyType = FileAssemblyType.Win32Assembly;
5446 break; 5446 break;
5447 default: 5447 default:
5448 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "File", "Assembly", assemblyValue, "no", "win32", ".net")); 5448 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "File", "Assembly", assemblyValue, "no", "win32", ".net"));
5449 break; 5449 break;
5450 } 5450 }
5451 } 5451 }
@@ -5545,7 +5545,7 @@ namespace WixToolset.Core
5545 procArch = "ia64"; 5545 procArch = "ia64";
5546 break; 5546 break;
5547 default: 5547 default:
5548 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "File", "ProcessorArchitecture", procArchValue, "msil", "x86", "x64", "ia64")); 5548 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "File", "ProcessorArchitecture", procArchValue, "msil", "x86", "x64", "ia64"));
5549 break; 5549 break;
5550 } 5550 }
5551 } 5551 }
@@ -5609,7 +5609,7 @@ namespace WixToolset.Core
5609 // the companion file cannot be the key path of a component 5609 // the companion file cannot be the key path of a component
5610 if (YesNoType.Yes == keyPath) 5610 if (YesNoType.Yes == keyPath)
5611 { 5611 {
5612 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "CompanionFile", "KeyPath", "yes")); 5612 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "CompanionFile", "KeyPath", "yes"));
5613 } 5613 }
5614 } 5614 }
5615 5615
@@ -5618,7 +5618,7 @@ namespace WixToolset.Core
5618 name = Path.GetFileName(source); 5618 name = Path.GetFileName(source);
5619 if (!this.Core.IsValidLongFilename(name, false)) 5619 if (!this.Core.IsValidLongFilename(name, false))
5620 { 5620 {
5621 this.Core.OnMessage(WixErrors.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name)); 5621 this.Core.Write(ErrorMessages.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name));
5622 } 5622 }
5623 } 5623 }
5624 5624
@@ -5641,32 +5641,32 @@ namespace WixToolset.Core
5641 5641
5642 if (null != defaultVersion && null != companionFile) 5642 if (null != defaultVersion && null != companionFile)
5643 { 5643 {
5644 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DefaultVersion", "CompanionFile", companionFile)); 5644 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DefaultVersion", "CompanionFile", companionFile));
5645 } 5645 }
5646 5646
5647 if (FileAssemblyType.NotAnAssembly == assemblyType) 5647 if (FileAssemblyType.NotAnAssembly == assemblyType)
5648 { 5648 {
5649 if (null != assemblyManifest) 5649 if (null != assemblyManifest)
5650 { 5650 {
5651 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyManifest")); 5651 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyManifest"));
5652 } 5652 }
5653 5653
5654 if (null != assemblyApplication) 5654 if (null != assemblyApplication)
5655 { 5655 {
5656 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyApplication")); 5656 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", "AssemblyApplication"));
5657 } 5657 }
5658 } 5658 }
5659 else 5659 else
5660 { 5660 {
5661 if (FileAssemblyType.Win32Assembly == assemblyType && null == assemblyManifest) 5661 if (FileAssemblyType.Win32Assembly == assemblyType && null == assemblyManifest)
5662 { 5662 {
5663 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "AssemblyManifest", "Assembly", "win32")); 5663 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "AssemblyManifest", "Assembly", "win32"));
5664 } 5664 }
5665 5665
5666 // allow "*" guid components to omit explicit KeyPath as they can have only one file and therefore this file is the keypath 5666 // allow "*" guid components to omit explicit KeyPath as they can have only one file and therefore this file is the keypath
5667 if (YesNoType.Yes != keyPath && "*" != componentGuid) 5667 if (YesNoType.Yes != keyPath && "*" != componentGuid)
5668 { 5668 {
5669 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", (FileAssemblyType.DotNetAssembly == assemblyType ? ".net" : "win32"), "KeyPath", "yes")); 5669 this.Core.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Assembly", (FileAssemblyType.DotNetAssembly == assemblyType ? ".net" : "win32"), "KeyPath", "yes"));
5670 } 5670 }
5671 } 5671 }
5672 5672
@@ -5942,11 +5942,11 @@ namespace WixToolset.Core
5942 // Using both ShortName and Name will not always work due to a Windows Installer bug. 5942 // Using both ShortName and Name will not always work due to a Windows Installer bug.
5943 if (null != shortName && null != name) 5943 if (null != shortName && null != name)
5944 { 5944 {
5945 this.Core.OnMessage(WixWarnings.FileSearchFileNameIssue(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name")); 5945 this.Core.Write(WarningMessages.FileSearchFileNameIssue(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name"));
5946 } 5946 }
5947 else if (null == shortName && null == name) // at least one name must be specified. 5947 else if (null == shortName && null == name) // at least one name must be specified.
5948 { 5948 {
5949 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 5949 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
5950 } 5950 }
5951 5951
5952 if (this.Core.IsValidShortFilename(name, false)) 5952 if (this.Core.IsValidShortFilename(name, false))
@@ -5958,7 +5958,7 @@ namespace WixToolset.Core
5958 } 5958 }
5959 else 5959 else
5960 { 5960 {
5961 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName")); 5961 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
5962 } 5962 }
5963 } 5963 }
5964 5964
@@ -5981,7 +5981,7 @@ namespace WixToolset.Core
5981 // value must be specified and unique. 5981 // value must be specified and unique.
5982 if (isSameId) 5982 if (isSameId)
5983 { 5983 {
5984 this.Core.OnMessage(WixErrors.UniqueFileSearchIdRequired(sourceLineNumbers, parentSignature, node.Name.LocalName)); 5984 this.Core.Write(ErrorMessages.UniqueFileSearchIdRequired(sourceLineNumbers, parentSignature, node.Name.LocalName));
5985 } 5985 }
5986 } 5986 }
5987 else if (parentDepth > 1) 5987 else if (parentDepth > 1)
@@ -5990,7 +5990,7 @@ namespace WixToolset.Core
5990 // as the parent DirectorySearch if AssignToProperty is not set. 5990 // as the parent DirectorySearch if AssignToProperty is not set.
5991 if (!isSameId) 5991 if (!isSameId)
5992 { 5992 {
5993 this.Core.OnMessage(WixErrors.IllegalSearchIdForParentDepth(sourceLineNumbers, id.Id, parentSignature)); 5993 this.Core.Write(ErrorMessages.IllegalSearchIdForParentDepth(sourceLineNumbers, id.Id, parentSignature));
5994 } 5994 }
5995 } 5995 }
5996 5996
@@ -6284,7 +6284,7 @@ namespace WixToolset.Core
6284 } 6284 }
6285 else 6285 else
6286 { 6286 {
6287 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "default", "disable", "enable", "hide", "show")); 6287 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "default", "disable", "enable", "hide", "show"));
6288 } 6288 }
6289 } 6289 }
6290 } 6290 }
@@ -6333,7 +6333,7 @@ namespace WixToolset.Core
6333 if (null == condition || 0 == condition.Length) 6333 if (null == condition || 0 == condition.Length)
6334 { 6334 {
6335 condition = null; 6335 condition = null;
6336 this.Core.OnMessage(WixErrors.ConditionExpected(sourceLineNumbers, node.Name.LocalName)); 6336 this.Core.Write(ErrorMessages.ConditionExpected(sourceLineNumbers, node.Name.LocalName));
6337 } 6337 }
6338 6338
6339 switch (parentElementLocalName) 6339 switch (parentElementLocalName)
@@ -6341,7 +6341,7 @@ namespace WixToolset.Core
6341 case "Control": 6341 case "Control":
6342 if (null == action) 6342 if (null == action)
6343 { 6343 {
6344 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action")); 6344 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action"));
6345 } 6345 }
6346 6346
6347 if (!this.Core.EncounteredError) 6347 if (!this.Core.EncounteredError)
@@ -6356,7 +6356,7 @@ namespace WixToolset.Core
6356 case "Feature": 6356 case "Feature":
6357 if (CompilerConstants.IntegerNotSet == level) 6357 if (CompilerConstants.IntegerNotSet == level)
6358 { 6358 {
6359 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Level")); 6359 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Level"));
6360 level = CompilerConstants.IllegalInteger; 6360 level = CompilerConstants.IllegalInteger;
6361 } 6361 }
6362 6362
@@ -6372,7 +6372,7 @@ namespace WixToolset.Core
6372 case "Product": 6372 case "Product":
6373 if (null == message) 6373 if (null == message)
6374 { 6374 {
6375 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Message")); 6375 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Message"));
6376 } 6376 }
6377 6377
6378 if (!this.Core.EncounteredError) 6378 if (!this.Core.EncounteredError)
@@ -6437,7 +6437,7 @@ namespace WixToolset.Core
6437 action = MsiInterop.MsidbIniFileActionRemoveTag; 6437 action = MsiInterop.MsidbIniFileActionRemoveTag;
6438 break; 6438 break;
6439 default: 6439 default:
6440 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Action", actionValue, "addLine", "addTag", "createLine", "removeLine", "removeTag")); 6440 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Action", actionValue, "addLine", "addTag", "createLine", "removeLine", "removeTag"));
6441 break; 6441 break;
6442 } 6442 }
6443 } 6443 }
@@ -6473,18 +6473,18 @@ namespace WixToolset.Core
6473 6473
6474 if (CompilerConstants.IntegerNotSet == action) 6474 if (CompilerConstants.IntegerNotSet == action)
6475 { 6475 {
6476 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action")); 6476 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action"));
6477 action = CompilerConstants.IllegalInteger; 6477 action = CompilerConstants.IllegalInteger;
6478 } 6478 }
6479 6479
6480 if (null == key) 6480 if (null == key)
6481 { 6481 {
6482 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 6482 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
6483 } 6483 }
6484 6484
6485 if (null == name) 6485 if (null == name)
6486 { 6486 {
6487 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 6487 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
6488 } 6488 }
6489 else if (0 < name.Length) 6489 else if (0 < name.Length)
6490 { 6490 {
@@ -6497,7 +6497,7 @@ namespace WixToolset.Core
6497 } 6497 }
6498 else 6498 else
6499 { 6499 {
6500 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName")); 6500 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
6501 } 6501 }
6502 } 6502 }
6503 else // generate a short file name. 6503 else // generate a short file name.
@@ -6511,7 +6511,7 @@ namespace WixToolset.Core
6511 6511
6512 if (null == section) 6512 if (null == section)
6513 { 6513 {
6514 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Section")); 6514 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Section"));
6515 } 6515 }
6516 6516
6517 if (null == id) 6517 if (null == id)
@@ -6529,7 +6529,7 @@ namespace WixToolset.Core
6529 { 6529 {
6530 if (null == value) 6530 if (null == value)
6531 { 6531 {
6532 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 6532 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
6533 } 6533 }
6534 6534
6535 tableName = TupleDefinitionType.IniFile; 6535 tableName = TupleDefinitionType.IniFile;
@@ -6606,7 +6606,7 @@ namespace WixToolset.Core
6606 type = 2; 6606 type = 2;
6607 break; 6607 break;
6608 default: 6608 default:
6609 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "directory", "file", "registry")); 6609 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "directory", "file", "registry"));
6610 break; 6610 break;
6611 } 6611 }
6612 } 6612 }
@@ -6624,12 +6624,12 @@ namespace WixToolset.Core
6624 6624
6625 if (null == key) 6625 if (null == key)
6626 { 6626 {
6627 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 6627 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
6628 } 6628 }
6629 6629
6630 if (null == name) 6630 if (null == name)
6631 { 6631 {
6632 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 6632 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
6633 } 6633 }
6634 else if (0 < name.Length) 6634 else if (0 < name.Length)
6635 { 6635 {
@@ -6642,7 +6642,7 @@ namespace WixToolset.Core
6642 } 6642 }
6643 else 6643 else
6644 { 6644 {
6645 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName")); 6645 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
6646 } 6646 }
6647 } 6647 }
6648 else if (null == shortName) // generate a short file name. 6648 else if (null == shortName) // generate a short file name.
@@ -6653,7 +6653,7 @@ namespace WixToolset.Core
6653 6653
6654 if (null == section) 6654 if (null == section)
6655 { 6655 {
6656 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Section")); 6656 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Section"));
6657 } 6657 }
6658 6658
6659 if (null == id) 6659 if (null == id)
@@ -6674,7 +6674,7 @@ namespace WixToolset.Core
6674 case "DirectorySearch": 6674 case "DirectorySearch":
6675 if (oneChild) 6675 if (oneChild)
6676 { 6676 {
6677 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 6677 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
6678 } 6678 }
6679 oneChild = true; 6679 oneChild = true;
6680 6680
@@ -6684,7 +6684,7 @@ namespace WixToolset.Core
6684 case "DirectorySearchRef": 6684 case "DirectorySearchRef":
6685 if (oneChild) 6685 if (oneChild)
6686 { 6686 {
6687 this.Core.OnMessage(WixErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 6687 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
6688 } 6688 }
6689 oneChild = true; 6689 oneChild = true;
6690 signature = this.ParseDirectorySearchRefElement(child, id.Id); 6690 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -6692,7 +6692,7 @@ namespace WixToolset.Core
6692 case "FileSearch": 6692 case "FileSearch":
6693 if (oneChild) 6693 if (oneChild)
6694 { 6694 {
6695 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 6695 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
6696 } 6696 }
6697 oneChild = true; 6697 oneChild = true;
6698 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 6698 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -6701,7 +6701,7 @@ namespace WixToolset.Core
6701 case "FileSearchRef": 6701 case "FileSearchRef":
6702 if (oneChild) 6702 if (oneChild)
6703 { 6703 {
6704 this.Core.OnMessage(WixErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 6704 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
6705 } 6705 }
6706 oneChild = true; 6706 oneChild = true;
6707 string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures 6707 string newId = this.ParseSimpleRefElement(child, "Signature"); // FileSearch signatures override parent signatures
@@ -6768,7 +6768,7 @@ namespace WixToolset.Core
6768 6768
6769 if (null == shared) 6769 if (null == shared)
6770 { 6770 {
6771 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Shared")); 6771 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Shared"));
6772 } 6772 }
6773 6773
6774 this.Core.ParseForExtensionElements(node); 6774 this.Core.ParseForExtensionElements(node);
@@ -6866,12 +6866,12 @@ namespace WixToolset.Core
6866 6866
6867 if (null == id) 6867 if (null == id)
6868 { 6868 {
6869 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 6869 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
6870 id = Identifier.Invalid; 6870 id = Identifier.Invalid;
6871 } 6871 }
6872 else if (40 < id.Id.Length) 6872 else if (40 < id.Id.Length)
6873 { 6873 {
6874 this.Core.OnMessage(WixErrors.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 40)); 6874 this.Core.Write(ErrorMessages.StreamNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 40));
6875 6875
6876 // No need to check for modularization problems since DigitalSignature and thus DigitalCertificate 6876 // No need to check for modularization problems since DigitalSignature and thus DigitalCertificate
6877 // currently have no usage in merge modules. 6877 // currently have no usage in merge modules.
@@ -6879,7 +6879,7 @@ namespace WixToolset.Core
6879 6879
6880 if (null == sourceFile) 6880 if (null == sourceFile)
6881 { 6881 {
6882 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 6882 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
6883 } 6883 }
6884 6884
6885 this.Core.ParseForExtensionElements(node); 6885 this.Core.ParseForExtensionElements(node);
@@ -6952,7 +6952,7 @@ namespace WixToolset.Core
6952 6952
6953 if (null == certificateId) 6953 if (null == certificateId)
6954 { 6954 {
6955 this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "DigitalCertificate")); 6955 this.Core.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "DigitalCertificate"));
6956 } 6956 }
6957 6957
6958 if (!this.Core.EncounteredError) 6958 if (!this.Core.EncounteredError)
@@ -6985,13 +6985,13 @@ namespace WixToolset.Core
6985 string upgradeCode = contextValues["UpgradeCode"]; 6985 string upgradeCode = contextValues["UpgradeCode"];
6986 if (String.IsNullOrEmpty(upgradeCode)) 6986 if (String.IsNullOrEmpty(upgradeCode))
6987 { 6987 {
6988 this.Core.OnMessage(WixErrors.ParentElementAttributeRequired(sourceLineNumbers, "Product", "UpgradeCode", node.Name.LocalName)); 6988 this.Core.Write(ErrorMessages.ParentElementAttributeRequired(sourceLineNumbers, "Product", "UpgradeCode", node.Name.LocalName));
6989 } 6989 }
6990 6990
6991 string productVersion = contextValues["ProductVersion"]; 6991 string productVersion = contextValues["ProductVersion"];
6992 if (String.IsNullOrEmpty(productVersion)) 6992 if (String.IsNullOrEmpty(productVersion))
6993 { 6993 {
6994 this.Core.OnMessage(WixErrors.ParentElementAttributeRequired(sourceLineNumbers, "Product", "Version", node.Name.LocalName)); 6994 this.Core.Write(ErrorMessages.ParentElementAttributeRequired(sourceLineNumbers, "Product", "Version", node.Name.LocalName));
6995 } 6995 }
6996 6996
6997 string productLanguage = contextValues["ProductLanguage"]; 6997 string productLanguage = contextValues["ProductLanguage"];
@@ -7056,27 +7056,27 @@ namespace WixToolset.Core
7056 7056
7057 if (!allowDowngrades && String.IsNullOrEmpty(downgradeErrorMessage)) 7057 if (!allowDowngrades && String.IsNullOrEmpty(downgradeErrorMessage))
7058 { 7058 {
7059 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DowngradeErrorMessage", "AllowDowngrades", "yes", true)); 7059 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DowngradeErrorMessage", "AllowDowngrades", "yes", true));
7060 } 7060 }
7061 7061
7062 if (allowDowngrades && !String.IsNullOrEmpty(downgradeErrorMessage)) 7062 if (allowDowngrades && !String.IsNullOrEmpty(downgradeErrorMessage))
7063 { 7063 {
7064 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DowngradeErrorMessage", "AllowDowngrades", "yes")); 7064 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DowngradeErrorMessage", "AllowDowngrades", "yes"));
7065 } 7065 }
7066 7066
7067 if (allowDowngrades && allowSameVersionUpgrades) 7067 if (allowDowngrades && allowSameVersionUpgrades)
7068 { 7068 {
7069 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "AllowSameVersionUpgrades", "AllowDowngrades", "yes")); 7069 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "AllowSameVersionUpgrades", "AllowDowngrades", "yes"));
7070 } 7070 }
7071 7071
7072 if (blockUpgrades && String.IsNullOrEmpty(disallowUpgradeErrorMessage)) 7072 if (blockUpgrades && String.IsNullOrEmpty(disallowUpgradeErrorMessage))
7073 { 7073 {
7074 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisallowUpgradeErrorMessage", "Disallow", "yes", true)); 7074 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisallowUpgradeErrorMessage", "Disallow", "yes", true));
7075 } 7075 }
7076 7076
7077 if (!blockUpgrades && !String.IsNullOrEmpty(disallowUpgradeErrorMessage)) 7077 if (!blockUpgrades && !String.IsNullOrEmpty(disallowUpgradeErrorMessage))
7078 { 7078 {
7079 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DisallowUpgradeErrorMessage", "Disallow", "yes")); 7079 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DisallowUpgradeErrorMessage", "Disallow", "yes"));
7080 } 7080 }
7081 7081
7082 if (!this.Core.EncounteredError) 7082 if (!this.Core.EncounteredError)
@@ -7207,7 +7207,7 @@ namespace WixToolset.Core
7207 Wix.CompressionLevelType compressionLevelType; 7207 Wix.CompressionLevelType compressionLevelType;
7208 if (!Wix.Enums.TryParseCompressionLevelType(compressionLevelString, out compressionLevelType)) 7208 if (!Wix.Enums.TryParseCompressionLevelType(compressionLevelString, out compressionLevelType))
7209 { 7209 {
7210 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, compressionLevelString, "high", "low", "medium", "mszip", "none")); 7210 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, compressionLevelString, "high", "low", "medium", "mszip", "none"));
7211 } 7211 }
7212 else 7212 else
7213 { 7213 {
@@ -7226,12 +7226,12 @@ namespace WixToolset.Core
7226 case "src": 7226 case "src":
7227 if (null != layout) 7227 if (null != layout)
7228 { 7228 {
7229 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Layout", "src")); 7229 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Layout", "src"));
7230 } 7230 }
7231 7231
7232 if ("src" == attrib.Name.LocalName) 7232 if ("src" == attrib.Name.LocalName)
7233 { 7233 {
7234 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Layout")); 7234 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Layout"));
7235 } 7235 }
7236 layout = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 7236 layout = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7237 break; 7237 break;
@@ -7254,7 +7254,7 @@ namespace WixToolset.Core
7254 7254
7255 if (CompilerConstants.IntegerNotSet == id) 7255 if (CompilerConstants.IntegerNotSet == id)
7256 { 7256 {
7257 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 7257 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
7258 id = CompilerConstants.IllegalInteger; 7258 id = CompilerConstants.IllegalInteger;
7259 } 7259 }
7260 7260
@@ -7264,13 +7264,13 @@ namespace WixToolset.Core
7264 { 7264 {
7265 if (null == cabinet) 7265 if (null == cabinet)
7266 { 7266 {
7267 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Cabinet", "EmbedCab", "yes")); 7267 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Cabinet", "EmbedCab", "yes"));
7268 } 7268 }
7269 else 7269 else
7270 { 7270 {
7271 if (62 < cabinet.Length) 7271 if (62 < cabinet.Length)
7272 { 7272 {
7273 this.Core.OnMessage(WixErrors.MediaEmbeddedCabinetNameTooLong(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet, cabinet.Length)); 7273 this.Core.Write(ErrorMessages.MediaEmbeddedCabinetNameTooLong(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet, cabinet.Length));
7274 } 7274 }
7275 7275
7276 cabinet = String.Concat("#", cabinet); 7276 cabinet = String.Concat("#", cabinet);
@@ -7284,7 +7284,7 @@ namespace WixToolset.Core
7284 // WiX variables in the name will trip the "not a valid 8.3 name" switch, so let them through 7284 // WiX variables in the name will trip the "not a valid 8.3 name" switch, so let them through
7285 if (!Common.WixVariableRegex.Match(cabinet).Success) 7285 if (!Common.WixVariableRegex.Match(cabinet).Success)
7286 { 7286 {
7287 this.Core.OnMessage(WixWarnings.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet)); 7287 this.Core.Write(WarningMessages.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet));
7288 } 7288 }
7289 } 7289 }
7290 } 7290 }
@@ -7292,7 +7292,7 @@ namespace WixToolset.Core
7292 7292
7293 if (null != compressionLevel && null == cabinet) 7293 if (null != compressionLevel && null == cabinet)
7294 { 7294 {
7295 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Cabinet", "CompressionLevel")); 7295 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Cabinet", "CompressionLevel"));
7296 } 7296 }
7297 7297
7298 if (patch) 7298 if (patch)
@@ -7314,11 +7314,11 @@ namespace WixToolset.Core
7314 case "DigitalSignature": 7314 case "DigitalSignature":
7315 if (YesNoType.Yes == embedCab) 7315 if (YesNoType.Yes == embedCab)
7316 { 7316 {
7317 this.Core.OnMessage(WixErrors.SignedEmbeddedCabinet(childSourceLineNumbers)); 7317 this.Core.Write(ErrorMessages.SignedEmbeddedCabinet(childSourceLineNumbers));
7318 } 7318 }
7319 else if (null == cabinet) 7319 else if (null == cabinet)
7320 { 7320 {
7321 this.Core.OnMessage(WixErrors.ExpectedSignedCabinetName(childSourceLineNumbers)); 7321 this.Core.Write(ErrorMessages.ExpectedSignedCabinetName(childSourceLineNumbers));
7322 } 7322 }
7323 else 7323 else
7324 { 7324 {
@@ -7428,11 +7428,11 @@ namespace WixToolset.Core
7428 // reason for having multiple cabients. External cabinet files must also be valid file names. 7428 // reason for having multiple cabients. External cabinet files must also be valid file names.
7429 if (exampleCabinetName.Equals(authoredCabinetTemplateValue) || !this.Core.IsValidLongFilename(exampleCabinetName, false)) 7429 if (exampleCabinetName.Equals(authoredCabinetTemplateValue) || !this.Core.IsValidLongFilename(exampleCabinetName, false))
7430 { 7430 {
7431 this.Core.OnMessage(WixErrors.InvalidCabinetTemplate(sourceLineNumbers, cabinetTemplate)); 7431 this.Core.Write(ErrorMessages.InvalidCabinetTemplate(sourceLineNumbers, cabinetTemplate));
7432 } 7432 }
7433 else if (!this.Core.IsValidShortFilename(exampleCabinetName, false) && !Common.WixVariableRegex.Match(exampleCabinetName).Success) // ignore short names with wix variables because it rarely works out. 7433 else if (!this.Core.IsValidShortFilename(exampleCabinetName, false) && !Common.WixVariableRegex.Match(exampleCabinetName).Success) // ignore short names with wix variables because it rarely works out.
7434 { 7434 {
7435 this.Core.OnMessage(WixWarnings.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "CabinetTemplate", cabinetTemplate)); 7435 this.Core.Write(WarningMessages.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "CabinetTemplate", cabinetTemplate));
7436 } 7436 }
7437 } 7437 }
7438 break; 7438 break;
@@ -7442,21 +7442,21 @@ namespace WixToolset.Core
7442 { 7442 {
7443 if (!Wix.Enums.TryParseCompressionLevelType(compressionLevel, out compressionLevelType)) 7443 if (!Wix.Enums.TryParseCompressionLevelType(compressionLevel, out compressionLevelType))
7444 { 7444 {
7445 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, compressionLevel, "high", "low", "medium", "mszip", "none")); 7445 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, compressionLevel, "high", "low", "medium", "mszip", "none"));
7446 } 7446 }
7447 } 7447 }
7448 break; 7448 break;
7449 case "DiskPrompt": 7449 case "DiskPrompt":
7450 diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 7450 diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7451 this.Core.CreateSimpleReference(sourceLineNumbers, "Property", "DiskPrompt"); // ensure the output has a DiskPrompt Property defined 7451 this.Core.CreateSimpleReference(sourceLineNumbers, "Property", "DiskPrompt"); // ensure the output has a DiskPrompt Property defined
7452 this.Core.OnMessage(WixWarnings.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 7452 this.Core.Write(WarningMessages.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
7453 break; 7453 break;
7454 case "EmbedCab": 7454 case "EmbedCab":
7455 embedCab = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 7455 embedCab = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
7456 break; 7456 break;
7457 case "VolumeLabel": 7457 case "VolumeLabel":
7458 volumeLabel = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 7458 volumeLabel = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7459 this.Core.OnMessage(WixWarnings.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 7459 this.Core.Write(WarningMessages.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
7460 break; 7460 break;
7461 case "MaximumUncompressedMediaSize": 7461 case "MaximumUncompressedMediaSize":
7462 maximumUncompressedMediaSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, int.MaxValue); 7462 maximumUncompressedMediaSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, int.MaxValue);
@@ -7582,22 +7582,22 @@ namespace WixToolset.Core
7582 7582
7583 if (null == id) 7583 if (null == id)
7584 { 7584 {
7585 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 7585 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
7586 } 7586 }
7587 7587
7588 if (null == language) 7588 if (null == language)
7589 { 7589 {
7590 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); 7590 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language"));
7591 } 7591 }
7592 7592
7593 if (null == sourceFile) 7593 if (null == sourceFile)
7594 { 7594 {
7595 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 7595 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
7596 } 7596 }
7597 7597
7598 if (CompilerConstants.IntegerNotSet == diskId) 7598 if (CompilerConstants.IntegerNotSet == diskId)
7599 { 7599 {
7600 this.Core.OnMessage(WixErrors.ExpectedAttributeInElementOrParent(sourceLineNumbers, node.Name.LocalName, "DiskId", "Directory")); 7600 this.Core.Write(ErrorMessages.ExpectedAttributeInElementOrParent(sourceLineNumbers, node.Name.LocalName, "DiskId", "Directory"));
7601 diskId = CompilerConstants.IllegalInteger; 7601 diskId = CompilerConstants.IllegalInteger;
7602 } 7602 }
7603 7603
@@ -7688,7 +7688,7 @@ namespace WixToolset.Core
7688 7688
7689 if (null == name) 7689 if (null == name)
7690 { 7690 {
7691 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 7691 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
7692 } 7692 }
7693 else // need to hex encode these characters 7693 else // need to hex encode these characters
7694 { 7694 {
@@ -7699,7 +7699,7 @@ namespace WixToolset.Core
7699 7699
7700 if (null == value) 7700 if (null == value)
7701 { 7701 {
7702 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 7702 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
7703 } 7703 }
7704 else // need to hex encode these characters 7704 else // need to hex encode these characters
7705 { 7705 {
@@ -7751,7 +7751,7 @@ namespace WixToolset.Core
7751 7751
7752 if (null == id) 7752 if (null == id)
7753 { 7753 {
7754 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 7754 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
7755 } 7755 }
7756 7756
7757 this.Core.ParseForExtensionElements(node); 7757 this.Core.ParseForExtensionElements(node);
@@ -7806,7 +7806,7 @@ namespace WixToolset.Core
7806 7806
7807 if (null == contentType) 7807 if (null == contentType)
7808 { 7808 {
7809 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ContentType")); 7809 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ContentType"));
7810 } 7810 }
7811 7811
7812 // if the advertise state has not been set, default to non-advertised 7812 // if the advertise state has not been set, default to non-advertised
@@ -7821,7 +7821,7 @@ namespace WixToolset.Core
7821 { 7821 {
7822 if (YesNoType.Yes != parentAdvertised) 7822 if (YesNoType.Yes != parentAdvertised)
7823 { 7823 {
7824 this.Core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), parentAdvertised.ToString())); 7824 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), parentAdvertised.ToString()));
7825 } 7825 }
7826 7826
7827 if (!this.Core.EncounteredError) 7827 if (!this.Core.EncounteredError)
@@ -7836,7 +7836,7 @@ namespace WixToolset.Core
7836 { 7836 {
7837 if (YesNoType.Yes == returnContentType && YesNoType.Yes == parentAdvertised) 7837 if (YesNoType.Yes == returnContentType && YesNoType.Yes == parentAdvertised)
7838 { 7838 {
7839 this.Core.OnMessage(WixErrors.CannotDefaultMismatchedAdvertiseStates(sourceLineNumbers)); 7839 this.Core.Write(ErrorMessages.CannotDefaultMismatchedAdvertiseStates(sourceLineNumbers));
7840 } 7840 }
7841 7841
7842 this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("MIME\\Database\\Content Type\\", contentType), "Extension", String.Concat(".", extension), componentId); 7842 this.Core.CreateRegistryRow(sourceLineNumbers, MsiInterop.MsidbRegistryRootClassesRoot, String.Concat("MIME\\Database\\Content Type\\", contentType), "Extension", String.Concat(".", extension), componentId);
@@ -7873,7 +7873,7 @@ namespace WixToolset.Core
7873 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 7873 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7874 if ("PUT-MODULE-NAME-HERE" == this.activeName) 7874 if ("PUT-MODULE-NAME-HERE" == this.activeName)
7875 { 7875 {
7876 this.Core.OnMessage(WixWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName)); 7876 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName));
7877 } 7877 }
7878 else 7878 else
7879 { 7879 {
@@ -7885,7 +7885,7 @@ namespace WixToolset.Core
7885 break; 7885 break;
7886 case "Guid": 7886 case "Guid":
7887 moduleId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false); 7887 moduleId = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
7888 this.Core.OnMessage(WixWarnings.DeprecatedModuleGuidAttribute(sourceLineNumbers)); 7888 this.Core.Write(WarningMessages.DeprecatedModuleGuidAttribute(sourceLineNumbers));
7889 break; 7889 break;
7890 case "Language": 7890 case "Language":
7891 this.activeLanguage = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); 7891 this.activeLanguage = this.Core.GetAttributeLocalizableIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
@@ -7906,21 +7906,21 @@ namespace WixToolset.Core
7906 7906
7907 if (null == this.activeName) 7907 if (null == this.activeName)
7908 { 7908 {
7909 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 7909 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
7910 } 7910 }
7911 7911
7912 if (null == this.activeLanguage) 7912 if (null == this.activeLanguage)
7913 { 7913 {
7914 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); 7914 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language"));
7915 } 7915 }
7916 7916
7917 if (null == version) 7917 if (null == version)
7918 { 7918 {
7919 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version")); 7919 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
7920 } 7920 }
7921 else if (!CompilerCore.IsValidModuleOrBundleVersion(version)) 7921 else if (!CompilerCore.IsValidModuleOrBundleVersion(version))
7922 { 7922 {
7923 this.Core.OnMessage(WixWarnings.InvalidModuleOrBundleVersion(sourceLineNumbers, "Module", version)); 7923 this.Core.Write(WarningMessages.InvalidModuleOrBundleVersion(sourceLineNumbers, "Module", version));
7924 } 7924 }
7925 7925
7926 try 7926 try
@@ -8119,7 +8119,7 @@ namespace WixToolset.Core
8119 8119
8120 if (null == this.activeName) 8120 if (null == this.activeName)
8121 { 8121 {
8122 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 8122 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
8123 } 8123 }
8124 8124
8125 this.Core.CreateActiveSection(this.activeName, SectionType.PatchCreation, codepage, this.Context.CompilationId); 8125 this.Core.CreateActiveSection(this.activeName, SectionType.PatchCreation, codepage, this.Context.CompilationId);
@@ -8250,13 +8250,13 @@ namespace WixToolset.Core
8250 8250
8251 if (null == name) 8251 if (null == name)
8252 { 8252 {
8253 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 8253 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
8254 } 8254 }
8255 else if (0 < name.Length) 8255 else if (0 < name.Length)
8256 { 8256 {
8257 if (8 < name.Length) // check the length 8257 if (8 < name.Length) // check the length
8258 { 8258 {
8259 this.Core.OnMessage(WixErrors.FamilyNameTooLong(sourceLineNumbers, node.Name.LocalName, "Name", name, name.Length)); 8259 this.Core.Write(ErrorMessages.FamilyNameTooLong(sourceLineNumbers, node.Name.LocalName, "Name", name, name.Length));
8260 } 8260 }
8261 else // check for illegal characters 8261 else // check for illegal characters
8262 { 8262 {
@@ -8264,7 +8264,7 @@ namespace WixToolset.Core
8264 { 8264 {
8265 if (!Char.IsLetterOrDigit(character) && '_' != character) 8265 if (!Char.IsLetterOrDigit(character) && '_' != character)
8266 { 8266 {
8267 this.Core.OnMessage(WixErrors.IllegalFamilyName(sourceLineNumbers, node.Name.LocalName, "Name", name)); 8267 this.Core.Write(ErrorMessages.IllegalFamilyName(sourceLineNumbers, node.Name.LocalName, "Name", name));
8268 } 8268 }
8269 } 8269 }
8270 } 8270 }
@@ -8338,19 +8338,19 @@ namespace WixToolset.Core
8338 upgrade = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 8338 upgrade = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8339 if (13 < upgrade.Length) 8339 if (13 < upgrade.Length)
8340 { 8340 {
8341 this.Core.OnMessage(WixErrors.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", upgrade, 13)); 8341 this.Core.Write(ErrorMessages.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", upgrade, 13));
8342 } 8342 }
8343 break; 8343 break;
8344 case "SourceFile": 8344 case "SourceFile":
8345 case "src": 8345 case "src":
8346 if (null != sourceFile) 8346 if (null != sourceFile)
8347 { 8347 {
8348 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "SourceFile")); 8348 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "SourceFile"));
8349 } 8349 }
8350 8350
8351 if ("src" == attrib.Name.LocalName) 8351 if ("src" == attrib.Name.LocalName)
8352 { 8352 {
8353 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile")); 8353 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
8354 } 8354 }
8355 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 8355 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8356 break; 8356 break;
@@ -8358,12 +8358,12 @@ namespace WixToolset.Core
8358 case "srcPatch": 8358 case "srcPatch":
8359 if (null != sourcePatch) 8359 if (null != sourcePatch)
8360 { 8360 {
8361 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "srcPatch", "SourcePatch")); 8361 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "srcPatch", "SourcePatch"));
8362 } 8362 }
8363 8363
8364 if ("srcPatch" == attrib.Name.LocalName) 8364 if ("srcPatch" == attrib.Name.LocalName)
8365 { 8365 {
8366 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourcePatch")); 8366 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourcePatch"));
8367 } 8367 }
8368 sourcePatch = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 8368 sourcePatch = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8369 break; 8369 break;
@@ -8380,12 +8380,12 @@ namespace WixToolset.Core
8380 8380
8381 if (null == upgrade) 8381 if (null == upgrade)
8382 { 8382 {
8383 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 8383 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
8384 } 8384 }
8385 8385
8386 if (null == sourceFile) 8386 if (null == sourceFile)
8387 { 8387 {
8388 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 8388 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
8389 } 8389 }
8390 8390
8391 foreach (XElement child in node.Elements()) 8391 foreach (XElement child in node.Elements())
@@ -8470,7 +8470,7 @@ namespace WixToolset.Core
8470 8470
8471 if (null == file) 8471 if (null == file)
8472 { 8472 {
8473 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); 8473 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
8474 } 8474 }
8475 8475
8476 foreach (XElement child in node.Elements()) 8476 foreach (XElement child in node.Elements())
@@ -8539,7 +8539,7 @@ namespace WixToolset.Core
8539 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 8539 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8540 if (target.Length > 13) 8540 if (target.Length > 13)
8541 { 8541 {
8542 this.Core.OnMessage(WixErrors.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", target, 13)); 8542 this.Core.Write(ErrorMessages.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", target, 13));
8543 } 8543 }
8544 break; 8544 break;
8545 case "IgnoreMissingFiles": 8545 case "IgnoreMissingFiles":
@@ -8552,12 +8552,12 @@ namespace WixToolset.Core
8552 case "src": 8552 case "src":
8553 if (null != sourceFile) 8553 if (null != sourceFile)
8554 { 8554 {
8555 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "SourceFile")); 8555 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "SourceFile"));
8556 } 8556 }
8557 8557
8558 if ("src" == attrib.Name.LocalName) 8558 if ("src" == attrib.Name.LocalName)
8559 { 8559 {
8560 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile")); 8560 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "SourceFile"));
8561 } 8561 }
8562 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 8562 sourceFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8563 break; 8563 break;
@@ -8577,17 +8577,17 @@ namespace WixToolset.Core
8577 8577
8578 if (null == target) 8578 if (null == target)
8579 { 8579 {
8580 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 8580 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
8581 } 8581 }
8582 8582
8583 if (null == sourceFile) 8583 if (null == sourceFile)
8584 { 8584 {
8585 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 8585 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
8586 } 8586 }
8587 8587
8588 if (CompilerConstants.IntegerNotSet == order) 8588 if (CompilerConstants.IntegerNotSet == order)
8589 { 8589 {
8590 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Order")); 8590 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Order"));
8591 } 8591 }
8592 8592
8593 foreach (XElement child in node.Elements()) 8593 foreach (XElement child in node.Elements())
@@ -8671,7 +8671,7 @@ namespace WixToolset.Core
8671 8671
8672 if (null == file) 8672 if (null == file)
8673 { 8673 {
8674 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 8674 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
8675 } 8675 }
8676 8676
8677 foreach (XElement child in node.Elements()) 8677 foreach (XElement child in node.Elements())
@@ -8755,12 +8755,12 @@ namespace WixToolset.Core
8755 case "src": 8755 case "src":
8756 if (null != source) 8756 if (null != source)
8757 { 8757 {
8758 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "Source")); 8758 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "src", "Source"));
8759 } 8759 }
8760 8760
8761 if ("src" == attrib.Name.LocalName) 8761 if ("src" == attrib.Name.LocalName)
8762 { 8762 {
8763 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Source")); 8763 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Source"));
8764 } 8764 }
8765 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 8765 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
8766 break; 8766 break;
@@ -8777,17 +8777,17 @@ namespace WixToolset.Core
8777 8777
8778 if (null == file) 8778 if (null == file)
8779 { 8779 {
8780 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); 8780 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
8781 } 8781 }
8782 8782
8783 if (null == source) 8783 if (null == source)
8784 { 8784 {
8785 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Source")); 8785 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Source"));
8786 } 8786 }
8787 8787
8788 if (CompilerConstants.IntegerNotSet == order) 8788 if (CompilerConstants.IntegerNotSet == order)
8789 { 8789 {
8790 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Order")); 8790 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Order"));
8791 } 8791 }
8792 8792
8793 foreach (XElement child in node.Elements()) 8793 foreach (XElement child in node.Elements())
@@ -8880,7 +8880,7 @@ namespace WixToolset.Core
8880 8880
8881 if (null == file) 8881 if (null == file)
8882 { 8882 {
8883 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); 8883 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
8884 } 8884 }
8885 8885
8886 foreach (XElement child in node.Elements()) 8886 foreach (XElement child in node.Elements())
@@ -8905,7 +8905,7 @@ namespace WixToolset.Core
8905 8905
8906 if (null == protectOffsets || null == protectLengths) 8906 if (null == protectOffsets || null == protectLengths)
8907 { 8907 {
8908 this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "ProtectRange")); 8908 this.Core.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "ProtectRange"));
8909 } 8909 }
8910 8910
8911 if (!this.Core.EncounteredError) 8911 if (!this.Core.EncounteredError)
@@ -8955,12 +8955,12 @@ namespace WixToolset.Core
8955 8955
8956 if (null == length) 8956 if (null == length)
8957 { 8957 {
8958 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Length")); 8958 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Length"));
8959 } 8959 }
8960 8960
8961 if (null == offset) 8961 if (null == offset)
8962 { 8962 {
8963 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset")); 8963 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Offset"));
8964 } 8964 }
8965 8965
8966 this.Core.ParseForExtensionElements(node); 8966 this.Core.ParseForExtensionElements(node);
@@ -9025,12 +9025,12 @@ namespace WixToolset.Core
9025 9025
9026 if (null == name) 9026 if (null == name)
9027 { 9027 {
9028 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 9028 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
9029 } 9029 }
9030 9030
9031 if (null == value) 9031 if (null == value)
9032 { 9032 {
9033 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 9033 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
9034 } 9034 }
9035 9035
9036 this.Core.ParseForExtensionElements(node); 9036 this.Core.ParseForExtensionElements(node);
@@ -9047,7 +9047,7 @@ namespace WixToolset.Core
9047 { 9047 {
9048 if (null != company) 9048 if (null != company)
9049 { 9049 {
9050 this.Core.OnMessage(WixErrors.UnexpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Company")); 9050 this.Core.Write(ErrorMessages.UnexpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Company"));
9051 } 9051 }
9052 this.ProcessProperties(sourceLineNumbers, name, value); 9052 this.ProcessProperties(sourceLineNumbers, name, value);
9053 } 9053 }
@@ -9077,22 +9077,22 @@ namespace WixToolset.Core
9077 case "ProductCode": 9077 case "ProductCode":
9078 if (null != target) 9078 if (null != target)
9079 { 9079 {
9080 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "TargetImage")); 9080 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "TargetImage"));
9081 } 9081 }
9082 target = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false); 9082 target = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib, false);
9083 break; 9083 break;
9084 case "Target": 9084 case "Target":
9085 if (null != target) 9085 if (null != target)
9086 { 9086 {
9087 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "TargetImage", "ProductCode")); 9087 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "TargetImage", "ProductCode"));
9088 } 9088 }
9089 this.Core.OnMessage(WixWarnings.DeprecatedPatchSequenceTargetAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 9089 this.Core.Write(WarningMessages.DeprecatedPatchSequenceTargetAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
9090 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 9090 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
9091 break; 9091 break;
9092 case "TargetImage": 9092 case "TargetImage":
9093 if (null != target) 9093 if (null != target)
9094 { 9094 {
9095 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "ProductCode")); 9095 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Target", "ProductCode"));
9096 } 9096 }
9097 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 9097 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
9098 this.Core.CreateSimpleReference(sourceLineNumbers, "TargetImages", target); 9098 this.Core.CreateSimpleReference(sourceLineNumbers, "TargetImages", target);
@@ -9119,7 +9119,7 @@ namespace WixToolset.Core
9119 9119
9120 if (null == family) 9120 if (null == family)
9121 { 9121 {
9122 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PatchFamily")); 9122 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PatchFamily"));
9123 } 9123 }
9124 9124
9125 this.Core.ParseForExtensionElements(node); 9125 this.Core.ParseForExtensionElements(node);
@@ -9173,7 +9173,7 @@ namespace WixToolset.Core
9173 9173
9174 if (null == id) 9174 if (null == id)
9175 { 9175 {
9176 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 9176 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
9177 } 9177 }
9178 9178
9179 this.Core.ParseForExtensionElements(node); 9179 this.Core.ParseForExtensionElements(node);
@@ -9221,7 +9221,7 @@ namespace WixToolset.Core
9221 string id = this.ParseTargetProductCodeElement(child); 9221 string id = this.ParseTargetProductCodeElement(child);
9222 if (0 == String.CompareOrdinal("*", id)) 9222 if (0 == String.CompareOrdinal("*", id))
9223 { 9223 {
9224 this.Core.OnMessage(WixErrors.IllegalAttributeValueWhenNested(sourceLineNumbers, child.Name.LocalName, "Id", id, node.Name.LocalName)); 9224 this.Core.Write(ErrorMessages.IllegalAttributeValueWhenNested(sourceLineNumbers, child.Name.LocalName, "Id", id, node.Name.LocalName));
9225 } 9225 }
9226 else 9226 else
9227 { 9227 {
@@ -9288,7 +9288,7 @@ namespace WixToolset.Core
9288 9288
9289 if (null == id) 9289 if (null == id)
9290 { 9290 {
9291 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 9291 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
9292 } 9292 }
9293 9293
9294 this.Core.ParseForExtensionElements(node); 9294 this.Core.ParseForExtensionElements(node);
@@ -9328,7 +9328,7 @@ namespace WixToolset.Core
9328 9328
9329 if (null == path) 9329 if (null == path)
9330 { 9330 {
9331 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path")); 9331 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path"));
9332 } 9332 }
9333 9333
9334 this.Core.ParseForExtensionElements(node); 9334 this.Core.ParseForExtensionElements(node);
@@ -9446,11 +9446,11 @@ namespace WixToolset.Core
9446 9446
9447 if (null == this.activeName) 9447 if (null == this.activeName)
9448 { 9448 {
9449 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 9449 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
9450 } 9450 }
9451 if (null == classification) 9451 if (null == classification)
9452 { 9452 {
9453 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Classification")); 9453 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Classification"));
9454 } 9454 }
9455 if (null == clientPatchId) 9455 if (null == clientPatchId)
9456 { 9456 {
@@ -9458,15 +9458,15 @@ namespace WixToolset.Core
9458 } 9458 }
9459 if (null == description) 9459 if (null == description)
9460 { 9460 {
9461 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); 9461 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description"));
9462 } 9462 }
9463 if (null == displayName) 9463 if (null == displayName)
9464 { 9464 {
9465 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayName")); 9465 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayName"));
9466 } 9466 }
9467 if (null == manufacturer) 9467 if (null == manufacturer)
9468 { 9468 {
9469 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Manufacturer")); 9469 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Manufacturer"));
9470 } 9470 }
9471 9471
9472 this.Core.CreateActiveSection(this.activeName, SectionType.Patch, codepage, this.Context.CompilationId); 9472 this.Core.CreateActiveSection(this.activeName, SectionType.Patch, codepage, this.Context.CompilationId);
@@ -9668,17 +9668,17 @@ namespace WixToolset.Core
9668 9668
9669 if (null == id) 9669 if (null == id)
9670 { 9670 {
9671 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 9671 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
9672 id = Identifier.Invalid; 9672 id = Identifier.Invalid;
9673 } 9673 }
9674 9674
9675 if (String.IsNullOrEmpty(version)) 9675 if (String.IsNullOrEmpty(version))
9676 { 9676 {
9677 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version")); 9677 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
9678 } 9678 }
9679 else if (!CompilerCore.IsValidProductVersion(version)) 9679 else if (!CompilerCore.IsValidProductVersion(version))
9680 { 9680 {
9681 this.Core.OnMessage(WixErrors.InvalidProductVersion(sourceLineNumbers, version)); 9681 this.Core.Write(ErrorMessages.InvalidProductVersion(sourceLineNumbers, version));
9682 } 9682 }
9683 9683
9684 // find unexpected child elements 9684 // find unexpected child elements
@@ -9768,7 +9768,7 @@ namespace WixToolset.Core
9768 this.Core.ParseForExtensionElements(node); 9768 this.Core.ParseForExtensionElements(node);
9769 9769
9770 // Always warn when using the All element. 9770 // Always warn when using the All element.
9771 this.Core.OnMessage(WixWarnings.AllChangesIncludedInPatch(sourceLineNumbers)); 9771 this.Core.Write(WarningMessages.AllChangesIncludedInPatch(sourceLineNumbers));
9772 9772
9773 if (!this.Core.EncounteredError) 9773 if (!this.Core.EncounteredError)
9774 { 9774 {
@@ -9808,7 +9808,7 @@ namespace WixToolset.Core
9808 9808
9809 if (null == id) 9809 if (null == id)
9810 { 9810 {
9811 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 9811 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
9812 } 9812 }
9813 9813
9814 this.Core.ParseForExtensionElements(node); 9814 this.Core.ParseForExtensionElements(node);
@@ -9853,12 +9853,12 @@ namespace WixToolset.Core
9853 9853
9854 if (null == id) 9854 if (null == id)
9855 { 9855 {
9856 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 9856 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
9857 id = Identifier.Invalid; 9857 id = Identifier.Invalid;
9858 } 9858 }
9859 else if (27 < id.Id.Length) 9859 else if (27 < id.Id.Length)
9860 { 9860 {
9861 this.Core.OnMessage(WixErrors.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, 27)); 9861 this.Core.Write(ErrorMessages.IdentifierTooLongError(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, 27));
9862 } 9862 }
9863 9863
9864 foreach (XElement child in node.Elements()) 9864 foreach (XElement child in node.Elements())
@@ -9871,7 +9871,7 @@ namespace WixToolset.Core
9871 if (parsedValidate) 9871 if (parsedValidate)
9872 { 9872 {
9873 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 9873 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
9874 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 9874 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
9875 } 9875 }
9876 else 9876 else
9877 { 9877 {
@@ -9949,7 +9949,7 @@ namespace WixToolset.Core
9949 validationFlags |= TransformFlags.ValidateUpdateVersion; 9949 validationFlags |= TransformFlags.ValidateUpdateVersion;
9950 break; 9950 break;
9951 default: 9951 default:
9952 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Version", check, "Major", "Minor", "Update")); 9952 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Version", check, "Major", "Minor", "Update"));
9953 break; 9953 break;
9954 } 9954 }
9955 break; 9955 break;
@@ -9975,7 +9975,7 @@ namespace WixToolset.Core
9975 validationFlags |= TransformFlags.ValidateNewGreaterBaseVersion; 9975 validationFlags |= TransformFlags.ValidateNewGreaterBaseVersion;
9976 break; 9976 break;
9977 default: 9977 default:
9978 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Operator", op, "Lesser", "LesserOrEqual", "Equal", "GreaterOrEqual", "Greater")); 9978 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Operator", op, "Lesser", "LesserOrEqual", "Equal", "GreaterOrEqual", "Greater"));
9979 break; 9979 break;
9980 } 9980 }
9981 break; 9981 break;
@@ -10117,13 +10117,13 @@ namespace WixToolset.Core
10117 10117
10118 if (null == requiredId) 10118 if (null == requiredId)
10119 { 10119 {
10120 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RequiredId")); 10120 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RequiredId"));
10121 requiredId = String.Empty; 10121 requiredId = String.Empty;
10122 } 10122 }
10123 10123
10124 if (CompilerConstants.IntegerNotSet == requiredLanguage) 10124 if (CompilerConstants.IntegerNotSet == requiredLanguage)
10125 { 10125 {
10126 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RequiredLanguage")); 10126 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RequiredLanguage"));
10127 requiredLanguage = CompilerConstants.IllegalInteger; 10127 requiredLanguage = CompilerConstants.IllegalInteger;
10128 } 10128 }
10129 10129
@@ -10188,13 +10188,13 @@ namespace WixToolset.Core
10188 10188
10189 if (null == excludedId) 10189 if (null == excludedId)
10190 { 10190 {
10191 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ExcludedId")); 10191 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ExcludedId"));
10192 excludedId = String.Empty; 10192 excludedId = String.Empty;
10193 } 10193 }
10194 10194
10195 if (CompilerConstants.IntegerNotSet != excludeExceptLanguage && CompilerConstants.IntegerNotSet != excludeLanguage) 10195 if (CompilerConstants.IntegerNotSet != excludeExceptLanguage && CompilerConstants.IntegerNotSet != excludeLanguage)
10196 { 10196 {
10197 this.Core.OnMessage(WixErrors.IllegalModuleExclusionLanguageAttributes(sourceLineNumbers)); 10197 this.Core.Write(ErrorMessages.IllegalModuleExclusionLanguageAttributes(sourceLineNumbers));
10198 } 10198 }
10199 else if (CompilerConstants.IntegerNotSet != excludeExceptLanguage) 10199 else if (CompilerConstants.IntegerNotSet != excludeExceptLanguage)
10200 { 10200 {
@@ -10278,7 +10278,7 @@ namespace WixToolset.Core
10278 format = 3; 10278 format = 3;
10279 break; 10279 break;
10280 default: 10280 default:
10281 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Format", formatStr, "Text", "Key", "Integer", "Bitfield")); 10281 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Format", formatStr, "Text", "Key", "Integer", "Bitfield"));
10282 break; 10282 break;
10283 } 10283 }
10284 } 10284 }
@@ -10317,13 +10317,13 @@ namespace WixToolset.Core
10317 10317
10318 if (null == name) 10318 if (null == name)
10319 { 10319 {
10320 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 10320 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
10321 name = String.Empty; 10321 name = String.Empty;
10322 } 10322 }
10323 10323
10324 if (CompilerConstants.IntegerNotSet == format) 10324 if (CompilerConstants.IntegerNotSet == format)
10325 { 10325 {
10326 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Format")); 10326 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Format"));
10327 format = CompilerConstants.IllegalInteger; 10327 format = CompilerConstants.IllegalInteger;
10328 } 10328 }
10329 10329
@@ -10388,19 +10388,19 @@ namespace WixToolset.Core
10388 10388
10389 if (null == column) 10389 if (null == column)
10390 { 10390 {
10391 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Column")); 10391 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Column"));
10392 column = String.Empty; 10392 column = String.Empty;
10393 } 10393 }
10394 10394
10395 if (null == table) 10395 if (null == table)
10396 { 10396 {
10397 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Table")); 10397 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Table"));
10398 table = String.Empty; 10398 table = String.Empty;
10399 } 10399 }
10400 10400
10401 if (null == rowKeys) 10401 if (null == rowKeys)
10402 { 10402 {
10403 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Row")); 10403 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Row"));
10404 } 10404 }
10405 10405
10406 this.Core.ParseForExtensionElements(node); 10406 this.Core.ParseForExtensionElements(node);
@@ -10446,7 +10446,7 @@ namespace WixToolset.Core
10446 10446
10447 if (null == id) 10447 if (null == id)
10448 { 10448 {
10449 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 10449 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
10450 } 10450 }
10451 10451
10452 this.Core.ParseForExtensionElements(node); 10452 this.Core.ParseForExtensionElements(node);
@@ -10506,7 +10506,7 @@ namespace WixToolset.Core
10506 10506
10507 if (null == name) 10507 if (null == name)
10508 { 10508 {
10509 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 10509 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
10510 } 10510 }
10511 10511
10512 if (null == id) 10512 if (null == id)
@@ -10594,7 +10594,7 @@ namespace WixToolset.Core
10594 10594
10595 if (null == id) 10595 if (null == id)
10596 { 10596 {
10597 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 10597 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
10598 } 10598 }
10599 10599
10600 this.Core.ParseForExtensionElements(node); 10600 this.Core.ParseForExtensionElements(node);
@@ -10656,7 +10656,7 @@ namespace WixToolset.Core
10656 registration = 1; 10656 registration = 1;
10657 break; 10657 break;
10658 default: 10658 default:
10659 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Registration", registrationValue, "machine", "user")); 10659 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Registration", registrationValue, "machine", "user"));
10660 break; 10660 break;
10661 } 10661 }
10662 } 10662 }
@@ -10674,7 +10674,7 @@ namespace WixToolset.Core
10674 10674
10675 if (CompilerConstants.IntegerNotSet == registration) 10675 if (CompilerConstants.IntegerNotSet == registration)
10676 { 10676 {
10677 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Registration")); 10677 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Registration"));
10678 registration = CompilerConstants.IllegalInteger; 10678 registration = CompilerConstants.IllegalInteger;
10679 } 10679 }
10680 10680
@@ -10784,7 +10784,7 @@ namespace WixToolset.Core
10784 // merge modules must always be compressed, so this attribute is invalid 10784 // merge modules must always be compressed, so this attribute is invalid
10785 if (this.compilingModule) 10785 if (this.compilingModule)
10786 { 10786 {
10787 this.Core.OnMessage(WixWarnings.DeprecatedPackageCompressedAttribute(sourceLineNumbers)); 10787 this.Core.Write(WarningMessages.DeprecatedPackageCompressedAttribute(sourceLineNumbers));
10788 // this.core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Compressed", "Module")); 10788 // this.core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Compressed", "Module"));
10789 } 10789 }
10790 else if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) 10790 else if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
@@ -10810,7 +10810,7 @@ namespace WixToolset.Core
10810 sourceBits = sourceBits | 8; 10810 sourceBits = sourceBits | 8;
10811 break; 10811 break;
10812 default: 10812 default:
10813 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installPrivileges, "elevated", "limited")); 10813 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installPrivileges, "elevated", "limited"));
10814 break; 10814 break;
10815 } 10815 }
10816 } 10816 }
@@ -10833,7 +10833,7 @@ namespace WixToolset.Core
10833 sourceBits = sourceBits | 8; 10833 sourceBits = sourceBits | 8;
10834 break; 10834 break;
10835 default: 10835 default:
10836 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installScope, "perMachine", "perUser")); 10836 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installScope, "perMachine", "perUser"));
10837 break; 10837 break;
10838 } 10838 }
10839 } 10839 }
@@ -10851,13 +10851,13 @@ namespace WixToolset.Core
10851 packageAuthor = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 10851 packageAuthor = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
10852 if ("PUT-COMPANY-NAME-HERE" == packageAuthor) 10852 if ("PUT-COMPANY-NAME-HERE" == packageAuthor)
10853 { 10853 {
10854 this.Core.OnMessage(WixWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, packageAuthor)); 10854 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, packageAuthor));
10855 } 10855 }
10856 break; 10856 break;
10857 case "Platform": 10857 case "Platform":
10858 if (null != platformValue) 10858 if (null != platformValue)
10859 { 10859 {
10860 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Platforms")); 10860 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Platforms"));
10861 } 10861 }
10862 10862
10863 platformValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 10863 platformValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -10865,7 +10865,7 @@ namespace WixToolset.Core
10865 switch (platformType) 10865 switch (platformType)
10866 { 10866 {
10867 case Wix.Package.PlatformType.intel: 10867 case Wix.Package.PlatformType.intel:
10868 this.Core.OnMessage(WixWarnings.DeprecatedAttributeValue(sourceLineNumbers, platformValue, node.Name.LocalName, attrib.Name.LocalName, "x86")); 10868 this.Core.Write(WarningMessages.DeprecatedAttributeValue(sourceLineNumbers, platformValue, node.Name.LocalName, attrib.Name.LocalName, "x86"));
10869 goto case Wix.Package.PlatformType.x86; 10869 goto case Wix.Package.PlatformType.x86;
10870 case Wix.Package.PlatformType.x86: 10870 case Wix.Package.PlatformType.x86:
10871 platform = "Intel"; 10871 platform = "Intel";
@@ -10874,7 +10874,7 @@ namespace WixToolset.Core
10874 platform = "x64"; 10874 platform = "x64";
10875 break; 10875 break;
10876 case Wix.Package.PlatformType.intel64: 10876 case Wix.Package.PlatformType.intel64:
10877 this.Core.OnMessage(WixWarnings.DeprecatedAttributeValue(sourceLineNumbers, platformValue, node.Name.LocalName, attrib.Name.LocalName, "ia64")); 10877 this.Core.Write(WarningMessages.DeprecatedAttributeValue(sourceLineNumbers, platformValue, node.Name.LocalName, attrib.Name.LocalName, "ia64"));
10878 goto case Wix.Package.PlatformType.ia64; 10878 goto case Wix.Package.PlatformType.ia64;
10879 case Wix.Package.PlatformType.ia64: 10879 case Wix.Package.PlatformType.ia64:
10880 platform = "Intel64"; 10880 platform = "Intel64";
@@ -10883,17 +10883,17 @@ namespace WixToolset.Core
10883 platform = "Arm"; 10883 platform = "Arm";
10884 break; 10884 break;
10885 default: 10885 default:
10886 this.Core.OnMessage(WixErrors.InvalidPlatformValue(sourceLineNumbers, platformValue)); 10886 this.Core.Write(ErrorMessages.InvalidPlatformValue(sourceLineNumbers, platformValue));
10887 break; 10887 break;
10888 } 10888 }
10889 break; 10889 break;
10890 case "Platforms": 10890 case "Platforms":
10891 if (null != platformValue) 10891 if (null != platformValue)
10892 { 10892 {
10893 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Platform")); 10893 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Platform"));
10894 } 10894 }
10895 10895
10896 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Platform")); 10896 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Platform"));
10897 platformValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 10897 platformValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
10898 platform = platformValue; 10898 platform = platformValue;
10899 break; 10899 break;
@@ -10923,31 +10923,31 @@ namespace WixToolset.Core
10923 10923
10924 if (installPrivilegeSeen && installScopeSeen) 10924 if (installPrivilegeSeen && installScopeSeen)
10925 { 10925 {
10926 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "InstallPrivileges", "InstallScope")); 10926 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "InstallPrivileges", "InstallScope"));
10927 } 10927 }
10928 10928
10929 if ((0 != String.Compare(platform, "Intel", StringComparison.OrdinalIgnoreCase)) && 200 > msiVersion) 10929 if ((0 != String.Compare(platform, "Intel", StringComparison.OrdinalIgnoreCase)) && 200 > msiVersion)
10930 { 10930 {
10931 msiVersion = 200; 10931 msiVersion = 200;
10932 this.Core.OnMessage(WixWarnings.RequiresMsi200for64bitPackage(sourceLineNumbers)); 10932 this.Core.Write(WarningMessages.RequiresMsi200for64bitPackage(sourceLineNumbers));
10933 } 10933 }
10934 10934
10935 if ((0 == String.Compare(platform, "Arm", StringComparison.OrdinalIgnoreCase)) && 500 > msiVersion) 10935 if ((0 == String.Compare(platform, "Arm", StringComparison.OrdinalIgnoreCase)) && 500 > msiVersion)
10936 { 10936 {
10937 msiVersion = 500; 10937 msiVersion = 500;
10938 this.Core.OnMessage(WixWarnings.RequiresMsi500forArmPackage(sourceLineNumbers)); 10938 this.Core.Write(WarningMessages.RequiresMsi500forArmPackage(sourceLineNumbers));
10939 } 10939 }
10940 10940
10941 if (null == packageAuthor) 10941 if (null == packageAuthor)
10942 { 10942 {
10943 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Manufacturer")); 10943 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Manufacturer"));
10944 } 10944 }
10945 10945
10946 if (this.compilingModule) 10946 if (this.compilingModule)
10947 { 10947 {
10948 if (null == packageCode) 10948 if (null == packageCode)
10949 { 10949 {
10950 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 10950 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
10951 } 10951 }
10952 10952
10953 // merge modules use the modularization guid as the package code 10953 // merge modules use the modularization guid as the package code
@@ -10968,7 +10968,7 @@ namespace WixToolset.Core
10968 10968
10969 if ("*" != packageCode) 10969 if ("*" != packageCode)
10970 { 10970 {
10971 this.Core.OnMessage(WixWarnings.PackageCodeSet(sourceLineNumbers)); 10971 this.Core.Write(WarningMessages.PackageCodeSet(sourceLineNumbers));
10972 } 10972 }
10973 } 10973 }
10974 10974
@@ -11101,37 +11101,37 @@ namespace WixToolset.Core
11101 11101
11102 if (YesNoType.NotSet == allowRemoval) 11102 if (YesNoType.NotSet == allowRemoval)
11103 { 11103 {
11104 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "AllowRemoval")); 11104 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "AllowRemoval"));
11105 } 11105 }
11106 11106
11107 if (null == classification) 11107 if (null == classification)
11108 { 11108 {
11109 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Classification")); 11109 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Classification"));
11110 } 11110 }
11111 11111
11112 if (null == description) 11112 if (null == description)
11113 { 11113 {
11114 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); 11114 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description"));
11115 } 11115 }
11116 11116
11117 if (null == displayName) 11117 if (null == displayName)
11118 { 11118 {
11119 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayName")); 11119 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayName"));
11120 } 11120 }
11121 11121
11122 if (null == manufacturerName) 11122 if (null == manufacturerName)
11123 { 11123 {
11124 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ManufacturerName")); 11124 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ManufacturerName"));
11125 } 11125 }
11126 11126
11127 if (null == moreInfoUrl) 11127 if (null == moreInfoUrl)
11128 { 11128 {
11129 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MoreInfoURL")); 11129 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MoreInfoURL"));
11130 } 11130 }
11131 11131
11132 if (null == targetProductName) 11132 if (null == targetProductName)
11133 { 11133 {
11134 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetProductName")); 11134 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetProductName"));
11135 } 11135 }
11136 11136
11137 foreach (XElement child in node.Elements()) 11137 foreach (XElement child in node.Elements())
@@ -11288,17 +11288,17 @@ namespace WixToolset.Core
11288 11288
11289 if (null == company) 11289 if (null == company)
11290 { 11290 {
11291 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Company")); 11291 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Company"));
11292 } 11292 }
11293 11293
11294 if (null == property) 11294 if (null == property)
11295 { 11295 {
11296 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property")); 11296 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
11297 } 11297 }
11298 11298
11299 if (null == value) 11299 if (null == value)
11300 { 11300 {
11301 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 11301 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
11302 } 11302 }
11303 11303
11304 this.Core.ParseForExtensionElements(node); 11304 this.Core.ParseForExtensionElements(node);
@@ -11382,13 +11382,13 @@ namespace WixToolset.Core
11382 switch (attrib.Name.LocalName) 11382 switch (attrib.Name.LocalName)
11383 { 11383 {
11384 case "AdminImage": 11384 case "AdminImage":
11385 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 11385 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
11386 break; 11386 break;
11387 case "Comments": 11387 case "Comments":
11388 comments = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 11388 comments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
11389 break; 11389 break;
11390 case "Compressed": 11390 case "Compressed":
11391 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 11391 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
11392 break; 11392 break;
11393 case "Description": 11393 case "Description":
11394 packageName = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 11394 packageName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -11397,19 +11397,19 @@ namespace WixToolset.Core
11397 keywords = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 11397 keywords = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
11398 break; 11398 break;
11399 case "Languages": 11399 case "Languages":
11400 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 11400 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
11401 break; 11401 break;
11402 case "Manufacturer": 11402 case "Manufacturer":
11403 packageAuthor = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 11403 packageAuthor = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
11404 break; 11404 break;
11405 case "Platforms": 11405 case "Platforms":
11406 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 11406 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
11407 break; 11407 break;
11408 case "ReadOnly": 11408 case "ReadOnly":
11409 security = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); 11409 security = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
11410 break; 11410 break;
11411 case "ShortNames": 11411 case "ShortNames":
11412 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 11412 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
11413 break; 11413 break;
11414 case "SummaryCodepage": 11414 case "SummaryCodepage":
11415 codepage = this.Core.GetAttributeLocalizableCodePageValue(sourceLineNumbers, attrib); 11415 codepage = this.Core.GetAttributeLocalizableCodePageValue(sourceLineNumbers, attrib);
@@ -11508,7 +11508,7 @@ namespace WixToolset.Core
11508 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 11508 SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
11509 string name = null; 11509 string name = null;
11510 11510
11511 this.Core.OnMessage(WixWarnings.DeprecatedIgnoreModularizationElement(sourceLineNumbers)); 11511 this.Core.Write(WarningMessages.DeprecatedIgnoreModularizationElement(sourceLineNumbers));
11512 11512
11513 foreach (XAttribute attrib in node.Attributes()) 11513 foreach (XAttribute attrib in node.Attributes())
11514 { 11514 {
@@ -11535,7 +11535,7 @@ namespace WixToolset.Core
11535 11535
11536 if (null == name) 11536 if (null == name)
11537 { 11537 {
11538 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 11538 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
11539 } 11539 }
11540 11540
11541 this.Core.ParseForExtensionElements(node); 11541 this.Core.ParseForExtensionElements(node);
@@ -11624,12 +11624,12 @@ namespace WixToolset.Core
11624 11624
11625 if (null == user) 11625 if (null == user)
11626 { 11626 {
11627 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "User")); 11627 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "User"));
11628 } 11628 }
11629 11629
11630 if (int.MinValue == permission) // just GENERIC_READ, which is MSI_NULL 11630 if (int.MinValue == permission) // just GENERIC_READ, which is MSI_NULL
11631 { 11631 {
11632 this.Core.OnMessage(WixErrors.GenericReadNotAllowed(sourceLineNumbers)); 11632 this.Core.Write(ErrorMessages.GenericReadNotAllowed(sourceLineNumbers));
11633 } 11633 }
11634 11634
11635 this.Core.ParseForExtensionElements(node); 11635 this.Core.ParseForExtensionElements(node);
@@ -11695,7 +11695,7 @@ namespace WixToolset.Core
11695 11695
11696 if (null == sddl) 11696 if (null == sddl)
11697 { 11697 {
11698 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Sddl")); 11698 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Sddl"));
11699 } 11699 }
11700 11700
11701 if (null == id) 11701 if (null == id)
@@ -11713,7 +11713,7 @@ namespace WixToolset.Core
11713 if (null != condition) 11713 if (null != condition)
11714 { 11714 {
11715 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 11715 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
11716 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 11716 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
11717 } 11717 }
11718 11718
11719 condition = this.ParseConditionElement(child, node.Name.LocalName, null, null); 11719 condition = this.ParseConditionElement(child, node.Name.LocalName, null, null);
@@ -11776,14 +11776,14 @@ namespace WixToolset.Core
11776 manufacturer = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters); 11776 manufacturer = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters);
11777 if ("PUT-COMPANY-NAME-HERE" == manufacturer) 11777 if ("PUT-COMPANY-NAME-HERE" == manufacturer)
11778 { 11778 {
11779 this.Core.OnMessage(WixWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, manufacturer)); 11779 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, manufacturer));
11780 } 11780 }
11781 break; 11781 break;
11782 case "Name": 11782 case "Name":
11783 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters); 11783 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters);
11784 if ("PUT-PRODUCT-NAME-HERE" == this.activeName) 11784 if ("PUT-PRODUCT-NAME-HERE" == this.activeName)
11785 { 11785 {
11786 this.Core.OnMessage(WixWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName)); 11786 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName));
11787 } 11787 }
11788 break; 11788 break;
11789 case "UpgradeCode": 11789 case "UpgradeCode":
@@ -11809,36 +11809,36 @@ namespace WixToolset.Core
11809 11809
11810 if (null == productCode) 11810 if (null == productCode)
11811 { 11811 {
11812 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 11812 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
11813 } 11813 }
11814 11814
11815 if (null == this.activeLanguage) 11815 if (null == this.activeLanguage)
11816 { 11816 {
11817 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); 11817 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language"));
11818 } 11818 }
11819 11819
11820 if (null == manufacturer) 11820 if (null == manufacturer)
11821 { 11821 {
11822 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Manufacturer")); 11822 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Manufacturer"));
11823 } 11823 }
11824 11824
11825 if (null == this.activeName) 11825 if (null == this.activeName)
11826 { 11826 {
11827 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 11827 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
11828 } 11828 }
11829 11829
11830 if (null == upgradeCode) 11830 if (null == upgradeCode)
11831 { 11831 {
11832 this.Core.OnMessage(WixWarnings.MissingUpgradeCode(sourceLineNumbers)); 11832 this.Core.Write(WarningMessages.MissingUpgradeCode(sourceLineNumbers));
11833 } 11833 }
11834 11834
11835 if (null == version) 11835 if (null == version)
11836 { 11836 {
11837 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version")); 11837 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
11838 } 11838 }
11839 else if (!CompilerCore.IsValidProductVersion(version)) 11839 else if (!CompilerCore.IsValidProductVersion(version))
11840 { 11840 {
11841 this.Core.OnMessage(WixErrors.InvalidProductVersion(sourceLineNumbers, version)); 11841 this.Core.Write(ErrorMessages.InvalidProductVersion(sourceLineNumbers, version));
11842 } 11842 }
11843 11843
11844 if (this.Core.EncounteredError) 11844 if (this.Core.EncounteredError)
@@ -12079,7 +12079,7 @@ namespace WixToolset.Core
12079 12079
12080 if ((YesNoType.No == advertise && YesNoType.Yes == progIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == progIdAdvertise)) 12080 if ((YesNoType.No == advertise && YesNoType.Yes == progIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == progIdAdvertise))
12081 { 12081 {
12082 this.Core.OnMessage(WixErrors.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), progIdAdvertise.ToString())); 12082 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), progIdAdvertise.ToString()));
12083 } 12083 }
12084 else 12084 else
12085 { 12085 {
@@ -12093,7 +12093,7 @@ namespace WixToolset.Core
12093 12093
12094 if (null != parent && (null != icon || CompilerConstants.IntegerNotSet != iconIndex)) 12094 if (null != parent && (null != icon || CompilerConstants.IntegerNotSet != iconIndex))
12095 { 12095 {
12096 this.Core.OnMessage(WixErrors.VersionIndependentProgIdsCannotHaveIcons(sourceLineNumbers)); 12096 this.Core.Write(ErrorMessages.VersionIndependentProgIdsCannotHaveIcons(sourceLineNumbers));
12097 } 12097 }
12098 12098
12099 YesNoType firstProgIdForNestedClass = YesNoType.Yes; 12099 YesNoType firstProgIdForNestedClass = YesNoType.Yes;
@@ -12125,7 +12125,7 @@ namespace WixToolset.Core
12125 else 12125 else
12126 { 12126 {
12127 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 12127 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
12128 this.Core.OnMessage(WixErrors.ProgIdNestedTooDeep(childSourceLineNumbers)); 12128 this.Core.Write(ErrorMessages.ProgIdNestedTooDeep(childSourceLineNumbers));
12129 } 12129 }
12130 break; 12130 break;
12131 default: 12131 default:
@@ -12209,7 +12209,7 @@ namespace WixToolset.Core
12209 // raise an error for an orphaned ProgId 12209 // raise an error for an orphaned ProgId
12210 if (YesNoType.Yes == advertise && !foundExtension && null == parent && null == classId) 12210 if (YesNoType.Yes == advertise && !foundExtension && null == parent && null == classId)
12211 { 12211 {
12212 this.Core.OnMessage(WixWarnings.OrphanedProgId(sourceLineNumbers, progId)); 12212 this.Core.Write(WarningMessages.OrphanedProgId(sourceLineNumbers, progId));
12213 } 12213 }
12214 12214
12215 return progId; 12215 return progId;
@@ -12270,16 +12270,16 @@ namespace WixToolset.Core
12270 12270
12271 if (null == id) 12271 if (null == id)
12272 { 12272 {
12273 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 12273 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
12274 id = Identifier.Invalid; 12274 id = Identifier.Invalid;
12275 } 12275 }
12276 else if ("ProductID" == id.Id) 12276 else if ("ProductID" == id.Id)
12277 { 12277 {
12278 this.Core.OnMessage(WixWarnings.ProductIdAuthored(sourceLineNumbers)); 12278 this.Core.Write(WarningMessages.ProductIdAuthored(sourceLineNumbers));
12279 } 12279 }
12280 else if ("SecureCustomProperties" == id.Id || "AdminProperties" == id.Id || "MsiHiddenProperties" == id.Id) 12280 else if ("SecureCustomProperties" == id.Id || "AdminProperties" == id.Id || "MsiHiddenProperties" == id.Id)
12281 { 12281 {
12282 this.Core.OnMessage(WixErrors.CannotAuthorSpecialProperties(sourceLineNumbers, id.Id)); 12282 this.Core.Write(ErrorMessages.CannotAuthorSpecialProperties(sourceLineNumbers, id.Id));
12283 } 12283 }
12284 12284
12285 string innerText = this.Core.GetTrimmedInnerText(node); 12285 string innerText = this.Core.GetTrimmedInnerText(node);
@@ -12288,7 +12288,7 @@ namespace WixToolset.Core
12288 // cannot specify both the value attribute and inner text 12288 // cannot specify both the value attribute and inner text
12289 if (!String.IsNullOrEmpty(innerText)) 12289 if (!String.IsNullOrEmpty(innerText))
12290 { 12290 {
12291 this.Core.OnMessage(WixErrors.IllegalAttributeWithInnerText(sourceLineNumbers, node.Name.LocalName, "Value")); 12291 this.Core.Write(ErrorMessages.IllegalAttributeWithInnerText(sourceLineNumbers, node.Name.LocalName, "Value"));
12292 } 12292 }
12293 } 12293 }
12294 else // value attribute not specified, use inner text if any. 12294 else // value attribute not specified, use inner text if any.
@@ -12326,7 +12326,7 @@ namespace WixToolset.Core
12326 // If we're doing CCP then there must be a signature. 12326 // If we're doing CCP then there must be a signature.
12327 if (complianceCheck && 0 == signatures.Count) 12327 if (complianceCheck && 0 == signatures.Count)
12328 { 12328 {
12329 this.Core.OnMessage(WixErrors.SearchElementRequiredWithAttribute(sourceLineNumbers, node.Name.LocalName, "ComplianceCheck", "yes")); 12329 this.Core.Write(ErrorMessages.SearchElementRequiredWithAttribute(sourceLineNumbers, node.Name.LocalName, "ComplianceCheck", "yes"));
12330 } 12330 }
12331 12331
12332 foreach (string sig in signatures) 12332 foreach (string sig in signatures)
@@ -12350,7 +12350,7 @@ namespace WixToolset.Core
12350 // the element. 12350 // the element.
12351 if (String.IsNullOrEmpty(value) && !admin && !secure && !hidden) 12351 if (String.IsNullOrEmpty(value) && !admin && !secure && !hidden)
12352 { 12352 {
12353 this.Core.OnMessage(WixWarnings.PropertyUseless(sourceLineNumbers, id.Id)); 12353 this.Core.Write(WarningMessages.PropertyUseless(sourceLineNumbers, id.Id));
12354 } 12354 }
12355 else // there is a value and/or a flag set, do that. 12355 else // there is a value and/or a flag set, do that.
12356 { 12356 {
@@ -12360,7 +12360,7 @@ namespace WixToolset.Core
12360 12360
12361 if (!this.Core.EncounteredError && YesNoType.Yes == suppressModularization) 12361 if (!this.Core.EncounteredError && YesNoType.Yes == suppressModularization)
12362 { 12362 {
12363 this.Core.OnMessage(WixWarnings.PropertyModularizationSuppressed(sourceLineNumbers)); 12363 this.Core.Write(WarningMessages.PropertyModularizationSuppressed(sourceLineNumbers));
12364 12364
12365 this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixSuppressModularization, id); 12365 this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.WixSuppressModularization, id);
12366 } 12366 }
@@ -12402,7 +12402,7 @@ namespace WixToolset.Core
12402 id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib); 12402 id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
12403 break; 12403 break;
12404 case "Action": 12404 case "Action":
12405 this.Core.OnMessage(WixWarnings.DeprecatedRegistryKeyActionAttribute(sourceLineNumbers)); 12405 this.Core.Write(WarningMessages.DeprecatedRegistryKeyActionAttribute(sourceLineNumbers));
12406 action = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 12406 action = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
12407 if (0 < action.Length) 12407 if (0 < action.Length)
12408 { 12408 {
@@ -12419,7 +12419,7 @@ namespace WixToolset.Core
12419 case Wix.RegistryKey.ActionType.none: 12419 case Wix.RegistryKey.ActionType.none:
12420 break; 12420 break;
12421 default: 12421 default:
12422 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "create", "createAndRemoveOnUninstall", "none")); 12422 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "create", "createAndRemoveOnUninstall", "none"));
12423 break; 12423 break;
12424 } 12424 }
12425 } 12425 }
@@ -12440,7 +12440,7 @@ namespace WixToolset.Core
12440 case "Root": 12440 case "Root":
12441 if (CompilerConstants.IntegerNotSet != root) 12441 if (CompilerConstants.IntegerNotSet != root)
12442 { 12442 {
12443 this.Core.OnMessage(WixErrors.RegistryRootInvalid(sourceLineNumbers)); 12443 this.Core.Write(ErrorMessages.RegistryRootInvalid(sourceLineNumbers));
12444 } 12444 }
12445 12445
12446 root = this.Core.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, true); 12446 root = this.Core.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, true);
@@ -12470,19 +12470,19 @@ namespace WixToolset.Core
12470 { 12470 {
12471 if (null != id) 12471 if (null != id)
12472 { 12472 {
12473 this.Core.OnMessage(WixErrors.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Id", "ForceCreateOnInstall", "ForceDeleteOnUninstall", "yes", true)); 12473 this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "Id", "ForceCreateOnInstall", "ForceDeleteOnUninstall", "yes", true));
12474 } 12474 }
12475 } 12475 }
12476 12476
12477 if (CompilerConstants.IntegerNotSet == root) 12477 if (CompilerConstants.IntegerNotSet == root)
12478 { 12478 {
12479 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root")); 12479 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root"));
12480 root = CompilerConstants.IllegalInteger; 12480 root = CompilerConstants.IllegalInteger;
12481 } 12481 }
12482 12482
12483 if (null == key) 12483 if (null == key)
12484 { 12484 {
12485 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 12485 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
12486 key = String.Empty; // set the key to something to prevent null reference exceptions 12486 key = String.Empty; // set the key to something to prevent null reference exceptions
12487 } 12487 }
12488 12488
@@ -12499,7 +12499,7 @@ namespace WixToolset.Core
12499 { 12499 {
12500 if (YesNoType.Yes == keyPath) 12500 if (YesNoType.Yes == keyPath)
12501 { 12501 {
12502 this.Core.OnMessage(WixErrors.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource")); 12502 this.Core.Write(ErrorMessages.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
12503 } 12503 }
12504 12504
12505 possibleKeyPath = possibleChildKeyPath; // the child is the key path 12505 possibleKeyPath = possibleChildKeyPath; // the child is the key path
@@ -12515,7 +12515,7 @@ namespace WixToolset.Core
12515 { 12515 {
12516 if (YesNoType.Yes == keyPath) 12516 if (YesNoType.Yes == keyPath)
12517 { 12517 {
12518 this.Core.OnMessage(WixErrors.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource")); 12518 this.Core.Write(ErrorMessages.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
12519 } 12519 }
12520 12520
12521 possibleKeyPath = possibleChildKeyPath; // the child is the key path 12521 possibleKeyPath = possibleChildKeyPath; // the child is the key path
@@ -12529,14 +12529,14 @@ namespace WixToolset.Core
12529 case "Permission": 12529 case "Permission":
12530 if (!forceCreateOnInstall) 12530 if (!forceCreateOnInstall)
12531 { 12531 {
12532 this.Core.OnMessage(WixErrors.UnexpectedElementWithAttributeValue(sourceLineNumbers, node.Name.LocalName, child.Name.LocalName, "ForceCreateOnInstall", "yes")); 12532 this.Core.Write(ErrorMessages.UnexpectedElementWithAttributeValue(sourceLineNumbers, node.Name.LocalName, child.Name.LocalName, "ForceCreateOnInstall", "yes"));
12533 } 12533 }
12534 this.ParsePermissionElement(child, id.Id, "Registry"); 12534 this.ParsePermissionElement(child, id.Id, "Registry");
12535 break; 12535 break;
12536 case "PermissionEx": 12536 case "PermissionEx":
12537 if (!forceCreateOnInstall) 12537 if (!forceCreateOnInstall)
12538 { 12538 {
12539 this.Core.OnMessage(WixErrors.UnexpectedElementWithAttributeValue(sourceLineNumbers, node.Name.LocalName, child.Name.LocalName, "ForceCreateOnInstall", "yes")); 12539 this.Core.Write(ErrorMessages.UnexpectedElementWithAttributeValue(sourceLineNumbers, node.Name.LocalName, child.Name.LocalName, "ForceCreateOnInstall", "yes"));
12540 } 12540 }
12541 this.ParsePermissionExElement(child, id.Id, "Registry"); 12541 this.ParsePermissionExElement(child, id.Id, "Registry");
12542 break; 12542 break;
@@ -12610,7 +12610,7 @@ namespace WixToolset.Core
12610 { 12610 {
12611 if (!Wix.RegistryValue.TryParseActionType(action, out actionType)) 12611 if (!Wix.RegistryValue.TryParseActionType(action, out actionType))
12612 { 12612 {
12613 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "append", "prepend", "write")); 12613 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "append", "prepend", "write"));
12614 } 12614 }
12615 } 12615 }
12616 break; 12616 break;
@@ -12637,7 +12637,7 @@ namespace WixToolset.Core
12637 case "Root": 12637 case "Root":
12638 if (CompilerConstants.IntegerNotSet != root) 12638 if (CompilerConstants.IntegerNotSet != root)
12639 { 12639 {
12640 this.Core.OnMessage(WixErrors.RegistryRootInvalid(sourceLineNumbers)); 12640 this.Core.Write(ErrorMessages.RegistryRootInvalid(sourceLineNumbers));
12641 } 12641 }
12642 12642
12643 root = this.Core.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, true); 12643 root = this.Core.GetAttributeMsidbRegistryRootValue(sourceLineNumbers, attrib, true);
@@ -12648,7 +12648,7 @@ namespace WixToolset.Core
12648 { 12648 {
12649 if (!Wix.RegistryValue.TryParseTypeType(type, out typeType)) 12649 if (!Wix.RegistryValue.TryParseTypeType(type, out typeType))
12650 { 12650 {
12651 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, type, "binary", "expandable", "integer", "multiString", "string")); 12651 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, type, "binary", "expandable", "integer", "multiString", "string"));
12652 } 12652 }
12653 } 12653 }
12654 break; 12654 break;
@@ -12675,22 +12675,22 @@ namespace WixToolset.Core
12675 if ((Wix.RegistryValue.ActionType.append == actionType || Wix.RegistryValue.ActionType.prepend == actionType) && 12675 if ((Wix.RegistryValue.ActionType.append == actionType || Wix.RegistryValue.ActionType.prepend == actionType) &&
12676 Wix.RegistryValue.TypeType.multiString != typeType) 12676 Wix.RegistryValue.TypeType.multiString != typeType)
12677 { 12677 {
12678 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Action", action, "Type", "multiString")); 12678 this.Core.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Action", action, "Type", "multiString"));
12679 } 12679 }
12680 12680
12681 if (null == key) 12681 if (null == key)
12682 { 12682 {
12683 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 12683 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
12684 } 12684 }
12685 12685
12686 if (CompilerConstants.IntegerNotSet == root) 12686 if (CompilerConstants.IntegerNotSet == root)
12687 { 12687 {
12688 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root")); 12688 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root"));
12689 } 12689 }
12690 12690
12691 if (null == type) 12691 if (null == type)
12692 { 12692 {
12693 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type")); 12693 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
12694 } 12694 }
12695 12695
12696 foreach (XElement child in node.Elements()) 12696 foreach (XElement child in node.Elements())
@@ -12702,7 +12702,7 @@ namespace WixToolset.Core
12702 case "MultiStringValue": 12702 case "MultiStringValue":
12703 if (Wix.RegistryValue.TypeType.multiString != typeType && null != value) 12703 if (Wix.RegistryValue.TypeType.multiString != typeType && null != value)
12704 { 12704 {
12705 this.Core.OnMessage(WixErrors.RegistryMultipleValuesWithoutMultiString(sourceLineNumbers, node.Name.LocalName, "Value", child.Name.LocalName, "Type")); 12705 this.Core.Write(ErrorMessages.RegistryMultipleValuesWithoutMultiString(sourceLineNumbers, node.Name.LocalName, "Value", child.Name.LocalName, "Type"));
12706 } 12706 }
12707 else if (null == value) 12707 else if (null == value)
12708 { 12708 {
@@ -12773,11 +12773,11 @@ namespace WixToolset.Core
12773 // value may be set by child MultiStringValue elements, so it must be checked here 12773 // value may be set by child MultiStringValue elements, so it must be checked here
12774 if (null == value) 12774 if (null == value)
12775 { 12775 {
12776 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 12776 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
12777 } 12777 }
12778 else if (0 == value.Length && ("+" == name || "-" == name || "*" == name)) // prevent accidental authoring of special name values 12778 else if (0 == value.Length && ("+" == name || "-" == name || "*" == name)) // prevent accidental authoring of special name values
12779 { 12779 {
12780 this.Core.OnMessage(WixErrors.RegistryNameValueIncorrect(sourceLineNumbers, node.Name.LocalName, "Name", name)); 12780 this.Core.Write(ErrorMessages.RegistryNameValueIncorrect(sourceLineNumbers, node.Name.LocalName, "Name", name));
12781 } 12781 }
12782 12782
12783 if (!this.Core.EncounteredError) 12783 if (!this.Core.EncounteredError)
@@ -12834,7 +12834,7 @@ namespace WixToolset.Core
12834 { 12834 {
12835 if (!Wix.RemoveRegistryKey.TryParseActionType(action, out actionType)) 12835 if (!Wix.RemoveRegistryKey.TryParseActionType(action, out actionType))
12836 { 12836 {
12837 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "removeOnInstall", "removeOnUninstall")); 12837 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, action, "removeOnInstall", "removeOnUninstall"));
12838 } 12838 }
12839 } 12839 }
12840 break; 12840 break;
@@ -12863,17 +12863,17 @@ namespace WixToolset.Core
12863 12863
12864 if (null == action) 12864 if (null == action)
12865 { 12865 {
12866 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action")); 12866 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action"));
12867 } 12867 }
12868 12868
12869 if (null == key) 12869 if (null == key)
12870 { 12870 {
12871 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 12871 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
12872 } 12872 }
12873 12873
12874 if (CompilerConstants.IntegerNotSet == root) 12874 if (CompilerConstants.IntegerNotSet == root)
12875 { 12875 {
12876 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root")); 12876 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root"));
12877 } 12877 }
12878 12878
12879 this.Core.ParseForExtensionElements(node); 12879 this.Core.ParseForExtensionElements(node);
@@ -12949,12 +12949,12 @@ namespace WixToolset.Core
12949 12949
12950 if (null == key) 12950 if (null == key)
12951 { 12951 {
12952 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 12952 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
12953 } 12953 }
12954 12954
12955 if (CompilerConstants.IntegerNotSet == root) 12955 if (CompilerConstants.IntegerNotSet == root)
12956 { 12956 {
12957 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root")); 12957 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Root"));
12958 } 12958 }
12959 12959
12960 this.Core.ParseForExtensionElements(node); 12960 this.Core.ParseForExtensionElements(node);
@@ -13037,7 +13037,7 @@ namespace WixToolset.Core
13037 13037
13038 if (null == name) 13038 if (null == name)
13039 { 13039 {
13040 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 13040 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
13041 } 13041 }
13042 else if (0 < name.Length) 13042 else if (0 < name.Length)
13043 { 13043 {
@@ -13050,7 +13050,7 @@ namespace WixToolset.Core
13050 } 13050 }
13051 else 13051 else
13052 { 13052 {
13053 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName")); 13053 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
13054 } 13054 }
13055 } 13055 }
13056 else if (null == shortName) // generate a short file name. 13056 else if (null == shortName) // generate a short file name.
@@ -13061,13 +13061,13 @@ namespace WixToolset.Core
13061 13061
13062 if (CompilerConstants.IntegerNotSet == on) 13062 if (CompilerConstants.IntegerNotSet == on)
13063 { 13063 {
13064 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "On")); 13064 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "On"));
13065 on = CompilerConstants.IllegalInteger; 13065 on = CompilerConstants.IllegalInteger;
13066 } 13066 }
13067 13067
13068 if (null != directory && null != property) 13068 if (null != directory && null != property)
13069 { 13069 {
13070 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "Directory", directory)); 13070 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "Directory", directory));
13071 } 13071 }
13072 13072
13073 if (null == id) 13073 if (null == id)
@@ -13158,13 +13158,13 @@ namespace WixToolset.Core
13158 13158
13159 if (CompilerConstants.IntegerNotSet == on) 13159 if (CompilerConstants.IntegerNotSet == on)
13160 { 13160 {
13161 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "On")); 13161 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "On"));
13162 on = CompilerConstants.IllegalInteger; 13162 on = CompilerConstants.IllegalInteger;
13163 } 13163 }
13164 13164
13165 if (null != directory && null != property) 13165 if (null != directory && null != property)
13166 { 13166 {
13167 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "Directory", directory)); 13167 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "Directory", directory));
13168 } 13168 }
13169 13169
13170 if (null == id) 13170 if (null == id)
@@ -13244,12 +13244,12 @@ namespace WixToolset.Core
13244 13244
13245 if (CompilerConstants.IntegerNotSet == runFromSource) 13245 if (CompilerConstants.IntegerNotSet == runFromSource)
13246 { 13246 {
13247 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RunFromSource")); 13247 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RunFromSource"));
13248 } 13248 }
13249 13249
13250 if (CompilerConstants.IntegerNotSet == runLocal) 13250 if (CompilerConstants.IntegerNotSet == runLocal)
13251 { 13251 {
13252 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RunLocal")); 13252 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "RunLocal"));
13253 } 13253 }
13254 13254
13255 this.Core.ParseForExtensionElements(node); 13255 this.Core.ParseForExtensionElements(node);
@@ -13395,22 +13395,22 @@ namespace WixToolset.Core
13395 13395
13396 if (customAction && "Custom" == actionName) 13396 if (customAction && "Custom" == actionName)
13397 { 13397 {
13398 this.Core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Action")); 13398 this.Core.Write(ErrorMessages.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Action"));
13399 } 13399 }
13400 else if (showDialog && "Show" == actionName) 13400 else if (showDialog && "Show" == actionName)
13401 { 13401 {
13402 this.Core.OnMessage(WixErrors.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Dialog")); 13402 this.Core.Write(ErrorMessages.ExpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Dialog"));
13403 } 13403 }
13404 13404
13405 if (CompilerConstants.IntegerNotSet != sequence) 13405 if (CompilerConstants.IntegerNotSet != sequence)
13406 { 13406 {
13407 if (CompilerConstants.IntegerNotSet != exitSequence) 13407 if (CompilerConstants.IntegerNotSet != exitSequence)
13408 { 13408 {
13409 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(childSourceLineNumbers, child.Name.LocalName, "Sequence", "OnExit")); 13409 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(childSourceLineNumbers, child.Name.LocalName, "Sequence", "OnExit"));
13410 } 13410 }
13411 else if (null != beforeAction || null != afterAction) 13411 else if (null != beforeAction || null != afterAction)
13412 { 13412 {
13413 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(childSourceLineNumbers, child.Name.LocalName, "Sequence", "Before", "After")); 13413 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(childSourceLineNumbers, child.Name.LocalName, "Sequence", "Before", "After"));
13414 } 13414 }
13415 } 13415 }
13416 else // sequence not specified use OnExit (which may also be not set). 13416 else // sequence not specified use OnExit (which may also be not set).
@@ -13420,33 +13420,33 @@ namespace WixToolset.Core
13420 13420
13421 if (null != beforeAction && null != afterAction) 13421 if (null != beforeAction && null != afterAction)
13422 { 13422 {
13423 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(childSourceLineNumbers, child.Name.LocalName, "After", "Before")); 13423 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(childSourceLineNumbers, child.Name.LocalName, "After", "Before"));
13424 } 13424 }
13425 else if ((customAction || showDialog || specialAction) && !suppress && CompilerConstants.IntegerNotSet == sequence && null == beforeAction && null == afterAction) 13425 else if ((customAction || showDialog || specialAction) && !suppress && CompilerConstants.IntegerNotSet == sequence && null == beforeAction && null == afterAction)
13426 { 13426 {
13427 this.Core.OnMessage(WixErrors.NeedSequenceBeforeOrAfter(childSourceLineNumbers, child.Name.LocalName)); 13427 this.Core.Write(ErrorMessages.NeedSequenceBeforeOrAfter(childSourceLineNumbers, child.Name.LocalName));
13428 } 13428 }
13429 13429
13430 // action that is scheduled to occur before/after itself 13430 // action that is scheduled to occur before/after itself
13431 if (beforeAction == actionName) 13431 if (beforeAction == actionName)
13432 { 13432 {
13433 this.Core.OnMessage(WixErrors.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "Before", beforeAction)); 13433 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "Before", beforeAction));
13434 } 13434 }
13435 else if (afterAction == actionName) 13435 else if (afterAction == actionName)
13436 { 13436 {
13437 this.Core.OnMessage(WixErrors.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "After", afterAction)); 13437 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "After", afterAction));
13438 } 13438 }
13439 13439
13440 // normal standard actions cannot be set overridable by the user (since they are overridable by default) 13440 // normal standard actions cannot be set overridable by the user (since they are overridable by default)
13441 if (overridable && WindowsInstallerStandard.IsStandardAction(actionName) && !specialAction) 13441 if (overridable && WindowsInstallerStandard.IsStandardAction(actionName) && !specialAction)
13442 { 13442 {
13443 this.Core.OnMessage(WixErrors.UnexpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Overridable")); 13443 this.Core.Write(ErrorMessages.UnexpectedAttribute(childSourceLineNumbers, child.Name.LocalName, "Overridable"));
13444 } 13444 }
13445 13445
13446 // suppress cannot be specified at the same time as Before, After, or Sequence 13446 // suppress cannot be specified at the same time as Before, After, or Sequence
13447 if (suppress && (null != afterAction || null != beforeAction || CompilerConstants.IntegerNotSet != sequence || overridable)) 13447 if (suppress && (null != afterAction || null != beforeAction || CompilerConstants.IntegerNotSet != sequence || overridable))
13448 { 13448 {
13449 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(childSourceLineNumbers, child.Name.LocalName, "Suppress", "Before", "After", "Sequence", "Overridable")); 13449 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(childSourceLineNumbers, child.Name.LocalName, "Suppress", "Before", "After", "Sequence", "Overridable"));
13450 } 13450 }
13451 13451
13452 this.Core.ParseForExtensionElements(child); 13452 this.Core.ParseForExtensionElements(child);
@@ -13497,7 +13497,7 @@ namespace WixToolset.Core
13497 string requiredPrivileges = null; 13497 string requiredPrivileges = null;
13498 string sid = null; 13498 string sid = null;
13499 13499
13500 this.Core.OnMessage(WixWarnings.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName)); 13500 this.Core.Write(WarningMessages.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName));
13501 13501
13502 foreach (XAttribute attrib in node.Attributes()) 13502 foreach (XAttribute attrib in node.Attributes())
13503 { 13503 {
@@ -13574,7 +13574,7 @@ namespace WixToolset.Core
13574 case "ServiceName": 13574 case "ServiceName":
13575 if (!String.IsNullOrEmpty(serviceName)) 13575 if (!String.IsNullOrEmpty(serviceName))
13576 { 13576 {
13577 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "ServiceInstall")); 13577 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "ServiceInstall"));
13578 } 13578 }
13579 13579
13580 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 13580 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -13752,7 +13752,7 @@ namespace WixToolset.Core
13752 13752
13753 if (String.IsNullOrEmpty(name)) 13753 if (String.IsNullOrEmpty(name))
13754 { 13754 {
13755 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ServiceName")); 13755 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ServiceName"));
13756 } 13756 }
13757 else if (null == id) 13757 else if (null == id)
13758 { 13758 {
@@ -13761,12 +13761,12 @@ namespace WixToolset.Core
13761 13761
13762 if (0 == events) 13762 if (0 == events)
13763 { 13763 {
13764 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "OnInstall", "OnReinstall", "OnUninstall")); 13764 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "OnInstall", "OnReinstall", "OnUninstall"));
13765 } 13765 }
13766 13766
13767 if (String.IsNullOrEmpty(delayedAutoStart) && String.IsNullOrEmpty(failureActionsWhen) && String.IsNullOrEmpty(preShutdownDelay) && String.IsNullOrEmpty(requiredPrivileges) && String.IsNullOrEmpty(sid)) 13767 if (String.IsNullOrEmpty(delayedAutoStart) && String.IsNullOrEmpty(failureActionsWhen) && String.IsNullOrEmpty(preShutdownDelay) && String.IsNullOrEmpty(requiredPrivileges) && String.IsNullOrEmpty(sid))
13768 { 13768 {
13769 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "DelayedAutoStart", "FailureActionsWhen", "PreShutdownDelay", "ServiceSid", "RequiredPrivilege")); 13769 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "DelayedAutoStart", "FailureActionsWhen", "PreShutdownDelay", "ServiceSid", "RequiredPrivilege"));
13770 } 13770 }
13771 13771
13772 if (!this.Core.EncounteredError) 13772 if (!this.Core.EncounteredError)
@@ -13841,7 +13841,7 @@ namespace WixToolset.Core
13841 string actions = null; 13841 string actions = null;
13842 string actionsDelays = null; 13842 string actionsDelays = null;
13843 13843
13844 this.Core.OnMessage(WixWarnings.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName)); 13844 this.Core.Write(WarningMessages.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName));
13845 13845
13846 foreach (XAttribute attrib in node.Attributes()) 13846 foreach (XAttribute attrib in node.Attributes())
13847 { 13847 {
@@ -13885,7 +13885,7 @@ namespace WixToolset.Core
13885 case "ServiceName": 13885 case "ServiceName":
13886 if (!String.IsNullOrEmpty(serviceName)) 13886 if (!String.IsNullOrEmpty(serviceName))
13887 { 13887 {
13888 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "ServiceInstall")); 13888 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "ServiceInstall"));
13889 } 13889 }
13890 13890
13891 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 13891 name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -13952,12 +13952,12 @@ namespace WixToolset.Core
13952 13952
13953 if (String.IsNullOrEmpty(action)) 13953 if (String.IsNullOrEmpty(action))
13954 { 13954 {
13955 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, child.Name.LocalName, "Action")); 13955 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, child.Name.LocalName, "Action"));
13956 } 13956 }
13957 13957
13958 if (String.IsNullOrEmpty(delay)) 13958 if (String.IsNullOrEmpty(delay))
13959 { 13959 {
13960 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, child.Name.LocalName, "Delay")); 13960 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, child.Name.LocalName, "Delay"));
13961 } 13961 }
13962 13962
13963 if (!String.IsNullOrEmpty(actions)) 13963 if (!String.IsNullOrEmpty(actions))
@@ -13985,7 +13985,7 @@ namespace WixToolset.Core
13985 13985
13986 if (String.IsNullOrEmpty(name)) 13986 if (String.IsNullOrEmpty(name))
13987 { 13987 {
13988 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ServiceName")); 13988 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ServiceName"));
13989 } 13989 }
13990 else if (null == id) 13990 else if (null == id)
13991 { 13991 {
@@ -13994,7 +13994,7 @@ namespace WixToolset.Core
13994 13994
13995 if (0 == events) 13995 if (0 == events)
13996 { 13996 {
13997 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "OnInstall", "OnReinstall", "OnUninstall")); 13997 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "OnInstall", "OnReinstall", "OnUninstall"));
13998 } 13998 }
13999 13999
14000 if (!this.Core.EncounteredError) 14000 if (!this.Core.EncounteredError)
@@ -14106,7 +14106,7 @@ namespace WixToolset.Core
14106 14106
14107 if (null == name) 14107 if (null == name)
14108 { 14108 {
14109 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 14109 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
14110 } 14110 }
14111 14111
14112 // get the ServiceControl arguments 14112 // get the ServiceControl arguments
@@ -14184,7 +14184,7 @@ namespace WixToolset.Core
14184 14184
14185 if (null == dependency) 14185 if (null == dependency)
14186 { 14186 {
14187 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 14187 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
14188 } 14188 }
14189 14189
14190 this.Core.ParseForExtensionElements(node); 14190 this.Core.ParseForExtensionElements(node);
@@ -14255,7 +14255,7 @@ namespace WixToolset.Core
14255 errorbits |= MsiInterop.MsidbServiceInstallErrorCritical; 14255 errorbits |= MsiInterop.MsidbServiceInstallErrorCritical;
14256 break; 14256 break;
14257 default: 14257 default:
14258 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, errorControlValue, "ignore", "normal", "critical")); 14258 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, errorControlValue, "ignore", "normal", "critical"));
14259 break; 14259 break;
14260 } 14260 }
14261 } 14261 }
@@ -14293,10 +14293,10 @@ namespace WixToolset.Core
14293 break; 14293 break;
14294 case Wix.ServiceInstall.StartType.boot: 14294 case Wix.ServiceInstall.StartType.boot:
14295 case Wix.ServiceInstall.StartType.system: 14295 case Wix.ServiceInstall.StartType.system:
14296 this.Core.OnMessage(WixErrors.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, startValue)); 14296 this.Core.Write(ErrorMessages.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, startValue));
14297 break; 14297 break;
14298 default: 14298 default:
14299 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, startValue, "auto", "demand", "disabled")); 14299 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, startValue, "auto", "demand", "disabled"));
14300 break; 14300 break;
14301 } 14301 }
14302 } 14302 }
@@ -14316,10 +14316,10 @@ namespace WixToolset.Core
14316 break; 14316 break;
14317 case Wix.ServiceInstall.TypeType.kernelDriver: 14317 case Wix.ServiceInstall.TypeType.kernelDriver:
14318 case Wix.ServiceInstall.TypeType.systemDriver: 14318 case Wix.ServiceInstall.TypeType.systemDriver:
14319 this.Core.OnMessage(WixErrors.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue)); 14319 this.Core.Write(ErrorMessages.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue));
14320 break; 14320 break;
14321 default: 14321 default:
14322 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, node.Name.LocalName, typeValue, "ownProcess", "shareProcess")); 14322 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, node.Name.LocalName, typeValue, "ownProcess", "shareProcess"));
14323 break; 14323 break;
14324 } 14324 }
14325 } 14325 }
@@ -14343,7 +14343,7 @@ namespace WixToolset.Core
14343 14343
14344 if (String.IsNullOrEmpty(name)) 14344 if (String.IsNullOrEmpty(name))
14345 { 14345 {
14346 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 14346 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
14347 } 14347 }
14348 else if (null == id) 14348 else if (null == id)
14349 { 14349 {
@@ -14352,7 +14352,7 @@ namespace WixToolset.Core
14352 14352
14353 if (0 == startType) 14353 if (0 == startType)
14354 { 14354 {
14355 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Start")); 14355 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Start"));
14356 } 14356 }
14357 14357
14358 if (eraseDescription) 14358 if (eraseDescription)
@@ -14462,7 +14462,7 @@ namespace WixToolset.Core
14462 // default so no work necessary. 14462 // default so no work necessary.
14463 break; 14463 break;
14464 default: 14464 default:
14465 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, sequenceValue, "execute", "ui", "both")); 14465 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, sequenceValue, "execute", "ui", "both"));
14466 break; 14466 break;
14467 } 14467 }
14468 } 14468 }
@@ -14485,7 +14485,7 @@ namespace WixToolset.Core
14485 14485
14486 if (null == id) 14486 if (null == id)
14487 { 14487 {
14488 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 14488 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
14489 } 14489 }
14490 else if (String.IsNullOrEmpty(actionName)) 14490 else if (String.IsNullOrEmpty(actionName))
14491 { 14491 {
@@ -14494,7 +14494,7 @@ namespace WixToolset.Core
14494 14494
14495 if (null == value) 14495 if (null == value)
14496 { 14496 {
14497 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 14497 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
14498 } 14498 }
14499 14499
14500 this.Core.ParseForExtensionElements(node); 14500 this.Core.ParseForExtensionElements(node);
@@ -14577,7 +14577,7 @@ namespace WixToolset.Core
14577 // default so no work necessary. 14577 // default so no work necessary.
14578 break; 14578 break;
14579 default: 14579 default:
14580 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, sequenceValue, "execute", "ui", "both")); 14580 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, sequenceValue, "execute", "ui", "both"));
14581 break; 14581 break;
14582 } 14582 }
14583 } 14583 }
@@ -14600,7 +14600,7 @@ namespace WixToolset.Core
14600 14600
14601 if (null == id) 14601 if (null == id)
14602 { 14602 {
14603 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 14603 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
14604 } 14604 }
14605 else if (String.IsNullOrEmpty(actionName)) 14605 else if (String.IsNullOrEmpty(actionName))
14606 { 14606 {
@@ -14609,16 +14609,16 @@ namespace WixToolset.Core
14609 14609
14610 if (null == value) 14610 if (null == value)
14611 { 14611 {
14612 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 14612 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
14613 } 14613 }
14614 14614
14615 if (null != beforeAction && null != afterAction) 14615 if (null != beforeAction && null != afterAction)
14616 { 14616 {
14617 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "After", "Before")); 14617 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "After", "Before"));
14618 } 14618 }
14619 else if (null == beforeAction && null == afterAction) 14619 else if (null == beforeAction && null == afterAction)
14620 { 14620 {
14621 this.Core.OnMessage(WixErrors.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "After", "Before", "Id")); 14621 this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "After", "Before", "Id"));
14622 } 14622 }
14623 14623
14624 this.Core.ParseForExtensionElements(node); 14624 this.Core.ParseForExtensionElements(node);
@@ -14629,11 +14629,11 @@ namespace WixToolset.Core
14629 // action that is scheduled to occur before/after itself 14629 // action that is scheduled to occur before/after itself
14630 if (beforeAction == actionName) 14630 if (beforeAction == actionName)
14631 { 14631 {
14632 this.Core.OnMessage(WixErrors.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "Before", beforeAction)); 14632 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "Before", beforeAction));
14633 } 14633 }
14634 else if (afterAction == actionName) 14634 else if (afterAction == actionName)
14635 { 14635 {
14636 this.Core.OnMessage(WixErrors.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction)); 14636 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction));
14637 } 14637 }
14638 14638
14639 var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction); 14639 var row = this.Core.CreateRow(sourceLineNumbers, TupleDefinitionType.CustomAction);
@@ -14712,7 +14712,7 @@ namespace WixToolset.Core
14712 14712
14713 if (null == id) 14713 if (null == id)
14714 { 14714 {
14715 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 14715 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
14716 } 14716 }
14717 14717
14718 this.Core.ParseForExtensionElements(node); 14718 this.Core.ParseForExtensionElements(node);
@@ -14767,12 +14767,12 @@ namespace WixToolset.Core
14767 14767
14768 if (null == name) 14768 if (null == name)
14769 { 14769 {
14770 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 14770 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
14771 } 14771 }
14772 14772
14773 if (null == sourceFile) 14773 if (null == sourceFile)
14774 { 14774 {
14775 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 14775 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
14776 } 14776 }
14777 14777
14778 foreach (XElement child in node.Elements()) 14778 foreach (XElement child in node.Elements())
@@ -14785,7 +14785,7 @@ namespace WixToolset.Core
14785 this.ParseSFPCatalogElement(child, ref parentName); 14785 this.ParseSFPCatalogElement(child, ref parentName);
14786 if (null != dependency && parentName == dependency) 14786 if (null != dependency && parentName == dependency)
14787 { 14787 {
14788 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Dependency")); 14788 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Dependency"));
14789 } 14789 }
14790 dependency = parentName; 14790 dependency = parentName;
14791 break; 14791 break;
@@ -14805,7 +14805,7 @@ namespace WixToolset.Core
14805 14805
14806 if (null == dependency) 14806 if (null == dependency)
14807 { 14807 {
14808 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Dependency")); 14808 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Dependency"));
14809 } 14809 }
14810 14810
14811 if (!this.Core.EncounteredError) 14811 if (!this.Core.EncounteredError)
@@ -14916,7 +14916,7 @@ namespace WixToolset.Core
14916 show = 7; 14916 show = 7;
14917 break; 14917 break;
14918 default: 14918 default:
14919 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Show", showValue, "normal", "maximized", "minimized")); 14919 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Show", showValue, "normal", "maximized", "minimized"));
14920 show = CompilerConstants.IllegalInteger; 14920 show = CompilerConstants.IllegalInteger;
14921 break; 14921 break;
14922 } 14922 }
@@ -14941,7 +14941,7 @@ namespace WixToolset.Core
14941 14941
14942 if (advertise && null != target) 14942 if (advertise && null != target)
14943 { 14943 {
14944 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "Advertise", "yes")); 14944 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "Advertise", "yes"));
14945 } 14945 }
14946 14946
14947 if (null == directory) 14947 if (null == directory)
@@ -14952,7 +14952,7 @@ namespace WixToolset.Core
14952 } 14952 }
14953 else 14953 else
14954 { 14954 {
14955 this.Core.OnMessage(WixErrors.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Directory", "Component")); 14955 this.Core.Write(ErrorMessages.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Directory", "Component"));
14956 } 14956 }
14957 } 14957 }
14958 14958
@@ -14960,14 +14960,14 @@ namespace WixToolset.Core
14960 { 14960 {
14961 if (CompilerConstants.IntegerNotSet == descriptionResourceId) 14961 if (CompilerConstants.IntegerNotSet == descriptionResourceId)
14962 { 14962 {
14963 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DescriptionResourceDll", "DescriptionResourceId")); 14963 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DescriptionResourceDll", "DescriptionResourceId"));
14964 } 14964 }
14965 } 14965 }
14966 else 14966 else
14967 { 14967 {
14968 if (CompilerConstants.IntegerNotSet != descriptionResourceId) 14968 if (CompilerConstants.IntegerNotSet != descriptionResourceId)
14969 { 14969 {
14970 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DescriptionResourceId", "DescriptionResourceDll")); 14970 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DescriptionResourceId", "DescriptionResourceDll"));
14971 } 14971 }
14972 } 14972 }
14973 14973
@@ -14975,20 +14975,20 @@ namespace WixToolset.Core
14975 { 14975 {
14976 if (CompilerConstants.IntegerNotSet == displayResourceId) 14976 if (CompilerConstants.IntegerNotSet == displayResourceId)
14977 { 14977 {
14978 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayResourceDll", "DisplayResourceId")); 14978 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayResourceDll", "DisplayResourceId"));
14979 } 14979 }
14980 } 14980 }
14981 else 14981 else
14982 { 14982 {
14983 if (CompilerConstants.IntegerNotSet != displayResourceId) 14983 if (CompilerConstants.IntegerNotSet != displayResourceId)
14984 { 14984 {
14985 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayResourceId", "DisplayResourceDll")); 14985 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DisplayResourceId", "DisplayResourceDll"));
14986 } 14986 }
14987 } 14987 }
14988 14988
14989 if (null == name) 14989 if (null == name)
14990 { 14990 {
14991 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 14991 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
14992 } 14992 }
14993 else if (0 < name.Length) 14993 else if (0 < name.Length)
14994 { 14994 {
@@ -15001,7 +15001,7 @@ namespace WixToolset.Core
15001 } 15001 }
15002 else 15002 else
15003 { 15003 {
15004 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName")); 15004 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
15005 } 15005 }
15006 } 15006 }
15007 else if (null == shortName) // generate a short file name. 15007 else if (null == shortName) // generate a short file name.
@@ -15012,7 +15012,7 @@ namespace WixToolset.Core
15012 15012
15013 if ("Component" != parentElementLocalName && null != target) 15013 if ("Component" != parentElementLocalName && null != target)
15014 { 15014 {
15015 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Target", parentElementLocalName)); 15015 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "Target", parentElementLocalName));
15016 } 15016 }
15017 15017
15018 if (null == id) 15018 if (null == id)
@@ -15053,7 +15053,7 @@ namespace WixToolset.Core
15053 { 15053 {
15054 if (YesNoType.Yes != parentKeyPath && "Component" != parentElementLocalName) 15054 if (YesNoType.Yes != parentKeyPath && "Component" != parentElementLocalName)
15055 { 15055 {
15056 this.Core.OnMessage(WixWarnings.UnclearShortcut(sourceLineNumbers, id.Id, componentId, defaultTarget)); 15056 this.Core.Write(WarningMessages.UnclearShortcut(sourceLineNumbers, id.Id, componentId, defaultTarget));
15057 } 15057 }
15058 row.Set(4, Guid.Empty.ToString("B")); 15058 row.Set(4, Guid.Empty.ToString("B"));
15059 } 15059 }
@@ -15138,7 +15138,7 @@ namespace WixToolset.Core
15138 15138
15139 if (String.IsNullOrEmpty(key)) 15139 if (String.IsNullOrEmpty(key))
15140 { 15140 {
15141 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 15141 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
15142 } 15142 }
15143 else if (null == id) 15143 else if (null == id)
15144 { 15144 {
@@ -15154,13 +15154,13 @@ namespace WixToolset.Core
15154 } 15154 }
15155 else // cannot specify both the value attribute and inner text 15155 else // cannot specify both the value attribute and inner text
15156 { 15156 {
15157 this.Core.OnMessage(WixErrors.IllegalAttributeWithInnerText(sourceLineNumbers, node.Name.LocalName, "Value")); 15157 this.Core.Write(ErrorMessages.IllegalAttributeWithInnerText(sourceLineNumbers, node.Name.LocalName, "Value"));
15158 } 15158 }
15159 } 15159 }
15160 15160
15161 if (String.IsNullOrEmpty(value)) 15161 if (String.IsNullOrEmpty(value))
15162 { 15162 {
15163 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 15163 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
15164 } 15164 }
15165 15165
15166 this.Core.ParseForExtensionElements(node); 15166 this.Core.ParseForExtensionElements(node);
@@ -15265,12 +15265,12 @@ namespace WixToolset.Core
15265 15265
15266 if (null == id) 15266 if (null == id)
15267 { 15267 {
15268 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 15268 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
15269 } 15269 }
15270 15270
15271 if (CompilerConstants.IntegerNotSet == language) 15271 if (CompilerConstants.IntegerNotSet == language)
15272 { 15272 {
15273 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); 15273 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language"));
15274 language = CompilerConstants.IllegalInteger; 15274 language = CompilerConstants.IllegalInteger;
15275 } 15275 }
15276 15276
@@ -15334,29 +15334,29 @@ namespace WixToolset.Core
15334 { 15334 {
15335 if (CompilerConstants.LongNotSet != resourceId) 15335 if (CompilerConstants.LongNotSet != resourceId)
15336 { 15336 {
15337 this.Core.OnMessage(WixErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "ResourceId")); 15337 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "ResourceId"));
15338 } 15338 }
15339 15339
15340 if (0 != flags) 15340 if (0 != flags)
15341 { 15341 {
15342 if (0x1 == (flags & 0x1)) 15342 if (0x1 == (flags & 0x1))
15343 { 15343 {
15344 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Restricted", "Advertise", "yes")); 15344 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Restricted", "Advertise", "yes"));
15345 } 15345 }
15346 15346
15347 if (0x2 == (flags & 0x2)) 15347 if (0x2 == (flags & 0x2))
15348 { 15348 {
15349 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Control", "Advertise", "yes")); 15349 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Control", "Advertise", "yes"));
15350 } 15350 }
15351 15351
15352 if (0x4 == (flags & 0x4)) 15352 if (0x4 == (flags & 0x4))
15353 { 15353 {
15354 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Hidden", "Advertise", "yes")); 15354 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Hidden", "Advertise", "yes"));
15355 } 15355 }
15356 15356
15357 if (0x8 == (flags & 0x8)) 15357 if (0x8 == (flags & 0x8))
15358 { 15358 {
15359 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "HasDiskImage", "Advertise", "yes")); 15359 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "HasDiskImage", "Advertise", "yes"));
15360 } 15360 }
15361 } 15361 }
15362 15362
@@ -15383,17 +15383,17 @@ namespace WixToolset.Core
15383 { 15383 {
15384 if (CompilerConstants.IntegerNotSet != cost && CompilerConstants.IllegalInteger != cost) 15384 if (CompilerConstants.IntegerNotSet != cost && CompilerConstants.IllegalInteger != cost)
15385 { 15385 {
15386 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Cost", "Advertise", "no")); 15386 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Cost", "Advertise", "no"));
15387 } 15387 }
15388 15388
15389 if (null == fileServer) 15389 if (null == fileServer)
15390 { 15390 {
15391 this.Core.OnMessage(WixErrors.MissingTypeLibFile(sourceLineNumbers, node.Name.LocalName, "File")); 15391 this.Core.Write(ErrorMessages.MissingTypeLibFile(sourceLineNumbers, node.Name.LocalName, "File"));
15392 } 15392 }
15393 15393
15394 if (null == registryVersion) 15394 if (null == registryVersion)
15395 { 15395 {
15396 this.Core.OnMessage(WixErrors.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "MajorVersion", "MinorVersion", "Advertise", "no")); 15396 this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "MajorVersion", "MinorVersion", "Advertise", "no"));
15397 } 15397 }
15398 15398
15399 // HKCR\TypeLib\[ID]\[MajorVersion].[MinorVersion], (Default) = [Description] 15399 // HKCR\TypeLib\[ID]\[MajorVersion].[MinorVersion], (Default) = [Description]
@@ -15443,7 +15443,7 @@ namespace WixToolset.Core
15443 case "BinarySource": 15443 case "BinarySource":
15444 if (null != source) 15444 if (null != source)
15445 { 15445 {
15446 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "FileSource", "PropertySource")); 15446 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "FileSource", "PropertySource"));
15447 } 15447 }
15448 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 15448 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
15449 type = MsiInterop.MsidbCustomActionTypeExe + MsiInterop.MsidbCustomActionTypeBinaryData; 15449 type = MsiInterop.MsidbCustomActionTypeExe + MsiInterop.MsidbCustomActionTypeBinaryData;
@@ -15455,7 +15455,7 @@ namespace WixToolset.Core
15455 case "FileSource": 15455 case "FileSource":
15456 if (null != source) 15456 if (null != source)
15457 { 15457 {
15458 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinarySource", "PropertySource")); 15458 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinarySource", "PropertySource"));
15459 } 15459 }
15460 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 15460 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
15461 type = MsiInterop.MsidbCustomActionTypeExe + MsiInterop.MsidbCustomActionTypeSourceFile; 15461 type = MsiInterop.MsidbCustomActionTypeExe + MsiInterop.MsidbCustomActionTypeSourceFile;
@@ -15464,7 +15464,7 @@ namespace WixToolset.Core
15464 case "PropertySource": 15464 case "PropertySource":
15465 if (null != source) 15465 if (null != source)
15466 { 15466 {
15467 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinarySource", "FileSource")); 15467 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinarySource", "FileSource"));
15468 } 15468 }
15469 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 15469 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
15470 type = MsiInterop.MsidbCustomActionTypeExe + MsiInterop.MsidbCustomActionTypeProperty; 15470 type = MsiInterop.MsidbCustomActionTypeExe + MsiInterop.MsidbCustomActionTypeProperty;
@@ -15491,7 +15491,7 @@ namespace WixToolset.Core
15491 15491
15492 if (null == source) 15492 if (null == source)
15493 { 15493 {
15494 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "BinarySource", "FileSource", "PropertySource")); 15494 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "BinarySource", "FileSource", "PropertySource"));
15495 } 15495 }
15496 15496
15497 if (!this.Core.EncounteredError) 15497 if (!this.Core.EncounteredError)
@@ -15556,7 +15556,7 @@ namespace WixToolset.Core
15556 if (0 < embeddedUICount) // there can be only one embedded UI 15556 if (0 < embeddedUICount) // there can be only one embedded UI
15557 { 15557 {
15558 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 15558 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
15559 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 15559 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
15560 } 15560 }
15561 this.ParseEmbeddedUIElement(child); 15561 this.ParseEmbeddedUIElement(child);
15562 ++embeddedUICount; 15562 ++embeddedUICount;
@@ -15582,7 +15582,7 @@ namespace WixToolset.Core
15582 if (RadioButtonType.Bitmap == radioButtonType || RadioButtonType.Icon == radioButtonType) 15582 if (RadioButtonType.Bitmap == radioButtonType || RadioButtonType.Icon == radioButtonType)
15583 { 15583 {
15584 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 15584 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
15585 this.Core.OnMessage(WixErrors.RadioButtonBitmapAndIconDisallowed(childSourceLineNumbers)); 15585 this.Core.Write(ErrorMessages.RadioButtonBitmapAndIconDisallowed(childSourceLineNumbers));
15586 } 15586 }
15587 break; 15587 break;
15588 case "TextStyle": 15588 case "TextStyle":
@@ -15655,7 +15655,7 @@ namespace WixToolset.Core
15655 } 15655 }
15656 else 15656 else
15657 { 15657 {
15658 this.Core.OnMessage(WixErrors.IllegalAttributeExceptOnElement(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "ListView")); 15658 this.Core.Write(ErrorMessages.IllegalAttributeExceptOnElement(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "ListView"));
15659 } 15659 }
15660 break; 15660 break;
15661 case "Text": 15661 case "Text":
@@ -15677,7 +15677,7 @@ namespace WixToolset.Core
15677 15677
15678 if (null == value) 15678 if (null == value)
15679 { 15679 {
15680 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 15680 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
15681 } 15681 }
15682 15682
15683 this.Core.ParseForExtensionElements(node); 15683 this.Core.ParseForExtensionElements(node);
@@ -15725,7 +15725,7 @@ namespace WixToolset.Core
15725 case "Bitmap": 15725 case "Bitmap":
15726 if (RadioButtonType.NotSet != type) 15726 if (RadioButtonType.NotSet != type)
15727 { 15727 {
15728 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Icon", "Text")); 15728 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Icon", "Text"));
15729 } 15729 }
15730 text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 15730 text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
15731 this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", text); 15731 this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", text);
@@ -15740,7 +15740,7 @@ namespace WixToolset.Core
15740 case "Icon": 15740 case "Icon":
15741 if (RadioButtonType.NotSet != type) 15741 if (RadioButtonType.NotSet != type)
15742 { 15742 {
15743 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Text")); 15743 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Text"));
15744 } 15744 }
15745 text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 15745 text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
15746 this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", text); 15746 this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", text);
@@ -15749,7 +15749,7 @@ namespace WixToolset.Core
15749 case "Text": 15749 case "Text":
15750 if (RadioButtonType.NotSet != type) 15750 if (RadioButtonType.NotSet != type)
15751 { 15751 {
15752 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Icon")); 15752 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Icon"));
15753 } 15753 }
15754 text = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 15754 text = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
15755 type = RadioButtonType.Text; 15755 type = RadioButtonType.Text;
@@ -15782,27 +15782,27 @@ namespace WixToolset.Core
15782 15782
15783 if (null == value) 15783 if (null == value)
15784 { 15784 {
15785 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 15785 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
15786 } 15786 }
15787 15787
15788 if (null == x) 15788 if (null == x)
15789 { 15789 {
15790 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "X")); 15790 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "X"));
15791 } 15791 }
15792 15792
15793 if (null == y) 15793 if (null == y)
15794 { 15794 {
15795 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Y")); 15795 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Y"));
15796 } 15796 }
15797 15797
15798 if (null == width) 15798 if (null == width)
15799 { 15799 {
15800 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Width")); 15800 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Width"));
15801 } 15801 }
15802 15802
15803 if (null == height) 15803 if (null == height)
15804 { 15804 {
15805 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Height")); 15805 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Height"));
15806 } 15806 }
15807 15807
15808 this.Core.ParseForExtensionElements(node); 15808 this.Core.ParseForExtensionElements(node);
@@ -15860,7 +15860,7 @@ namespace WixToolset.Core
15860 15860
15861 if (null == action) 15861 if (null == action)
15862 { 15862 {
15863 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 15863 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
15864 } 15864 }
15865 15865
15866 foreach (XElement child in node.Elements()) 15866 foreach (XElement child in node.Elements())
@@ -15996,7 +15996,7 @@ namespace WixToolset.Core
15996 15996
15997 if (null == property) 15997 if (null == property)
15998 { 15998 {
15999 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property")); 15999 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
16000 } 16000 }
16001 16001
16002 foreach (XElement child in node.Elements()) 16002 foreach (XElement child in node.Elements())
@@ -16064,7 +16064,7 @@ namespace WixToolset.Core
16064 16064
16065 if (null == property) 16065 if (null == property)
16066 { 16066 {
16067 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property")); 16067 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
16068 } 16068 }
16069 16069
16070 foreach (XElement child in node.Elements()) 16070 foreach (XElement child in node.Elements())
@@ -16082,7 +16082,7 @@ namespace WixToolset.Core
16082 else if (groupType != type) 16082 else if (groupType != type)
16083 { 16083 {
16084 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 16084 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
16085 this.Core.OnMessage(WixErrors.RadioButtonTypeInconsistent(childSourceLineNumbers)); 16085 this.Core.Write(ErrorMessages.RadioButtonTypeInconsistent(childSourceLineNumbers));
16086 } 16086 }
16087 break; 16087 break;
16088 default: 16088 default:
@@ -16135,7 +16135,7 @@ namespace WixToolset.Core
16135 16135
16136 if (null == action) 16136 if (null == action)
16137 { 16137 {
16138 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action")); 16138 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Action"));
16139 } 16139 }
16140 16140
16141 this.Core.ParseForExtensionElements(node); 16141 this.Core.ParseForExtensionElements(node);
@@ -16314,7 +16314,7 @@ namespace WixToolset.Core
16314 16314
16315 if (null == faceName) 16315 if (null == faceName)
16316 { 16316 {
16317 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "FaceName")); 16317 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "FaceName"));
16318 } 16318 }
16319 16319
16320 this.Core.ParseForExtensionElements(node); 16320 this.Core.ParseForExtensionElements(node);
@@ -16458,7 +16458,7 @@ namespace WixToolset.Core
16458 16458
16459 if (null == id) 16459 if (null == id)
16460 { 16460 {
16461 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 16461 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
16462 id = Identifier.Invalid; 16462 id = Identifier.Invalid;
16463 } 16463 }
16464 16464
@@ -16498,7 +16498,7 @@ namespace WixToolset.Core
16498 16498
16499 if (null == firstControl) 16499 if (null == firstControl)
16500 { 16500 {
16501 this.Core.OnMessage(WixErrors.NoFirstControlSpecified(sourceLineNumbers, id.Id)); 16501 this.Core.Write(ErrorMessages.NoFirstControlSpecified(sourceLineNumbers, id.Id));
16502 } 16502 }
16503 16503
16504 if (!this.Core.EncounteredError) 16504 if (!this.Core.EncounteredError)
@@ -16676,14 +16676,14 @@ namespace WixToolset.Core
16676 16676
16677 if (String.IsNullOrEmpty(sourceFile)) 16677 if (String.IsNullOrEmpty(sourceFile))
16678 { 16678 {
16679 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 16679 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
16680 } 16680 }
16681 else if (String.IsNullOrEmpty(name)) 16681 else if (String.IsNullOrEmpty(name))
16682 { 16682 {
16683 name = Path.GetFileName(sourceFile); 16683 name = Path.GetFileName(sourceFile);
16684 if (!this.Core.IsValidLongFilename(name, false)) 16684 if (!this.Core.IsValidLongFilename(name, false))
16685 { 16685 {
16686 this.Core.OnMessage(WixErrors.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name)); 16686 this.Core.Write(ErrorMessages.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name));
16687 } 16687 }
16688 } 16688 }
16689 16689
@@ -16696,11 +16696,11 @@ namespace WixToolset.Core
16696 16696
16697 if (null == id) 16697 if (null == id)
16698 { 16698 {
16699 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 16699 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
16700 } 16700 }
16701 else if (!Common.IsIdentifier(id.Id)) 16701 else if (!Common.IsIdentifier(id.Id))
16702 { 16702 {
16703 this.Core.OnMessage(WixErrors.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id)); 16703 this.Core.Write(ErrorMessages.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
16704 } 16704 }
16705 } 16705 }
16706 else if (String.IsNullOrEmpty(name)) 16706 else if (String.IsNullOrEmpty(name))
@@ -16710,7 +16710,7 @@ namespace WixToolset.Core
16710 16710
16711 if (!name.Contains(".")) 16711 if (!name.Contains("."))
16712 { 16712 {
16713 this.Core.OnMessage(WixErrors.InvalidEmbeddedUIFileName(sourceLineNumbers, name)); 16713 this.Core.Write(ErrorMessages.InvalidEmbeddedUIFileName(sourceLineNumbers, name));
16714 } 16714 }
16715 16715
16716 foreach (XElement child in node.Elements()) 16716 foreach (XElement child in node.Elements())
@@ -16783,14 +16783,14 @@ namespace WixToolset.Core
16783 16783
16784 if (String.IsNullOrEmpty(sourceFile)) 16784 if (String.IsNullOrEmpty(sourceFile))
16785 { 16785 {
16786 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 16786 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
16787 } 16787 }
16788 else if (String.IsNullOrEmpty(name)) 16788 else if (String.IsNullOrEmpty(name))
16789 { 16789 {
16790 name = Path.GetFileName(sourceFile); 16790 name = Path.GetFileName(sourceFile);
16791 if (!this.Core.IsValidLongFilename(name, false)) 16791 if (!this.Core.IsValidLongFilename(name, false))
16792 { 16792 {
16793 this.Core.OnMessage(WixErrors.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name)); 16793 this.Core.Write(ErrorMessages.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Source", name));
16794 } 16794 }
16795 } 16795 }
16796 16796
@@ -16803,11 +16803,11 @@ namespace WixToolset.Core
16803 16803
16804 if (null == id) 16804 if (null == id)
16805 { 16805 {
16806 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 16806 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
16807 } 16807 }
16808 else if (!Common.IsIdentifier(id.Id)) 16808 else if (!Common.IsIdentifier(id.Id))
16809 { 16809 {
16810 this.Core.OnMessage(WixErrors.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id)); 16810 this.Core.Write(ErrorMessages.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
16811 } 16811 }
16812 } 16812 }
16813 else if (String.IsNullOrEmpty(name)) 16813 else if (String.IsNullOrEmpty(name))
@@ -16868,7 +16868,7 @@ namespace WixToolset.Core
16868 XAttribute typeAttribute = node.Attribute("Type"); 16868 XAttribute typeAttribute = node.Attribute("Type");
16869 if (null == typeAttribute) 16869 if (null == typeAttribute)
16870 { 16870 {
16871 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type")); 16871 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
16872 } 16872 }
16873 else 16873 else
16874 { 16874 {
@@ -17016,14 +17016,14 @@ namespace WixToolset.Core
17016 this.Core.TrySetBitFromName(specialAttributes, "Icon32", YesNoType.Yes, bits, 16); 17016 this.Core.TrySetBitFromName(specialAttributes, "Icon32", YesNoType.Yes, bits, 16);
17017 break; 17017 break;
17018 default: 17018 default:
17019 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, iconSizeValue, "16", "32", "48")); 17019 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, iconSizeValue, "16", "32", "48"));
17020 break; 17020 break;
17021 } 17021 }
17022 } 17022 }
17023 } 17023 }
17024 else 17024 else
17025 { 17025 {
17026 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, iconSizeValue, "Type")); 17026 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, iconSizeValue, "Type"));
17027 } 17027 }
17028 break; 17028 break;
17029 case "Property": 17029 case "Property":
@@ -17074,22 +17074,22 @@ namespace WixToolset.Core
17074 17074
17075 if (null == height) 17075 if (null == height)
17076 { 17076 {
17077 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Height")); 17077 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Height"));
17078 } 17078 }
17079 17079
17080 if (null == width) 17080 if (null == width)
17081 { 17081 {
17082 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Width")); 17082 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Width"));
17083 } 17083 }
17084 17084
17085 if (null == x) 17085 if (null == x)
17086 { 17086 {
17087 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "X")); 17087 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "X"));
17088 } 17088 }
17089 17089
17090 if (null == y) 17090 if (null == y)
17091 { 17091 {
17092 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Y")); 17092 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Y"));
17093 } 17093 }
17094 17094
17095 if (null == id) 17095 if (null == id)
@@ -17165,7 +17165,7 @@ namespace WixToolset.Core
17165 text = Common.GetInnerText(child); 17165 text = Common.GetInnerText(child);
17166 if (!String.IsNullOrEmpty(text) && null != sourceFile) 17166 if (!String.IsNullOrEmpty(text) && null != sourceFile)
17167 { 17167 {
17168 this.Core.OnMessage(WixErrors.IllegalAttributeWithInnerText(childSourceLineNumbers, child.Name.LocalName, "SourceFile")); 17168 this.Core.Write(ErrorMessages.IllegalAttributeWithInnerText(childSourceLineNumbers, child.Name.LocalName, "SourceFile"));
17169 } 17169 }
17170 break; 17170 break;
17171 default: 17171 default:
@@ -17211,11 +17211,11 @@ namespace WixToolset.Core
17211 { 17211 {
17212 if (String.IsNullOrEmpty(property) && String.IsNullOrEmpty(checkBoxPropertyRef)) 17212 if (String.IsNullOrEmpty(property) && String.IsNullOrEmpty(checkBoxPropertyRef))
17213 { 17213 {
17214 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "CheckBoxPropertyRef", true)); 17214 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "CheckBoxPropertyRef", true));
17215 } 17215 }
17216 else if (!String.IsNullOrEmpty(property) && !String.IsNullOrEmpty(checkBoxPropertyRef)) 17216 else if (!String.IsNullOrEmpty(property) && !String.IsNullOrEmpty(checkBoxPropertyRef))
17217 { 17217 {
17218 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "CheckBoxPropertyRef")); 17218 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Property", "CheckBoxPropertyRef"));
17219 } 17219 }
17220 else if (!String.IsNullOrEmpty(property)) 17220 else if (!String.IsNullOrEmpty(property))
17221 { 17221 {
@@ -17272,7 +17272,7 @@ namespace WixToolset.Core
17272 { 17272 {
17273 if (TupleDefinitionType.BBControl == tableName) 17273 if (TupleDefinitionType.BBControl == tableName)
17274 { 17274 {
17275 this.Core.OnMessage(WixErrors.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType)); 17275 this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType));
17276 } 17276 }
17277 17277
17278 if (null == firstControl) 17278 if (null == firstControl)
@@ -17322,14 +17322,14 @@ namespace WixToolset.Core
17322 case "Control": 17322 case "Control":
17323 if (null != control) 17323 if (null != control)
17324 { 17324 {
17325 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); 17325 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
17326 } 17326 }
17327 control = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 17327 control = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
17328 break; 17328 break;
17329 case "Dialog": 17329 case "Dialog":
17330 if (null != dialog) 17330 if (null != dialog)
17331 { 17331 {
17332 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); 17332 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
17333 } 17333 }
17334 dialog = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 17334 dialog = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
17335 this.Core.CreateSimpleReference(sourceLineNumbers, "Dialog", dialog); 17335 this.Core.CreateSimpleReference(sourceLineNumbers, "Dialog", dialog);
@@ -17361,28 +17361,28 @@ namespace WixToolset.Core
17361 17361
17362 if (null == control) 17362 if (null == control)
17363 { 17363 {
17364 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Control")); 17364 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Control"));
17365 } 17365 }
17366 17366
17367 if (null == dialog) 17367 if (null == dialog)
17368 { 17368 {
17369 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Dialog")); 17369 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Dialog"));
17370 } 17370 }
17371 17371
17372 if (null == controlEvent && null == property) // need to specify at least one 17372 if (null == controlEvent && null == property) // need to specify at least one
17373 { 17373 {
17374 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Event", "Property")); 17374 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Event", "Property"));
17375 } 17375 }
17376 else if (null != controlEvent && null != property) // cannot specify both 17376 else if (null != controlEvent && null != property) // cannot specify both
17377 { 17377 {
17378 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Event", "Property")); 17378 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Event", "Property"));
17379 } 17379 }
17380 17380
17381 if (null == argument) 17381 if (null == argument)
17382 { 17382 {
17383 if (null != controlEvent) 17383 if (null != controlEvent)
17384 { 17384 {
17385 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Event")); 17385 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Event"));
17386 } 17386 }
17387 else if (null != property) 17387 else if (null != property)
17388 { 17388 {
@@ -17499,7 +17499,7 @@ namespace WixToolset.Core
17499 17499
17500 if (null == id) 17500 if (null == id)
17501 { 17501 {
17502 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 17502 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
17503 } 17503 }
17504 17504
17505 // process the UpgradeVersion children here 17505 // process the UpgradeVersion children here
@@ -17513,7 +17513,7 @@ namespace WixToolset.Core
17513 { 17513 {
17514 case "Property": 17514 case "Property":
17515 this.ParsePropertyElement(child); 17515 this.ParsePropertyElement(child);
17516 this.Core.OnMessage(WixWarnings.DeprecatedUpgradeProperty(childSourceLineNumbers)); 17516 this.Core.Write(WarningMessages.DeprecatedUpgradeProperty(childSourceLineNumbers));
17517 break; 17517 break;
17518 case "UpgradeVersion": 17518 case "UpgradeVersion":
17519 this.ParseUpgradeVersionElement(child, id); 17519 this.ParseUpgradeVersionElement(child, id);
@@ -17618,16 +17618,16 @@ namespace WixToolset.Core
17618 17618
17619 if (null == actionProperty) 17619 if (null == actionProperty)
17620 { 17620 {
17621 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property")); 17621 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Property"));
17622 } 17622 }
17623 else if (actionProperty.ToUpper(CultureInfo.InvariantCulture) != actionProperty) 17623 else if (actionProperty.ToUpper(CultureInfo.InvariantCulture) != actionProperty)
17624 { 17624 {
17625 this.Core.OnMessage(WixErrors.SecurePropertyNotUppercase(sourceLineNumbers, node.Name.LocalName, "Property", actionProperty)); 17625 this.Core.Write(ErrorMessages.SecurePropertyNotUppercase(sourceLineNumbers, node.Name.LocalName, "Property", actionProperty));
17626 } 17626 }
17627 17627
17628 if (null == minimum && null == maximum) 17628 if (null == minimum && null == maximum)
17629 { 17629 {
17630 this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Minimum", "Maximum")); 17630 this.Core.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "Minimum", "Maximum"));
17631 } 17631 }
17632 17632
17633 this.Core.ParseForExtensionElements(node); 17633 this.Core.ParseForExtensionElements(node);
@@ -17694,7 +17694,7 @@ namespace WixToolset.Core
17694 break; 17694 break;
17695 case "Target": 17695 case "Target":
17696 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 17696 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
17697 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "TargetFile", "TargetProperty")); 17697 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "TargetFile", "TargetProperty"));
17698 break; 17698 break;
17699 case "TargetFile": 17699 case "TargetFile":
17700 targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 17700 targetFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -17716,22 +17716,22 @@ namespace WixToolset.Core
17716 17716
17717 if (null == id) 17717 if (null == id)
17718 { 17718 {
17719 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 17719 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
17720 } 17720 }
17721 17721
17722 if (null != target && null != targetFile) 17722 if (null != target && null != targetFile)
17723 { 17723 {
17724 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetFile")); 17724 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetFile"));
17725 } 17725 }
17726 17726
17727 if (null != target && null != targetProperty) 17727 if (null != target && null != targetProperty)
17728 { 17728 {
17729 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetProperty")); 17729 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetProperty"));
17730 } 17730 }
17731 17731
17732 if (null != targetFile && null != targetProperty) 17732 if (null != targetFile && null != targetProperty)
17733 { 17733 {
17734 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty")); 17734 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty"));
17735 } 17735 }
17736 17736
17737 this.Core.ParseForExtensionElements(node); 17737 this.Core.ParseForExtensionElements(node);
@@ -17740,17 +17740,17 @@ namespace WixToolset.Core
17740 { 17740 {
17741 if (null != target) 17741 if (null != target)
17742 { 17742 {
17743 this.Core.OnMessage(WixErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Target")); 17743 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Target"));
17744 } 17744 }
17745 17745
17746 if (null != targetFile) 17746 if (null != targetFile)
17747 { 17747 {
17748 this.Core.OnMessage(WixErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile")); 17748 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile"));
17749 } 17749 }
17750 17750
17751 if (null != targetProperty) 17751 if (null != targetProperty)
17752 { 17752 {
17753 this.Core.OnMessage(WixErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetProperty")); 17753 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetProperty"));
17754 } 17754 }
17755 17755
17756 if (!this.Core.EncounteredError) 17756 if (!this.Core.EncounteredError)
@@ -17770,12 +17770,12 @@ namespace WixToolset.Core
17770 { 17770 {
17771 if (CompilerConstants.IntegerNotSet != sequence) 17771 if (CompilerConstants.IntegerNotSet != sequence)
17772 { 17772 {
17773 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Sequence", "Advertise", "no")); 17773 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Sequence", "Advertise", "no"));
17774 } 17774 }
17775 17775
17776 if (null == target && null == targetFile && null == targetProperty) 17776 if (null == target && null == targetFile && null == targetProperty)
17777 { 17777 {
17778 this.Core.OnMessage(WixErrors.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty", "Advertise", "no")); 17778 this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFile", "TargetProperty", "Advertise", "no"));
17779 } 17779 }
17780 17780
17781 if (null == target) 17781 if (null == target)
@@ -17851,12 +17851,12 @@ namespace WixToolset.Core
17851 17851
17852 if (null == id) 17852 if (null == id)
17853 { 17853 {
17854 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 17854 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
17855 } 17855 }
17856 17856
17857 if (null == key) 17857 if (null == key)
17858 { 17858 {
17859 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key")); 17859 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
17860 } 17860 }
17861 17861
17862 BundleApprovedExeForElevationAttributes attributes = BundleApprovedExeForElevationAttributes.None; 17862 BundleApprovedExeForElevationAttributes attributes = BundleApprovedExeForElevationAttributes.None;
@@ -17938,7 +17938,7 @@ namespace WixToolset.Core
17938 disableModify = 0; 17938 disableModify = 0;
17939 break; 17939 break;
17940 default: 17940 default:
17941 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, value, "button", "yes", "no")); 17941 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, value, "button", "yes", "no"));
17942 break; 17942 break;
17943 } 17943 }
17944 break; 17944 break;
@@ -17946,7 +17946,7 @@ namespace WixToolset.Core
17946 disableRemove = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 17946 disableRemove = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
17947 break; 17947 break;
17948 case "DisableRepair": 17948 case "DisableRepair":
17949 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 17949 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
17950 break; 17950 break;
17951 case "HelpTelephone": 17951 case "HelpTelephone":
17952 helpTelephone = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 17952 helpTelephone = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -17990,16 +17990,16 @@ namespace WixToolset.Core
17990 17990
17991 if (String.IsNullOrEmpty(version)) 17991 if (String.IsNullOrEmpty(version))
17992 { 17992 {
17993 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version")); 17993 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
17994 } 17994 }
17995 else if (!CompilerCore.IsValidModuleOrBundleVersion(version)) 17995 else if (!CompilerCore.IsValidModuleOrBundleVersion(version))
17996 { 17996 {
17997 this.Core.OnMessage(WixWarnings.InvalidModuleOrBundleVersion(sourceLineNumbers, "Bundle", version)); 17997 this.Core.Write(WarningMessages.InvalidModuleOrBundleVersion(sourceLineNumbers, "Bundle", version));
17998 } 17998 }
17999 17999
18000 if (String.IsNullOrEmpty(upgradeCode)) 18000 if (String.IsNullOrEmpty(upgradeCode))
18001 { 18001 {
18002 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "UpgradeCode")); 18002 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "UpgradeCode"));
18003 } 18003 }
18004 18004
18005 if (String.IsNullOrEmpty(copyright)) 18005 if (String.IsNullOrEmpty(copyright))
@@ -18054,7 +18054,7 @@ namespace WixToolset.Core
18054 if (baSeen) 18054 if (baSeen)
18055 { 18055 {
18056 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 18056 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
18057 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "BootstrapperApplication")); 18057 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "BootstrapperApplication"));
18058 } 18058 }
18059 this.ParseBootstrapperApplicationElement(child); 18059 this.ParseBootstrapperApplicationElement(child);
18060 baSeen = true; 18060 baSeen = true;
@@ -18072,7 +18072,7 @@ namespace WixToolset.Core
18072 if (chainSeen) 18072 if (chainSeen)
18073 { 18073 {
18074 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 18074 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
18075 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Chain")); 18075 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Chain"));
18076 } 18076 }
18077 this.ParseChainElement(child); 18077 this.ParseChainElement(child);
18078 chainSeen = true; 18078 chainSeen = true;
@@ -18087,7 +18087,7 @@ namespace WixToolset.Core
18087 if (logSeen) 18087 if (logSeen)
18088 { 18088 {
18089 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 18089 SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
18090 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Log")); 18090 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Log"));
18091 } 18091 }
18092 logVariablePrefixAndExtension = this.ParseLogElement(child, fileSystemSafeBundleName); 18092 logVariablePrefixAndExtension = this.ParseLogElement(child, fileSystemSafeBundleName);
18093 logSeen = true; 18093 logSeen = true;
@@ -18124,7 +18124,7 @@ namespace WixToolset.Core
18124 18124
18125 if (!chainSeen) 18125 if (!chainSeen)
18126 { 18126 {
18127 this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "Chain")); 18127 this.Core.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "Chain"));
18128 } 18128 }
18129 18129
18130 if (!this.Core.EncounteredError) 18130 if (!this.Core.EncounteredError)
@@ -18278,12 +18278,12 @@ namespace WixToolset.Core
18278 18278
18279 if (null == id) 18279 if (null == id)
18280 { 18280 {
18281 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 18281 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
18282 } 18282 }
18283 18283
18284 if (null == sourceFile) 18284 if (null == sourceFile)
18285 { 18285 {
18286 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile")); 18286 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SourceFile"));
18287 } 18287 }
18288 18288
18289 this.Core.ParseForExtensionElements(node); 18289 this.Core.ParseForExtensionElements(node);
@@ -18329,7 +18329,7 @@ namespace WixToolset.Core
18329 string typeString = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 18329 string typeString = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
18330 if (!Enum.TryParse<ContainerType>(typeString, out type)) 18330 if (!Enum.TryParse<ContainerType>(typeString, out type))
18331 { 18331 {
18332 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithLegalList(sourceLineNumbers, node.Name.LocalName, "Type", typeString, "attached, detached")); 18332 this.Core.Write(ErrorMessages.IllegalAttributeValueWithLegalList(sourceLineNumbers, node.Name.LocalName, "Type", typeString, "attached, detached"));
18333 } 18333 }
18334 break; 18334 break;
18335 default: 18335 default:
@@ -18352,12 +18352,12 @@ namespace WixToolset.Core
18352 18352
18353 if (null == id) 18353 if (null == id)
18354 { 18354 {
18355 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 18355 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
18356 id = Identifier.Invalid; 18356 id = Identifier.Invalid;
18357 } 18357 }
18358 else if (!Common.IsIdentifier(id.Id)) 18358 else if (!Common.IsIdentifier(id.Id))
18359 { 18359 {
18360 this.Core.OnMessage(WixErrors.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id)); 18360 this.Core.Write(ErrorMessages.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
18361 } 18361 }
18362 } 18362 }
18363 else if (null == name) 18363 else if (null == name)
@@ -18367,7 +18367,7 @@ namespace WixToolset.Core
18367 18367
18368 if (!String.IsNullOrEmpty(downloadUrl) && ContainerType.Detached != type) 18368 if (!String.IsNullOrEmpty(downloadUrl) && ContainerType.Detached != type)
18369 { 18369 {
18370 this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DownloadUrl", "Type", "attached")); 18370 this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DownloadUrl", "Type", "attached"));
18371 } 18371 }
18372 18372
18373 foreach (XElement child in node.Elements()) 18373 foreach (XElement child in node.Elements())
@@ -18449,7 +18449,7 @@ namespace WixToolset.Core
18449 // We need *either* <Payload> or <PayloadGroupRef> or even just @SourceFile on the BA... 18449 // We need *either* <Payload> or <PayloadGroupRef> or even just @SourceFile on the BA...
18450 // but we just say there's a missing <Payload>. 18450 // but we just say there's a missing <Payload>.
18451 // TODO: Is there a better message for this? 18451 // TODO: Is there a better message for this?
18452 this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "Payload")); 18452 this.Core.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "Payload"));
18453 } 18453 }
18454 18454
18455 // Add the application as an attached container and if an Id was provided add that too. 18455 // Add the application as an attached container and if an Id was provided add that too.
@@ -18527,7 +18527,7 @@ namespace WixToolset.Core
18527 18527
18528 if (String.IsNullOrEmpty(id)) 18528 if (String.IsNullOrEmpty(id))
18529 { 18529 {
18530 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 18530 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
18531 } 18531 }
18532 else 18532 else
18533 { 18533 {
@@ -18593,7 +18593,7 @@ namespace WixToolset.Core
18593 } 18593 }
18594 else 18594 else
18595 { 18595 {
18596 this.Core.OnMessage(WixErrors.ExpectedAttributeInElementOrParent(sourceLineNumbers, node.Name.LocalName, "Manufacturer", node.Parent.Name.LocalName)); 18596 this.Core.Write(ErrorMessages.ExpectedAttributeInElementOrParent(sourceLineNumbers, node.Name.LocalName, "Manufacturer", node.Parent.Name.LocalName));
18597 } 18597 }
18598 } 18598 }
18599 18599
@@ -18613,13 +18613,13 @@ namespace WixToolset.Core
18613 } 18613 }
18614 else 18614 else
18615 { 18615 {
18616 this.Core.OnMessage(WixErrors.ExpectedAttributeInElementOrParent(sourceLineNumbers, node.Name.LocalName, "Name", node.Parent.Name.LocalName)); 18616 this.Core.Write(ErrorMessages.ExpectedAttributeInElementOrParent(sourceLineNumbers, node.Name.LocalName, "Name", node.Parent.Name.LocalName));
18617 } 18617 }
18618 } 18618 }
18619 18619
18620 if (String.IsNullOrEmpty(classification)) 18620 if (String.IsNullOrEmpty(classification))
18621 { 18621 {
18622 this.Core.OnMessage(WixErrors.IllegalEmptyAttributeValue(sourceLineNumbers, node.Name.LocalName, "Classification", defaultClassification)); 18622 this.Core.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, node.Name.LocalName, "Classification", defaultClassification));
18623 } 18623 }
18624 18624
18625 this.Core.ParseForExtensionElements(node); 18625 this.Core.ParseForExtensionElements(node);
@@ -18755,13 +18755,13 @@ namespace WixToolset.Core
18755 18755
18756 if (CompilerCore.WixNamespace == node.Name.Namespace && node.Name.LocalName != "ExePackage") 18756 if (CompilerCore.WixNamespace == node.Name.Namespace && node.Name.LocalName != "ExePackage")
18757 { 18757 {
18758 this.Core.OnMessage(WixErrors.RemotePayloadUnsupported(childSourceLineNumbers)); 18758 this.Core.Write(ErrorMessages.RemotePayloadUnsupported(childSourceLineNumbers));
18759 continue; 18759 continue;
18760 } 18760 }
18761 18761
18762 if (null != remotePayload) 18762 if (null != remotePayload)
18763 { 18763 {
18764 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 18764 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
18765 } 18765 }
18766 18766
18767 remotePayload = this.ParseRemotePayloadElement(child); 18767 remotePayload = this.ParseRemotePayloadElement(child);
@@ -18769,11 +18769,11 @@ namespace WixToolset.Core
18769 18769
18770 if (null != sourceFile && null != remotePayload) 18770 if (null != sourceFile && null != remotePayload)
18771 { 18771 {
18772 this.Core.OnMessage(WixErrors.UnexpectedElementWithAttribute(sourceLineNumbers, node.Name.LocalName, "RemotePayload", "SourceFile")); 18772 this.Core.Write(ErrorMessages.UnexpectedElementWithAttribute(sourceLineNumbers, node.Name.LocalName, "RemotePayload", "SourceFile"));
18773 } 18773 }
18774 else if (null == sourceFile && null == remotePayload) 18774 else if (null == sourceFile && null == remotePayload)
18775 { 18775 {
18776 this.Core.OnMessage(WixErrors.ExpectedAttributeOrElement(sourceLineNumbers, node.Name.LocalName, "SourceFile", "RemotePayload")); 18776 this.Core.Write(ErrorMessages.ExpectedAttributeOrElement(sourceLineNumbers, node.Name.LocalName, "SourceFile", "RemotePayload"));
18777 } 18777 }
18778 else if (null == sourceFile) 18778 else if (null == sourceFile)
18779 { 18779 {
@@ -18782,14 +18782,14 @@ namespace WixToolset.Core
18782 18782
18783 if (null == downloadUrl && null != remotePayload) 18783 if (null == downloadUrl && null != remotePayload)
18784 { 18784 {
18785 this.Core.OnMessage(WixErrors.ExpectedAttributeWithElement(sourceLineNumbers, node.Name.LocalName, "DownloadUrl", "RemotePayload")); 18785 this.Core.Write(ErrorMessages.ExpectedAttributeWithElement(sourceLineNumbers, node.Name.LocalName, "DownloadUrl", "RemotePayload"));
18786 } 18786 }
18787 18787
18788 if (Compiler.BurnUXContainerId == parentId) 18788 if (Compiler.BurnUXContainerId == parentId)
18789 { 18789 {
18790 if (compressed == YesNoDefaultType.No) 18790 if (compressed == YesNoDefaultType.No)
18791 { 18791 {
18792 Core.OnMessage(WixWarnings.UxPayloadsOnlySupportEmbedding(sourceLineNumbers, sourceFile)); 18792 Core.Write(WarningMessages.UxPayloadsOnlySupportEmbedding(sourceLineNumbers, sourceFile));
18793 } 18793 }
18794 18794
18795 compressed = YesNoDefaultType.Yes; 18795 compressed = YesNoDefaultType.Yes;
@@ -18845,27 +18845,27 @@ namespace WixToolset.Core
18845 18845
18846 if (String.IsNullOrEmpty(remotePayload.ProductName)) 18846 if (String.IsNullOrEmpty(remotePayload.ProductName))
18847 { 18847 {
18848 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProductName")); 18848 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProductName"));
18849 } 18849 }
18850 18850
18851 if (String.IsNullOrEmpty(remotePayload.Description)) 18851 if (String.IsNullOrEmpty(remotePayload.Description))
18852 { 18852 {
18853 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); 18853 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description"));
18854 } 18854 }
18855 18855
18856 if (String.IsNullOrEmpty(remotePayload.Hash)) 18856 if (String.IsNullOrEmpty(remotePayload.Hash))
18857 { 18857 {
18858 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Hash")); 18858 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Hash"));
18859 } 18859 }
18860 18860
18861 if (0 == remotePayload.Size) 18861 if (0 == remotePayload.Size)
18862 { 18862 {
18863 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Size")); 18863 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Size"));
18864 } 18864 }
18865 18865
18866 if (String.IsNullOrEmpty(remotePayload.Version)) 18866 if (String.IsNullOrEmpty(remotePayload.Version))
18867 { 18867 {
18868 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version")); 18868 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
18869 } 18869 }
18870 18870
18871 return remotePayload; 18871 return remotePayload;
@@ -18947,7 +18947,7 @@ namespace WixToolset.Core
18947 18947
18948 if (null == id) 18948 if (null == id)
18949 { 18949 {
18950 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 18950 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
18951 id = Identifier.Invalid; 18951 id = Identifier.Invalid;
18952 } 18952 }
18953 18953
@@ -19024,7 +19024,7 @@ namespace WixToolset.Core
19024 19024
19025 if (null == id) 19025 if (null == id)
19026 { 19026 {
19027 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 19027 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
19028 } 19028 }
19029 19029
19030 this.Core.ParseForExtensionElements(node); 19030 this.Core.ParseForExtensionElements(node);
@@ -19084,7 +19084,7 @@ namespace WixToolset.Core
19084 string behaviorString = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 19084 string behaviorString = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
19085 if (!Enum.TryParse<ExitCodeBehaviorType>(behaviorString, true, out behavior)) 19085 if (!Enum.TryParse<ExitCodeBehaviorType>(behaviorString, true, out behavior))
19086 { 19086 {
19087 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithLegalList(sourceLineNumbers, node.Name.LocalName, "Behavior", behaviorString, "success, error, scheduleReboot, forceReboot")); 19087 this.Core.Write(ErrorMessages.IllegalAttributeValueWithLegalList(sourceLineNumbers, node.Name.LocalName, "Behavior", behaviorString, "success, error, scheduleReboot, forceReboot"));
19088 } 19088 }
19089 break; 19089 break;
19090 default: 19090 default:
@@ -19100,7 +19100,7 @@ namespace WixToolset.Core
19100 19100
19101 if (ExitCodeBehaviorType.NotSet == behavior) 19101 if (ExitCodeBehaviorType.NotSet == behavior)
19102 { 19102 {
19103 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Behavior")); 19103 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Behavior"));
19104 } 19104 }
19105 19105
19106 this.Core.ParseForExtensionElements(node); 19106 this.Core.ParseForExtensionElements(node);
@@ -19208,7 +19208,7 @@ namespace WixToolset.Core
19208 19208
19209 if (null == previousId) 19209 if (null == previousId)
19210 { 19210 {
19211 this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "MsiPackage", "ExePackage", "PackageGroupRef")); 19211 this.Core.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "MsiPackage", "ExePackage", "PackageGroupRef"));
19212 } 19212 }
19213 19213
19214 if (!this.Core.EncounteredError) 19214 if (!this.Core.EncounteredError)
@@ -19339,12 +19339,12 @@ namespace WixToolset.Core
19339 19339
19340 if (null == id) 19340 if (null == id)
19341 { 19341 {
19342 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 19342 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
19343 id = Identifier.Invalid; 19343 id = Identifier.Invalid;
19344 } 19344 }
19345 else if (!Common.IsIdentifier(id.Id)) 19345 else if (!Common.IsIdentifier(id.Id))
19346 { 19346 {
19347 this.Core.OnMessage(WixErrors.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id)); 19347 this.Core.Write(ErrorMessages.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
19348 } 19348 }
19349 } 19349 }
19350 19350
@@ -19437,7 +19437,7 @@ namespace WixToolset.Core
19437 name = this.Core.GetAttributeLongFilename(sourceLineNumbers, attrib, false, true); 19437 name = this.Core.GetAttributeLongFilename(sourceLineNumbers, attrib, false, true);
19438 if (!this.Core.IsValidLongFilename(name, false, true)) 19438 if (!this.Core.IsValidLongFilename(name, false, true))
19439 { 19439 {
19440 this.Core.OnMessage(WixErrors.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Name", name)); 19440 this.Core.Write(ErrorMessages.IllegalLongFilename(sourceLineNumbers, node.Name.LocalName, "Name", name));
19441 } 19441 }
19442 break; 19442 break;
19443 case "SourceFile": 19443 case "SourceFile":
@@ -19528,7 +19528,7 @@ namespace WixToolset.Core
19528 compressed = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib); 19528 compressed = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
19529 break; 19529 break;
19530 case "SuppressLooseFilePayloadGeneration": 19530 case "SuppressLooseFilePayloadGeneration":
19531 this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 19531 this.Core.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
19532 suppressLooseFilePayloadGeneration = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 19532 suppressLooseFilePayloadGeneration = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
19533 allowed = (packageType == WixBundlePackageType.Msi); 19533 allowed = (packageType == WixBundlePackageType.Msi);
19534 break; 19534 break;
@@ -19563,13 +19563,13 @@ namespace WixToolset.Core
19563 19563
19564 if (CompilerCore.WixNamespace == node.Name.Namespace && node.Name.LocalName != "ExePackage" && node.Name.LocalName != "MsuPackage") 19564 if (CompilerCore.WixNamespace == node.Name.Namespace && node.Name.LocalName != "ExePackage" && node.Name.LocalName != "MsuPackage")
19565 { 19565 {
19566 this.Core.OnMessage(WixErrors.RemotePayloadUnsupported(childSourceLineNumbers)); 19566 this.Core.Write(ErrorMessages.RemotePayloadUnsupported(childSourceLineNumbers));
19567 continue; 19567 continue;
19568 } 19568 }
19569 19569
19570 if (null != remotePayload) 19570 if (null != remotePayload)
19571 { 19571 {
19572 this.Core.OnMessage(WixErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 19572 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
19573 } 19573 }
19574 19574
19575 remotePayload = this.ParseRemotePayloadElement(child); 19575 remotePayload = this.ParseRemotePayloadElement(child);
@@ -19579,7 +19579,7 @@ namespace WixToolset.Core
19579 { 19579 {
19580 if (String.IsNullOrEmpty(name)) 19580 if (String.IsNullOrEmpty(name))
19581 { 19581 {
19582 this.Core.OnMessage(WixErrors.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", "SourceFile")); 19582 this.Core.Write(ErrorMessages.ExpectedAttributesWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", "SourceFile"));
19583 } 19583 }
19584 else if (null == remotePayload) 19584 else if (null == remotePayload)
19585 { 19585 {
@@ -19592,13 +19592,13 @@ namespace WixToolset.Core
19592 } 19592 }
19593 else if (null != remotePayload) 19593 else if (null != remotePayload)
19594 { 19594 {
19595 this.Core.OnMessage(WixErrors.UnexpectedElementWithAttribute(sourceLineNumbers, node.Name.LocalName, "RemotePayload", "SourceFile")); 19595 this.Core.Write(ErrorMessages.UnexpectedElementWithAttribute(sourceLineNumbers, node.Name.LocalName, "RemotePayload", "SourceFile"));
19596 } 19596 }
19597 else if (sourceFile.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) 19597 else if (sourceFile.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal))
19598 { 19598 {
19599 if (String.IsNullOrEmpty(name)) 19599 if (String.IsNullOrEmpty(name))
19600 { 19600 {
19601 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name", "SourceFile", sourceFile)); 19601 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name", "SourceFile", sourceFile));
19602 } 19602 }
19603 else 19603 else
19604 { 19604 {
@@ -19608,13 +19608,13 @@ namespace WixToolset.Core
19608 19608
19609 if (null == downloadUrl && null != remotePayload) 19609 if (null == downloadUrl && null != remotePayload)
19610 { 19610 {
19611 this.Core.OnMessage(WixErrors.ExpectedAttributeWithElement(sourceLineNumbers, node.Name.LocalName, "DownloadUrl", "RemotePayload")); 19611 this.Core.Write(ErrorMessages.ExpectedAttributeWithElement(sourceLineNumbers, node.Name.LocalName, "DownloadUrl", "RemotePayload"));
19612 } 19612 }
19613 19613
19614 if (YesNoDefaultType.No != compressed && null != remotePayload) 19614 if (YesNoDefaultType.No != compressed && null != remotePayload)
19615 { 19615 {
19616 compressed = YesNoDefaultType.No; 19616 compressed = YesNoDefaultType.No;
19617 this.Core.OnMessage(WixWarnings.RemotePayloadsMustNotAlsoBeCompressed(sourceLineNumbers, node.Name.LocalName)); 19617 this.Core.Write(WarningMessages.RemotePayloadsMustNotAlsoBeCompressed(sourceLineNumbers, node.Name.LocalName));
19618 } 19618 }
19619 19619
19620 if (null == id) 19620 if (null == id)
@@ -19630,12 +19630,12 @@ namespace WixToolset.Core
19630 19630
19631 if (null == id) 19631 if (null == id)
19632 { 19632 {
19633 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 19633 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
19634 id = Identifier.Invalid; 19634 id = Identifier.Invalid;
19635 } 19635 }
19636 else if (!Common.IsIdentifier(id.Id)) 19636 else if (!Common.IsIdentifier(id.Id))
19637 { 19637 {
19638 this.Core.OnMessage(WixErrors.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id)); 19638 this.Core.Write(ErrorMessages.IllegalIdentifier(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
19639 } 19639 }
19640 } 19640 }
19641 19641
@@ -19651,7 +19651,7 @@ namespace WixToolset.Core
19651 19651
19652 if (!String.IsNullOrEmpty(protocol) && !protocol.Equals("burn", StringComparison.Ordinal) && !protocol.Equals("netfx4", StringComparison.Ordinal) && !protocol.Equals("none", StringComparison.Ordinal)) 19652 if (!String.IsNullOrEmpty(protocol) && !protocol.Equals("burn", StringComparison.Ordinal) && !protocol.Equals("netfx4", StringComparison.Ordinal) && !protocol.Equals("none", StringComparison.Ordinal))
19653 { 19653 {
19654 this.Core.OnMessage(WixErrors.IllegalAttributeValueWithLegalList(sourceLineNumbers, node.Name.LocalName, "Protocol", protocol, "none, burn, netfx4")); 19654 this.Core.Write(ErrorMessages.IllegalAttributeValueWithLegalList(sourceLineNumbers, node.Name.LocalName, "Protocol", protocol, "none, burn, netfx4"));
19655 } 19655 }
19656 19656
19657 if (!String.IsNullOrEmpty(protocol) && protocol.Equals("netfx4", StringComparison.Ordinal)) 19657 if (!String.IsNullOrEmpty(protocol) && protocol.Equals("netfx4", StringComparison.Ordinal))
@@ -19660,17 +19660,17 @@ namespace WixToolset.Core
19660 { 19660 {
19661 if (null == installCommand || -1 == installCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 19661 if (null == installCommand || -1 == installCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
19662 { 19662 {
19663 this.Core.OnMessage(WixWarnings.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "InstallCommand", installCommand, expectedArgument, "Protocol", "netfx4")); 19663 this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "InstallCommand", installCommand, expectedArgument, "Protocol", "netfx4"));
19664 } 19664 }
19665 19665
19666 if (null == repairCommand || -1 == repairCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 19666 if (null == repairCommand || -1 == repairCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
19667 { 19667 {
19668 this.Core.OnMessage(WixWarnings.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "RepairCommand", repairCommand, expectedArgument, "Protocol", "netfx4")); 19668 this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "RepairCommand", repairCommand, expectedArgument, "Protocol", "netfx4"));
19669 } 19669 }
19670 19670
19671 if (null == uninstallCommand || -1 == uninstallCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 19671 if (null == uninstallCommand || -1 == uninstallCommand.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
19672 { 19672 {
19673 this.Core.OnMessage(WixWarnings.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "UninstallCommand", uninstallCommand, expectedArgument, "Protocol", "netfx4")); 19673 this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "UninstallCommand", uninstallCommand, expectedArgument, "Protocol", "netfx4"));
19674 } 19674 }
19675 } 19675 }
19676 } 19676 }
@@ -19884,7 +19884,7 @@ namespace WixToolset.Core
19884 19884
19885 if (String.IsNullOrEmpty(condition)) 19885 if (String.IsNullOrEmpty(condition))
19886 { 19886 {
19887 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Condition")); 19887 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Condition"));
19888 } 19888 }
19889 19889
19890 this.Core.ParseForExtensionElements(node); 19890 this.Core.ParseForExtensionElements(node);
@@ -19931,7 +19931,7 @@ namespace WixToolset.Core
19931 19931
19932 if (null == id) 19932 if (null == id)
19933 { 19933 {
19934 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 19934 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
19935 id = Identifier.Invalid; 19935 id = Identifier.Invalid;
19936 } 19936 }
19937 19937
@@ -20042,12 +20042,12 @@ namespace WixToolset.Core
20042 20042
20043 if (null == id) 20043 if (null == id)
20044 { 20044 {
20045 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 20045 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
20046 } 20046 }
20047 20047
20048 if (null != after && ComplexReferenceParentType.Container == parentType) 20048 if (null != after && ComplexReferenceParentType.Container == parentType)
20049 { 20049 {
20050 this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "After", parentId)); 20050 this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "After", parentId));
20051 } 20051 }
20052 20052
20053 this.Core.ParseForExtensionElements(node); 20053 this.Core.ParseForExtensionElements(node);
@@ -20175,12 +20175,12 @@ namespace WixToolset.Core
20175 20175
20176 if (null == name) 20176 if (null == name)
20177 { 20177 {
20178 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 20178 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
20179 } 20179 }
20180 20180
20181 if (null == value) 20181 if (null == value)
20182 { 20182 {
20183 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 20183 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
20184 } 20184 }
20185 20185
20186 this.Core.ParseForExtensionElements(node); 20186 this.Core.ParseForExtensionElements(node);
@@ -20232,7 +20232,7 @@ namespace WixToolset.Core
20232 20232
20233 if (null == id) 20233 if (null == id)
20234 { 20234 {
20235 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 20235 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
20236 } 20236 }
20237 20237
20238 this.Core.ParseForExtensionElements(node); 20238 this.Core.ParseForExtensionElements(node);
@@ -20281,7 +20281,7 @@ namespace WixToolset.Core
20281 20281
20282 if (null == id) 20282 if (null == id)
20283 { 20283 {
20284 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 20284 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
20285 } 20285 }
20286 20286
20287 if (!String.IsNullOrEmpty(action)) 20287 if (!String.IsNullOrEmpty(action))
@@ -20298,7 +20298,7 @@ namespace WixToolset.Core
20298 case Wix.RelatedBundle.ActionType.Patch: 20298 case Wix.RelatedBundle.ActionType.Patch:
20299 break; 20299 break;
20300 default: 20300 default:
20301 this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Action", action, "Detect", "Upgrade", "Addon", "Patch")); 20301 this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Action", action, "Detect", "Upgrade", "Addon", "Patch"));
20302 break; 20302 break;
20303 } 20303 }
20304 } 20304 }
@@ -20344,7 +20344,7 @@ namespace WixToolset.Core
20344 20344
20345 if (null == location) 20345 if (null == location)
20346 { 20346 {
20347 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Location")); 20347 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Location"));
20348 } 20348 }
20349 20349
20350 this.Core.ParseForExtensionElements(node); 20350 this.Core.ParseForExtensionElements(node);
@@ -20409,11 +20409,11 @@ namespace WixToolset.Core
20409 20409
20410 if (null == name) 20410 if (null == name)
20411 { 20411 {
20412 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 20412 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
20413 } 20413 }
20414 else if (name.StartsWith("Wix", StringComparison.OrdinalIgnoreCase)) 20414 else if (name.StartsWith("Wix", StringComparison.OrdinalIgnoreCase))
20415 { 20415 {
20416 this.Core.OnMessage(WixErrors.ReservedNamespaceViolation(sourceLineNumbers, node.Name.LocalName, "Name", "Wix")); 20416 this.Core.Write(ErrorMessages.ReservedNamespaceViolation(sourceLineNumbers, node.Name.LocalName, "Name", "Wix"));
20417 } 20417 }
20418 20418
20419 if (null == type && null != value) 20419 if (null == type && null != value)
@@ -20459,7 +20459,7 @@ namespace WixToolset.Core
20459 20459
20460 if (null == value && null != type) 20460 if (null == value && null != type)
20461 { 20461 {
20462 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, "Variable", "Value", "Type")); 20462 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, "Variable", "Value", "Type"));
20463 } 20463 }
20464 20464
20465 this.Core.ParseForExtensionElements(node); 20465 this.Core.ParseForExtensionElements(node);
@@ -20586,12 +20586,12 @@ namespace WixToolset.Core
20586 20586
20587 if (null == id) 20587 if (null == id)
20588 { 20588 {
20589 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); 20589 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
20590 } 20590 }
20591 20591
20592 if (null == value) 20592 if (null == value)
20593 { 20593 {
20594 this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value")); 20594 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
20595 } 20595 }
20596 20596
20597 this.Core.ParseForExtensionElements(node); 20597 this.Core.ParseForExtensionElements(node);