From ed0a765c3294f89d26af16a215339e8db3142749 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 31 May 2023 16:04:27 -0400 Subject: Downgrade bad ProductVersion error to warning. Fixes https://github.com/wixtoolset/issues/issues/7522. --- src/api/wix/WixToolset.Data/ErrorMessages.cs | 6 ------ src/api/wix/WixToolset.Data/WarningMessages.cs | 11 +++++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src/api') diff --git a/src/api/wix/WixToolset.Data/ErrorMessages.cs b/src/api/wix/WixToolset.Data/ErrorMessages.cs index a948fb2f..bc63247e 100644 --- a/src/api/wix/WixToolset.Data/ErrorMessages.cs +++ b/src/api/wix/WixToolset.Data/ErrorMessages.cs @@ -1306,11 +1306,6 @@ namespace WixToolset.Data return Message(sourceLineNumbers, Ids.InvalidPreprocessorVariable, "Ill-formed preprocessor variable '$({0})'. Variables must have a prefix (like 'var.', 'env.', or 'sys.') and a name at least 1 character long. If the literal string '$({0})' is desired, use '$$({0})'.", variable); } - public static Message InvalidProductVersion(SourceLineNumber sourceLineNumbers, string version) - { - return Message(sourceLineNumbers, Ids.InvalidProductVersion, "Invalid product version '{0}'. MSI product versions must have a major version less than 256, a minor version less than 256, and a build version less than 65536. The revision value is ignored but version labels and metadata are not allowed.", version); - } - public static Message InvalidRemoveComponent(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath) { return Message(sourceLineNumbers, Ids.InvalidRemoveComponent, "Removing component '{0}' from feature '{1}' is not supported. Either the component was removed or the guid changed in the transform '{2}'. Add the component back, undo the change to the component guid, or remove the entire feature.", component, feature, transformPath); @@ -2520,7 +2515,6 @@ namespace WixToolset.Data InvalidWixTransform = 239, UnexpectedFileExtension = 240, UnexpectedTableInPatch = 241, - InvalidProductVersion = 242, InvalidKeypathChange = 243, MissingValidatorExtension = 244, InvalidValidatorMessageType = 245, diff --git a/src/api/wix/WixToolset.Data/WarningMessages.cs b/src/api/wix/WixToolset.Data/WarningMessages.cs index 7659b4e5..d54990e1 100644 --- a/src/api/wix/WixToolset.Data/WarningMessages.cs +++ b/src/api/wix/WixToolset.Data/WarningMessages.cs @@ -678,6 +678,17 @@ namespace WixToolset.Data return Message(sourceLineNumbers, Ids.InvalidMsiProductVersion, "Invalid product version '{0}' in MSI package '{1}'. Product version should have a major version less than 256, a minor version less than 256, and a build version less than 65536. The bundle may incorrectly detect upgrades of this package.", version, package); } + public static Message InvalidMsiProductVersion(SourceLineNumber sourceLineNumbers, string version) + { + return Message(sourceLineNumbers, Ids.InvalidMsiProductVersion, + "Invalid MSI package version: '{0}'. " + + "The Windows Installer SDK says that MSI product versions must have a major version less than 256, a minor version less than 256, and a build version less than 65536. " + + "The revision value is ignored but version labels and metadata are not allowed. " + + "Violating the MSI rules sometimes works as expected but the behavior is unpredictable and undefined. "+ + "Future versions of WiX might treat invalid package versions as an error.", + version); + } + public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType) { return Message(null, Ids.CollidingModularizationTypes, "The definition for the '{0}' table's '{1}' column is a foreign key relationship to the '{2}' table's column number {3}. The modularization types of the two column definitions differ: table '{0}' uses type {4} and table '{2}' uses type {5}. Change one of the modularization types so that they match.", tableName, columnName, foreignTableName, foreignColumnNumber, modularizationType, foreignModularizationType); -- cgit v1.2.3-55-g6feb