diff options
Diffstat (limited to 'src/WixToolset.Converters/WixConverter.cs')
-rw-r--r-- | src/WixToolset.Converters/WixConverter.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/WixToolset.Converters/WixConverter.cs b/src/WixToolset.Converters/WixConverter.cs index c18b095e..a05c7f58 100644 --- a/src/WixToolset.Converters/WixConverter.cs +++ b/src/WixToolset.Converters/WixConverter.cs | |||
@@ -481,6 +481,32 @@ namespace WixToolset.Converters | |||
481 | 481 | ||
482 | private void ConvertFeatureElement(XElement element) | 482 | private void ConvertFeatureElement(XElement element) |
483 | { | 483 | { |
484 | var xAbsent = element.Attribute("Absent"); | ||
485 | if (xAbsent != null && | ||
486 | this.OnError(ConverterTestType.FeatureAbsentAttributeReplaced, element, "The Feature element's Absent attribute has been replaced with the AllowAbsent attribute. Use the 'AllowAbsent' attribute instead.")) | ||
487 | { | ||
488 | if (xAbsent.Value == "allow") | ||
489 | { | ||
490 | element.Add(new XAttribute("AllowAbsent", "yes")); | ||
491 | } | ||
492 | xAbsent.Remove(); | ||
493 | } | ||
494 | |||
495 | var xAllowAdvertise = element.Attribute("AllowAdvertise"); | ||
496 | if (xAllowAdvertise != null) | ||
497 | { | ||
498 | if ((xAllowAdvertise.Value == "system" || xAllowAdvertise.Value == "allow") && | ||
499 | this.OnError(ConverterTestType.FeatureAllowAdvertiseValueDeprecated, element, "The AllowAdvertise attribute's '{0}' value deprecated. Set the value to 'yes' instead.", xAllowAdvertise.Value)) | ||
500 | { | ||
501 | xAllowAdvertise.Value = "yes"; | ||
502 | } | ||
503 | else if (xAllowAdvertise.Value == "disallow" && | ||
504 | this.OnError(ConverterTestType.FeatureAllowAdvertiseValueDeprecated, element, "The AllowAdvertise attribute's '{0}' value deprecated. Remove the value instead.", xAllowAdvertise.Value)) | ||
505 | { | ||
506 | xAllowAdvertise.Remove(); | ||
507 | } | ||
508 | } | ||
509 | |||
484 | var xCondition = element.Element(ConditionElementName); | 510 | var xCondition = element.Element(ConditionElementName); |
485 | if (xCondition != null) | 511 | if (xCondition != null) |
486 | { | 512 | { |
@@ -1132,6 +1158,16 @@ namespace WixToolset.Converters | |||
1132 | /// Displayed when the XML declaration is present in the source file. | 1158 | /// Displayed when the XML declaration is present in the source file. |
1133 | /// </summary> | 1159 | /// </summary> |
1134 | DeclarationPresent, | 1160 | DeclarationPresent, |
1161 | |||
1162 | /// <summary> | ||
1163 | /// The Feature Absent attribute renamed to AllowAbsent. | ||
1164 | /// </summary> | ||
1165 | FeatureAbsentAttributeReplaced, | ||
1166 | |||
1167 | /// <summary> | ||
1168 | /// The Feature AllowAdvertise attribute value deprecated. | ||
1169 | /// </summary> | ||
1170 | FeatureAllowAdvertiseValueDeprecated, | ||
1135 | } | 1171 | } |
1136 | } | 1172 | } |
1137 | } | 1173 | } |