aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2023-05-31 16:04:27 -0400
committerBob Arnson <github@bobs.org>2023-05-31 17:07:16 -0400
commited0a765c3294f89d26af16a215339e8db3142749 (patch)
tree5eeb569ba61af34b73ccbc734f5aa052122db390 /src/api
parentbc9343ad5c6133ae5f2d5233837beeee7041a292 (diff)
downloadwix-ed0a765c3294f89d26af16a215339e8db3142749.tar.gz
wix-ed0a765c3294f89d26af16a215339e8db3142749.tar.bz2
wix-ed0a765c3294f89d26af16a215339e8db3142749.zip
Downgrade bad ProductVersion error to warning.
Fixes https://github.com/wixtoolset/issues/issues/7522.
Diffstat (limited to 'src/api')
-rw-r--r--src/api/wix/WixToolset.Data/ErrorMessages.cs6
-rw-r--r--src/api/wix/WixToolset.Data/WarningMessages.cs11
2 files changed, 11 insertions, 6 deletions
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
1306 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); 1306 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);
1307 } 1307 }
1308 1308
1309 public static Message InvalidProductVersion(SourceLineNumber sourceLineNumbers, string version)
1310 {
1311 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);
1312 }
1313
1314 public static Message InvalidRemoveComponent(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath) 1309 public static Message InvalidRemoveComponent(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath)
1315 { 1310 {
1316 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); 1311 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
2520 InvalidWixTransform = 239, 2515 InvalidWixTransform = 239,
2521 UnexpectedFileExtension = 240, 2516 UnexpectedFileExtension = 240,
2522 UnexpectedTableInPatch = 241, 2517 UnexpectedTableInPatch = 241,
2523 InvalidProductVersion = 242,
2524 InvalidKeypathChange = 243, 2518 InvalidKeypathChange = 243,
2525 MissingValidatorExtension = 244, 2519 MissingValidatorExtension = 244,
2526 InvalidValidatorMessageType = 245, 2520 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
678 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); 678 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);
679 } 679 }
680 680
681 public static Message InvalidMsiProductVersion(SourceLineNumber sourceLineNumbers, string version)
682 {
683 return Message(sourceLineNumbers, Ids.InvalidMsiProductVersion,
684 "Invalid MSI package version: '{0}'. " +
685 "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. " +
686 "The revision value is ignored but version labels and metadata are not allowed. " +
687 "Violating the MSI rules sometimes works as expected but the behavior is unpredictable and undefined. "+
688 "Future versions of WiX might treat invalid package versions as an error.",
689 version);
690 }
691
681 public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType) 692 public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType)
682 { 693 {
683 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); 694 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);