diff options
author | Rob Mensching <rob@firegiant.com> | 2021-01-08 13:46:29 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-01-08 15:39:53 -0800 |
commit | cce48bc96c334acc9a60bce4172f6d463a4dbbd1 (patch) | |
tree | 2445f0e50eb04473adc9a5878e5667e0cdf1c45a /src | |
parent | 772262429cda01740b310fc87c05140740e7f870 (diff) | |
download | wix-cce48bc96c334acc9a60bce4172f6d463a4dbbd1.tar.gz wix-cce48bc96c334acc9a60bce4172f6d463a4dbbd1.tar.bz2 wix-cce48bc96c334acc9a60bce4172f6d463a4dbbd1.zip |
Add messages for ExePackage/@DetectCondition recommendations
First part of fix for wixtoolset/issues#6197
Diffstat (limited to 'src')
-rw-r--r-- | src/WixToolset.Data/ErrorMessages.cs | 6 | ||||
-rw-r--r-- | src/WixToolset.Data/WarningMessages.cs | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/WixToolset.Data/ErrorMessages.cs b/src/WixToolset.Data/ErrorMessages.cs index 9e051e00..644f08d7 100644 --- a/src/WixToolset.Data/ErrorMessages.cs +++ b/src/WixToolset.Data/ErrorMessages.cs | |||
@@ -438,6 +438,11 @@ namespace WixToolset.Data | |||
438 | return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2}/@{3} attribute.", elementName, attributeName, parentElementName, parentAttributeName); | 438 | return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2}/@{3} attribute.", elementName, attributeName, parentElementName, parentAttributeName); |
439 | } | 439 | } |
440 | 440 | ||
441 | public static Message ExpectedAttributeWithValueWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName2) | ||
442 | { | ||
443 | return Message(sourceLineNumbers, Ids.ExpectedAttributeWithValueWithOtherAttribute, "The {0}/@{1} attribute is required to have a value when attribute {2} is present.", elementName, attributeName, attributeName2); | ||
444 | } | ||
445 | |||
441 | public static Message ExpectedAttributeOrElement(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement) | 446 | public static Message ExpectedAttributeOrElement(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement) |
442 | { | 447 | { |
443 | return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElement, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required.", parentElement, attribute, childElement); | 448 | return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElement, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required.", parentElement, attribute, childElement); |
@@ -2692,6 +2697,7 @@ namespace WixToolset.Data | |||
2692 | CircularSearchReference = 398, | 2697 | CircularSearchReference = 398, |
2693 | UnknownSymbolType = 399, | 2698 | UnknownSymbolType = 399, |
2694 | IllegalInnerText = 400, | 2699 | IllegalInnerText = 400, |
2700 | ExpectedAttributeWithValueWithOtherAttribute = 401, | ||
2695 | } | 2701 | } |
2696 | } | 2702 | } |
2697 | } | 2703 | } |
diff --git a/src/WixToolset.Data/WarningMessages.cs b/src/WixToolset.Data/WarningMessages.cs index a1df1282..1ea0f3ea 100644 --- a/src/WixToolset.Data/WarningMessages.cs +++ b/src/WixToolset.Data/WarningMessages.cs | |||
@@ -232,6 +232,11 @@ namespace WixToolset.Data | |||
232 | return Message(sourceLineNumbers, Ids.DiscouragedAllUsersValue, "Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, remove the Property with Id='ALLUSERS' and use Package/@InstallScope attribute instead.", path, machineOrUser); | 232 | return Message(sourceLineNumbers, Ids.DiscouragedAllUsersValue, "Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, remove the Property with Id='ALLUSERS' and use Package/@InstallScope attribute instead.", path, machineOrUser); |
233 | } | 233 | } |
234 | 234 | ||
235 | public static Message DetectConditionRecommended(SourceLineNumber sourceLineNumbers, string elementName) | ||
236 | { | ||
237 | return Message(sourceLineNumbers, Ids.DetectConditionRecommended, "The {0}/@DetectCondition attribute is recommended so the package is only installed when absent.", elementName); | ||
238 | } | ||
239 | |||
235 | public static Message DownloadUrlNotSupportedForAttachedContainers(SourceLineNumber sourceLineNumbers, string containerId) | 240 | public static Message DownloadUrlNotSupportedForAttachedContainers(SourceLineNumber sourceLineNumbers, string containerId) |
236 | { | 241 | { |
237 | return Message(sourceLineNumbers, Ids.DownloadUrlNotSupportedForAttachedContainers, "The Container '{0}' is attached but included a @DownloadUrl attribute. Attached Containers cannot be downloaded so the download URL is being ignored.", containerId); | 242 | return Message(sourceLineNumbers, Ids.DownloadUrlNotSupportedForAttachedContainers, "The Container '{0}' is attached but included a @DownloadUrl attribute. Attached Containers cannot be downloaded so the download URL is being ignored.", containerId); |
@@ -792,6 +797,7 @@ namespace WixToolset.Data | |||
792 | SymbolNotTranslatedToOutput = 1150, | 797 | SymbolNotTranslatedToOutput = 1150, |
793 | MsiTransactionLimitations = 1151, | 798 | MsiTransactionLimitations = 1151, |
794 | PathCanonicalized = 1152, | 799 | PathCanonicalized = 1152, |
800 | DetectConditionRecommended = 1153, | ||
795 | } | 801 | } |
796 | } | 802 | } |
797 | } | 803 | } |