diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-07-18 14:57:45 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-07-18 15:06:43 -0700 |
| commit | 901e856ef5c72be5fc7cfb3077e2e60892ddd4cc (patch) | |
| tree | d87e52a2f085b5bd135d3e4f41c973b0e337f27d /src/WixToolset.Converters | |
| parent | e04caab11fb8f2cac4d575ef1e352221bd421586 (diff) | |
| download | wix-901e856ef5c72be5fc7cfb3077e2e60892ddd4cc.tar.gz wix-901e856ef5c72be5fc7cfb3077e2e60892ddd4cc.tar.bz2 wix-901e856ef5c72be5fc7cfb3077e2e60892ddd4cc.zip | |
Correctly report error when Publish/@Condition='1'
Diffstat (limited to 'src/WixToolset.Converters')
| -rw-r--r-- | src/WixToolset.Converters/WixConverter.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/WixToolset.Converters/WixConverter.cs b/src/WixToolset.Converters/WixConverter.cs index bfeed03e..3ea0c3dc 100644 --- a/src/WixToolset.Converters/WixConverter.cs +++ b/src/WixToolset.Converters/WixConverter.cs | |||
| @@ -693,7 +693,8 @@ namespace WixToolset.Converters | |||
| 693 | this.ConvertInnerTextToAttribute(element, "Condition"); | 693 | this.ConvertInnerTextToAttribute(element, "Condition"); |
| 694 | 694 | ||
| 695 | var xCondition = element.Attribute("Condition"); | 695 | var xCondition = element.Attribute("Condition"); |
| 696 | if (xCondition?.Value == "1") | 696 | if (xCondition?.Value == "1" && |
| 697 | this.OnError(ConverterTestType.PublishConditionOneUnnecessary, element, "Adding Condition='1' on {0} elements is no longer necessary. Remove the Condition attribute.", xCondition.Name.LocalName)) | ||
| 697 | { | 698 | { |
| 698 | xCondition.Remove(); | 699 | xCondition.Remove(); |
| 699 | } | 700 | } |
| @@ -1207,6 +1208,11 @@ namespace WixToolset.Converters | |||
| 1207 | /// The Feature AllowAdvertise attribute value deprecated. | 1208 | /// The Feature AllowAdvertise attribute value deprecated. |
| 1208 | /// </summary> | 1209 | /// </summary> |
| 1209 | FeatureAllowAdvertiseValueDeprecated, | 1210 | FeatureAllowAdvertiseValueDeprecated, |
| 1211 | |||
| 1212 | /// <summary> | ||
| 1213 | /// The Condition='1' attribute is unnecessary on Publish elements. | ||
| 1214 | /// </summary> | ||
| 1215 | PublishConditionOneUnnecessary | ||
| 1210 | } | 1216 | } |
| 1211 | } | 1217 | } |
| 1212 | } | 1218 | } |
