aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/api/wix/WixToolset.Data/WarningMessages.cs727
-rw-r--r--src/ext/Util/wixext/UtilDecompiler.cs4
-rw-r--r--src/ext/Util/wixext/UtilWarnings.cs6
-rw-r--r--src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.Burn/Bind/ResolveDownloadUrlsCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs8
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/PerformBundleBackendValidationCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs6
-rw-r--r--src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs54
-rw-r--r--src/wix/WixToolset.Core.Native/NativeWarnings.cs24
-rw-r--r--src/wix/WixToolset.Core.Native/WindowsInstallerValidator.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs4
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs6
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs16
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs8
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs8
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs8
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs28
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs4
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs275
-rw-r--r--src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs2
-rw-r--r--src/wix/WixToolset.Core/CommandLine/BuildCommand.cs2
-rw-r--r--src/wix/WixToolset.Core/Common.cs2
-rw-r--r--src/wix/WixToolset.Core/Compile/CompilerPayload.cs4
-rw-r--r--src/wix/WixToolset.Core/Compiler.cs26
-rw-r--r--src/wix/WixToolset.Core/CompilerCore.cs2
-rw-r--r--src/wix/WixToolset.Core/CompilerWarnings.cs222
-rw-r--r--src/wix/WixToolset.Core/Compiler_Bundle.cs10
-rw-r--r--src/wix/WixToolset.Core/Compiler_Module.cs2
-rw-r--r--src/wix/WixToolset.Core/Compiler_Package.cs28
-rw-r--r--src/wix/WixToolset.Core/Compiler_Patch.cs2
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs4
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs4
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs8
-rw-r--r--src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs2
-rw-r--r--src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs2
-rw-r--r--src/wix/WixToolset.Core/Linker.cs4
-rw-r--r--src/wix/WixToolset.Core/LinkerWarnings.cs18
-rw-r--r--src/wix/WixToolset.Core/Preprocessor.cs2
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs2
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/WarningFixture.cs2
47 files changed, 718 insertions, 838 deletions
diff --git a/src/api/wix/WixToolset.Data/WarningMessages.cs b/src/api/wix/WixToolset.Data/WarningMessages.cs
index 67915620..8391da90 100644
--- a/src/api/wix/WixToolset.Data/WarningMessages.cs
+++ b/src/api/wix/WixToolset.Data/WarningMessages.cs
@@ -3,100 +3,9 @@
3namespace WixToolset.Data 3namespace WixToolset.Data
4{ 4{
5 using System; 5 using System;
6 using System.Resources;
7 6
8 public static class WarningMessages 7 public static class WarningMessages
9 { 8 {
10 public static Message AccessDeniedForDeletion(SourceLineNumber sourceLineNumbers, string tempFilesBasePath)
11 {
12 return Message(sourceLineNumbers, Ids.AccessDeniedForDeletion, "Access denied; cannot delete '{0}'.", tempFilesBasePath);
13 }
14
15 public static Message AccessDeniedForSettingAttributes(SourceLineNumber sourceLineNumbers, string filePath)
16 {
17 return Message(sourceLineNumbers, Ids.AccessDeniedForSettingAttributes, "Access denied; cannot set attributes on '{0}'.", filePath);
18 }
19
20 public static Message ActionSequenceCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2, int sequenceNumber)
21 {
22 return Message(sourceLineNumbers, Ids.ActionSequenceCollision, "The {0} table contains actions '{1}' and '{2}' which both have the same sequence number {3}. Please change the sequence number for one of these actions to avoid an ICE warning.", sequenceTableName, actionName1, actionName2, sequenceNumber);
23 }
24
25 public static Message ActionSequenceCollision2(SourceLineNumber sourceLineNumbers)
26 {
27 return Message(sourceLineNumbers, Ids.ActionSequenceCollision2, "The location of the action related to previous warning.");
28 }
29
30 public static Message AllChangesIncludedInPatch(SourceLineNumber sourceLineNumbers)
31 {
32 return Message(sourceLineNumbers, Ids.AllChangesIncludedInPatch, "All changes between the baseline and upgraded packages will be included in the patch except for any change to the ProductCode. The 'All' element is supported primarily for testing purposes and negates the benefits of patch families.");
33 }
34
35 public static Message AmbiguousFileOrDirectoryName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
36 {
37 return Message(sourceLineNumbers, Ids.AmbiguousFileOrDirectoryName, "The {0}/@{1} attribute's value '{2}' is an ambiguous short name because it ends with a '~' character followed by a number. Under some circumstances, this name could resolve to more than one file or directory name and lead to unpredictable results (for example 'MICROS~1' may correspond to 'Microsoft Shared' or 'Microsoft Foo' or literally 'Micros~1').", elementName, attributeName, value);
38 }
39
40 public static Message AttributeShouldContain(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue, string expectedContains, string otherAttributeName, string otherAttributeValue)
41 {
42 return Message(sourceLineNumbers, Ids.AttributeShouldContain, "The {0}/@{1} attribute value '{2}' should contain '{3}' when the {0}/@{4} attribute is set to '{5}'.", elementName, attributeName, attributeValue, expectedContains, otherAttributeName, otherAttributeValue);
43 }
44
45 public static Message BackslashTerminateInlineDirectorySyntax(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
46 {
47 return Message(sourceLineNumbers, Ids.BackslashTerminateInlineDirectorySyntax, "Backslash terminate the {0}/@{1} attribute's inline directory value '{2}'. A backslash ensures a directory name will not be mistaken for a directory reference.", elementName, attributeName, value);
48 }
49
50 public static Message BadColumnDataIgnored(SourceLineNumber sourceLineNumbers, string value, string tableName, string columnName)
51 {
52 return Message(sourceLineNumbers, Ids.BadColumnDataIgnored, "The value '{0}' in table '{1}', column '{2}' is invalid according to the column's validation information. The decompiled output includes a best-effort representation of this value.", value, tableName, columnName);
53 }
54
55 public static Message CannotUpdateCabCache(SourceLineNumber sourceLineNumbers, string cabinetPath, string detail)
56 {
57 return Message(sourceLineNumbers, Ids.CannotUpdateCabCache, "Cannot update the timestamp of cached cabinet: '{0}'. If the timestamp is not updated, the build may rebuild more than is necessary. To fix the issue, ensure that the cabinet file is writable, error: {1}", cabinetPath, detail);
58 }
59
60 public static Message ColumnsIncompatibleWithInstallerVersion(SourceLineNumber sourceLineNumbers, string tableName, int packageInstallerVersion)
61 {
62 return Message(sourceLineNumbers, Ids.ColumnsIncompatibleWithInstallerVersion, "Table '{0}' uses columns that require a version of Windows Installer greater than specified in your package ('{1}').", tableName, packageInstallerVersion);
63 }
64
65 public static Message CopyFileFileIdUseless(SourceLineNumber sourceLineNumbers)
66 {
67 return Message(sourceLineNumbers, Ids.CopyFileFileIdUseless, "Since the CopyFile/@FileId attribute was specified but none of the following attributes (DestinationName, DestinationDirectory, DestinationProperty) were specified, this authoring will not do anything.");
68 }
69
70 public static Message DangerousTableInMergeModule(SourceLineNumber sourceLineNumbers, string tableName)
71 {
72 return Message(sourceLineNumbers, Ids.DangerousTableInMergeModule, "Merge modules should not contain the '{0}' table because all merge conflicts cannot avoided. However, this warning can be suppressed if all of the consumers of the Merge Module agree to not duplicate identifiers in the '{0}' table.", tableName);
73 }
74
75 public static Message DecompiledStandardActionRelativelyScheduledInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
76 {
77 return Message(sourceLineNumbers, Ids.DecompiledStandardActionRelativelyScheduledInModule, "The {0} table contains a standard action '{1}' that does not have a sequence number specified. A value in the Sequence column is required for standard actions in a merge module. Remove the action from the decompiled authoring to have WiX automatically sequence it.", sequenceTableName, actionName);
78 }
79
80 public static Message DecompilingAsCustomTable(SourceLineNumber sourceLineNumbers, string tableName)
81 {
82 return Message(sourceLineNumbers, Ids.DecompilingAsCustomTable, "The {0} table is being decompiled as a custom table.", tableName);
83 }
84
85 public static Message DefaultLanguageUsedForUnversionedFile(SourceLineNumber sourceLineNumbers, string language, string fileId)
86 {
87 return Message(sourceLineNumbers, Ids.DefaultLanguageUsedForUnversionedFile, "The DefaultLanguage '{0}' was used for file '{1}' which has no language or version. For unversioned files, specifying a value for DefaultLanguage is not neccessary and it will not be used when determining file versions. Remove the DefaultLanguage attribute to eliminate this warning.", language, fileId);
88 }
89
90 public static Message DefaultLanguageUsedForVersionedFile(SourceLineNumber sourceLineNumbers, string language, string fileId)
91 {
92 return Message(sourceLineNumbers, Ids.DefaultLanguageUsedForVersionedFile, "The DefaultLanguage '{0}' was used for file '{1}' which has no language. Specifying a language that is different from the actual file may result in unexpected versioning behavior during a repair or while patching. Either specify a value for DefaultLanguage or put the language in the version information resource to eliminate this warning.", language, fileId);
93 }
94
95 public static Message DefaultVersionUsedForUnversionedFile(SourceLineNumber sourceLineNumbers, string version, string fileId)
96 {
97 return Message(sourceLineNumbers, Ids.DefaultVersionUsedForUnversionedFile, "The DefaultVersion '{0}' was used for file '{1}' which has no version. No entry for this file will be placed in the MsiFileHash table. For unversioned files, specifying a version that is different from the actual file may result in unexpected versioning behavior during a repair or while patching. Version the resource to eliminate this warning.", version, fileId);
98 }
99
100 public static Message DeprecatedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) 9 public static Message DeprecatedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
101 { 10 {
102 return Message(sourceLineNumbers, Ids.DeprecatedAttribute, "The {0}/@{1} attribute has been deprecated.", elementName, attributeName); 11 return Message(sourceLineNumbers, Ids.DeprecatedAttribute, "The {0}/@{1} attribute has been deprecated.", elementName, attributeName);
@@ -122,21 +31,6 @@ namespace WixToolset.Data
122 return Message(sourceLineNumbers, Ids.DeprecatedAttributeValue, "The value \"{0}\" for the {1}/@{2} attribute has been deprecated. Please use \"{3}\" instead.", attributeValue, elementName, attributeName, newAttributeValue); 31 return Message(sourceLineNumbers, Ids.DeprecatedAttributeValue, "The value \"{0}\" for the {1}/@{2} attribute has been deprecated. Please use \"{3}\" instead.", attributeValue, elementName, attributeName, newAttributeValue);
123 } 32 }
124 33
125 public static Message DeprecatedCommandLineSwitch(string oldSwitch)
126 {
127 return Message(null, Ids.DeprecatedCommandLineSwitch, "The command line switch '{0}' is deprecated.", oldSwitch);
128 }
129
130 public static Message DeprecatedCommandLineSwitch(string oldSwitch, string newSwitch)
131 {
132 return Message(null, Ids.DeprecatedCommandLineSwitch, "The command line switch '{0}' is deprecated. Please use '{1}' instead.", oldSwitch, newSwitch);
133 }
134
135 public static Message DeprecatedComponentGroupId(SourceLineNumber sourceLineNumbers, string elementName)
136 {
137 return Message(sourceLineNumbers, Ids.DeprecatedComponentGroupId, "The {0}/@Id attribute contains invalid characters for an identifier. Being able to use invalid identifier characters for a {0} identifier has been deprecated.", elementName);
138 }
139
140 public static Message DeprecatedElement(SourceLineNumber sourceLineNumbers, string elementName) 34 public static Message DeprecatedElement(SourceLineNumber sourceLineNumbers, string elementName)
141 { 35 {
142 return Message(sourceLineNumbers, Ids.DeprecatedElement, "The {0} element has been deprecated.", elementName); 36 return Message(sourceLineNumbers, Ids.DeprecatedElement, "The {0} element has been deprecated.", elementName);
@@ -152,126 +46,6 @@ namespace WixToolset.Data
152 return Message(sourceLineNumbers, Ids.DeprecatedElement, "The {0} element has been deprecated. Please use the {1} or {2} element instead.", elementName, newElementName1, newElementName2); 46 return Message(sourceLineNumbers, Ids.DeprecatedElement, "The {0} element has been deprecated. Please use the {1} or {2} element instead.", elementName, newElementName1, newElementName2);
153 } 47 }
154 48
155 public static Message DeprecatedIgnoreModularizationElement(SourceLineNumber sourceLineNumbers)
156 {
157 return Message(sourceLineNumbers, Ids.DeprecatedIgnoreModularizationElement, "The IgnoreModularization element has been deprecated. Use the Binary/@SuppressModularization, CustomAction/@SuppressModularization, or Property/@SuppressModularization attribute instead.");
158 }
159
160 public static Message DeprecatedLocalizationVariablePrefix(SourceLineNumber sourceLineNumbers, string variableId)
161 {
162 return Message(sourceLineNumbers, Ids.DeprecatedLocalizationVariablePrefix, "The localization variable $(loc.{0}) uses a deprecated prefix '$'. Please use the '!' prefix instead. Since the prefix '$' is also used by the preprocessor, it has been deprecated to avoid namespace collisions.", variableId);
163 }
164
165 public static Message DeprecatedLongNameAttribute(SourceLineNumber sourceLineNumbers, string elementName, string longNameAttributeName, string nameAttributeName, string shortNameAttributeName)
166 {
167 return Message(sourceLineNumbers, Ids.DeprecatedLongNameAttribute, "The {0}/@{1} attribute has been deprecated. Since WiX now has the ability to generate short file/directory names, the desired name should be specified in the {2} attribute instead. If the name specified in the {2} attribute is a short name, then WiX will not generate a short name. If the name specified in the {2} attribute is a long name and you want to manually specify the short name, please set the short name value in the {3} attribute.", elementName, longNameAttributeName, nameAttributeName, shortNameAttributeName);
168 }
169
170 public static Message DeprecatedPreProcVariable(SourceLineNumber sourceLineNumbers, string oldName, string newName)
171 {
172 return Message(sourceLineNumbers, Ids.DeprecatedPreProcVariable, "The built-in preprocessor variable '{0}' is deprecated. Please correct your authoring to use the new '{1}' preprocessor variable instead.", oldName, newName);
173 }
174
175 public static Message DeprecatedQuestionMarksGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
176 {
177 return Message(sourceLineNumbers, Ids.DeprecatedQuestionMarksGuid, "The {0}/@{1} attribute's value '????????-????-????-????-????????????' has been deprecated. Use '*' instead.", elementName, attributeName);
178 }
179
180 public static Message DeprecatedRegistryElement(SourceLineNumber sourceLineNumbers)
181 {
182 return Message(sourceLineNumbers, Ids.DeprecatedRegistryElement, "The Registry element has been deprecated. Please use one of the new elements which replaces its functionality: RegistryKey for creating registry keys, RegistryValue for writing registry values, RemoveRegistryKey for removing registry keys, and RemoveRegistryValue for removing registry values.");
183 }
184
185 public static Message DeprecatedRegistryKeyActionAttribute(SourceLineNumber sourceLineNumbers)
186 {
187 return Message(sourceLineNumbers, Ids.DeprecatedRegistryKeyActionAttribute, "The RegistryKey/@Action attribute has been deprecated. In most cases, you can simply omit @Action. If you need to force Windows Installer to create an empty key or recursively delete the key, use the ForceCreateOnInstall or ForceDeleteOnUninstall attributes instead.");
188 }
189
190 public static Message DeprecatedTable(string tableName)
191 {
192 return Message(null, Ids.DeprecatedTable, "The {0} table is not supported by the WiX toolset because it has been deprecated by the Windows Installer team. Any information in this table will be left out of the decompiled output.", tableName);
193 }
194
195 public static Message DeprecatedUpgradeProperty(SourceLineNumber sourceLineNumbers)
196 {
197 return Message(sourceLineNumbers, Ids.DeprecatedUpgradeProperty, "Specifying a Property element as a child of an Upgrade element has been deprecated. Please specify this Property element as a child of a different element such as Package or Fragment.");
198 }
199
200 public static Message DirectoryInUse(SourceLineNumber sourceLineNumbers, string filePath)
201 {
202 return Message(sourceLineNumbers, Ids.DirectoryInUse, "The directory '{0}' is in use and cannot be deleted.", filePath);
203 }
204
205 public static Message DirectoryRedundantNames(SourceLineNumber sourceLineNumbers, string elementName, string shortNameAttributeName, string longNameAttributeName, string attributeValue)
206 {
207 return Message(sourceLineNumbers, Ids.DirectoryRedundantNames, "The {0} element's {1} and {2} values are both '{3}'. This is redundant; the {2} attribute should be removed.", elementName, shortNameAttributeName, longNameAttributeName, attributeValue);
208 }
209
210 public static Message DirectoryRedundantNames(SourceLineNumber sourceLineNumbers, string elementName, string sourceNameAttributeName, string longSourceAttributeName)
211 {
212 return Message(sourceLineNumbers, Ids.DirectoryRedundantNames, "The {0} element's source and destination names are identical. This is redundant; the {1} and {2} attributes should be removed if present.", elementName, sourceNameAttributeName, longSourceAttributeName);
213 }
214
215 public static Message DiscardedRollbackBoundary(SourceLineNumber sourceLineNumbers, string rollbackBoundaryId)
216 {
217 return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary, "The RollbackBoundary '{0}' was discarded because it was not followed by a package. Without a package the rollback boundary doesn't do anything. Verify that the RollbackBoundary element is not followed by another RollbackBoundary and that the element is not at the end of the chain.", rollbackBoundaryId);
218 }
219
220 public static Message DiscardedRollbackBoundary2(SourceLineNumber sourceLineNumbers)
221 {
222 return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary2, "Location of rollback boundary related to previous warning.");
223 }
224
225 public static Message DiscouragedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string machineOrUser)
226 {
227 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, use the Package/@Scope attribute values 'perUser' or 'perMachine' instead.", path, machineOrUser);
228 }
229
230 public static Message DetectConditionRecommended(SourceLineNumber sourceLineNumbers, string elementName)
231 {
232 return Message(sourceLineNumbers, Ids.DetectConditionRecommended, "The {0}/@DetectCondition attribute is recommended so the package is only installed when absent.", elementName);
233 }
234
235 public static Message ExePackageDetectInformationRecommended(SourceLineNumber sourceLineNumbers)
236 {
237 return Message(sourceLineNumbers, Ids.ExePackageDetectInformationRecommended, "The ExePackage/@DetectCondition attribute or child element ArpEntry is recommended so the package is only installed when absent.");
238 }
239
240 public static Message DownloadUrlNotSupportedForAttachedContainers(SourceLineNumber sourceLineNumbers, string containerId)
241 {
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);
243 }
244
245 public static Message DownloadUrlNotSupportedForBAPayloads(SourceLineNumber sourceLineNumbers, string payloadId)
246 {
247 return Message(sourceLineNumbers, Ids.DownloadUrlNotSupportedForBAPayloads, "The BootstrapperApplication Payload '{0}' included a @DownloadUrl attribute. BootstrapperApplication Payloads cannot be downloaded so the download URL is being ignored.", payloadId);
248 }
249
250 public static Message DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
251 {
252 return Message(sourceLineNumbers, Ids.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions, "Component/@Id='{0}' with {2} '{3}' has a @Guid value '{1}' that duplicates another component in this package. This is not officially supported by Windows Installer and cannot be used when creating patches. It otherwise works as long as all components with the same GUID have mutually-exclusive conditions. It is recommended to give each component its own unique GUID.", componentId, guid, type, keyPath);
253 }
254
255 public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)
256 {
257 return Message(sourceLineNumbers, Ids.DuplicatePrimaryKey, "The primary key '{0}' is duplicated in table '{1}' and will be ignored. Please remove one of the entries or rename a part of the primary key to avoid the collision.", primaryKey, tableName);
258 }
259
260 public static Message EmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
261 {
262 return Message(sourceLineNumbers, Ids.EmptyAttributeValue, "The {0}/@{1} attribute's value cannot be an empty string. If you want the value to be null or empty, simply remove the entire attribute.", elementName, attributeName);
263 }
264
265 public static Message EmptyCabinet(SourceLineNumber sourceLineNumbers, string cabinetName, bool isPatch)
266 {
267 if (isPatch)
268 {
269 return Message(sourceLineNumbers, Ids.EmptyCabinet, "The cabinet '{0}' does not contain any files. If this patch contains no files, this warning can likely be safely ignored. Otherwise, try passing -p to torch.exe when first building the transforms, or add a ComponentRef to your PatchFamily authoring to pull changed files into the cabinet.", cabinetName, isPatch);
270 }
271
272 return Message(sourceLineNumbers, Ids.EmptyCabinet, "The cabinet '{0}' does not contain any files. If this installation contains no files, this warning can likely be safely ignored. Otherwise, please add files to the cabinet or remove it.", cabinetName);
273 }
274
275 public static Message ExpectedForeignRow(SourceLineNumber sourceLineNumbers, string tableName, string primaryKey, string columnName, string columnValue, string foreignTableName) 49 public static Message ExpectedForeignRow(SourceLineNumber sourceLineNumbers, string tableName, string primaryKey, string columnName, string columnValue, string foreignTableName)
276 { 50 {
277 return Message(sourceLineNumbers, Ids.ExpectedForeignRow, "The {0} table contains a row with primary key(s) '{1}' whose {2} column contains a value, '{3}', which specifies a foreign key relationship with the {4} table. However, since the expected foreign row specified by this value does not exist, this will result in some information being left out of the decompiled output.", tableName, primaryKey, columnName, columnValue, foreignTableName); 51 return Message(sourceLineNumbers, Ids.ExpectedForeignRow, "The {0} table contains a row with primary key(s) '{1}' whose {2} column contains a value, '{3}', which specifies a foreign key relationship with the {4} table. However, since the expected foreign row specified by this value does not exist, this will result in some information being left out of the decompiled output.", tableName, primaryKey, columnName, columnValue, foreignTableName);
@@ -282,375 +56,19 @@ namespace WixToolset.Data
282 return Message(sourceLineNumbers, Ids.ExpectedForeignRow, "The {0} table contains a row with primary key(s) '{1}' whose {2} and {4} columns contain the values, '{3}' and '{5}', which specify a foreign key relationship with the {6} table. However, since the expected foreign row specified by this value does not exist, this will result in some information being left out of the decompiled output.", tableName, primaryKey, columnName1, columnValue1, columnName2, columnValue2, foreignTableName); 56 return Message(sourceLineNumbers, Ids.ExpectedForeignRow, "The {0} table contains a row with primary key(s) '{1}' whose {2} and {4} columns contain the values, '{3}' and '{5}', which specify a foreign key relationship with the {6} table. However, since the expected foreign row specified by this value does not exist, this will result in some information being left out of the decompiled output.", tableName, primaryKey, columnName1, columnValue1, columnName2, columnValue2, foreignTableName);
283 } 57 }
284 58
285 public static Message ExternalCabsAreNotSigned(string databaseFile)
286 {
287 return Message(null, Ids.ExternalCabsAreNotSigned, "The installer database '{0}' has external cabs, but at least one of them is not signed. Please ensure that all external cabs are signed, if you mean to sign them. If you don't mean to sign them, there is no need to inscribe the MSI as part of your build.", databaseFile);
288 }
289
290 public static Message FailedToDeleteTempDir(string directory)
291 {
292 return Message(null, Ids.FailedToDeleteTempDir, "Failed to delete temporary directory: {0}", directory);
293 }
294
295 public static Message FileSearchFileNameIssue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
296 {
297 return Message(sourceLineNumbers, Ids.FileSearchFileNameIssue, "The {0} element's {1} and {2} attributes were found. Due to a bug with the Windows Installer, only the Name or LongName attribute should be used. Use the Name attribute for 8.3 compliant file names and the LongName attribute for longer ones. When using only the LongName attribute, ICE03 should be ignored for the Signature table's FileName column.", elementName, attributeName1, attributeName2);
298 }
299
300 public static Message GeneratedShortFileNameConflict(SourceLineNumber sourceLineNumbers, string shortFileName)
301 {
302 return Message(sourceLineNumbers, Ids.GeneratedShortFileNameConflict, "The short file name '{0}' was generated for multiple files that may be installed to the same directory. This could be due to conflicting long file names specified by the File/@Name attribute. If that is the case, please resolve the conflict in those attributes. Otherwise, please manually set the File/@ShortName attribute on the conflicting row to fix the collision. If one of the colliding files was added via a patch, that short file name should be specified manually to avoid disturbing the original short file name.", shortFileName);
303 }
304
305 public static Message GeneratedShortFileNameConflict2(SourceLineNumber sourceLineNumbers)
306 {
307 return Message(sourceLineNumbers, Ids.GeneratedShortFileNameConflict2, "The location of a conflicting generated short file name related to the previous warning.");
308 }
309
310 public static Message IdentifierCannotBeModularized(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string identifier, int length, int maximumLength)
311 {
312 return Message(sourceLineNumbers, Ids.IdentifierCannotBeModularized, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. It will be too long if modularized. The identifier shouldn't be longer than {4} characters long to allow for modularization (appending a guid for merge modules).", elementName, attributeName, identifier, length, maximumLength);
313 }
314
315 public static Message IdentifierTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
316 {
317 return Message(sourceLineNumbers, Ids.IdentifierTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for an identifier. Standard identifiers are 72 characters long or less.", elementName, attributeName, value);
318 }
319
320 public static Message IllegalActionInSequence(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
321 {
322 return Message(sourceLineNumbers, Ids.IllegalActionInSequence, "The {0} table contains an action '{1}' which is not allowed in this table. If this is a standard action then it is not valid for this table, if it is a custom action or dialog then this table does not accept actions of that type. This action will be left out of the decompiled output.", sequenceTableName, actionName);
323 }
324
325 public static Message IllegalColumnValue(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value) 59 public static Message IllegalColumnValue(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value)
326 { 60 {
327 return Message(sourceLineNumbers, Ids.IllegalColumnValue, "The {0}.{1} column's value, '{2}', is not a recognized legal value. This information will be left out of the decompiled output.", tableName, columnName, value); 61 return Message(sourceLineNumbers, Ids.IllegalColumnValue, "The {0}.{1} column's value, '{2}', is not a recognized legal value. This information will be left out of the decompiled output.", tableName, columnName, value);
328 } 62 }
329 63
330 public static Message IllegalRegistryKeyPath(SourceLineNumber sourceLineNumbers, string componentName, string registryId)
331 {
332 return Message(sourceLineNumbers, Ids.IllegalRegistryKeyPath, "Component '{0}' specifies an illegal registry keypath of '{1}'. Since this entry actually represents a registry key, not a registry value, it cannot be the keypath.", componentName, registryId);
333 }
334
335 public static Message ImplicitComponentPrimaryFeature(string componentId)
336 {
337 return Message(null, Ids.ImplicitComponentPrimaryFeature, "The component '{0}' does not have an explicit primary feature parent specified. If the source files are linked in a different order, the primary parent feature may change. To prevent accidental changes, the primary feature parent should be set to 'yes' in one of the ComponentRef/@Primary, ComponentGroupRef/@Primary, or FeatureGroupRef/@Primary locations for this component.", componentId);
338 }
339
340 public static Message ImplicitlyPerUser(SourceLineNumber sourceLineNumbers, string path)
341 {
342 return Message(sourceLineNumbers, Ids.ImplicitlyPerUser, "The MSI '{0}' does not explicitly indicate that it is a per-user package even though the ALLUSERS Property is blank. This suggests a per-user package so the Bundle will assume the package is per-user. If possible, use the Package/@InstallScope attribute to be explicit instead.", path);
343 }
344
345 public static Message ImplicitMergeModulePrimaryFeature(string componentId)
346 {
347 return Message(null, Ids.ImplicitMergeModulePrimaryFeature, "The merge module '{0}' does not have an explicit primary feature parent specified. If the source files are linked in a different order, the primary parent feature may change. To prevent accidental changes, the primary feature parent should be set to 'yes' in one of the MergeRef/@Primary or FeatureGroupRef/@Primary locations for this component.", componentId);
348 }
349
350 public static Message InvalidAttributeCombination(SourceLineNumber sourceLineNumbers, string attrib1, string attrib2, string name, string value)
351 {
352 return Message(sourceLineNumbers, Ids.InvalidAttributeCombination, "It is invalid to combine attributes {0} and {1}. The decompiled output will set attribute {2} to {3}.", attrib1, attrib2, name, value);
353 }
354
355 public static Message InvalidHigherInstallerVersionInModule(SourceLineNumber sourceLineNumbers, string moduleId, int moduleInstallerVersion, int packageInstallerVersion)
356 {
357 return Message(sourceLineNumbers, Ids.InvalidHigherInstallerVersionInModule, "Merge module '{0}' has an installer version of {1} which is greater than the package's installer version of {2}. Merging a module with a higher installer version than the package it is being merged into can result in invalid values in the resulting msi. You must set the Package/@InstallerVersion attribute to {1} or greater to merge this merge module into your package.", moduleId, moduleInstallerVersion, packageInstallerVersion);
358 }
359
360 public static Message InvalidFourPartVersion(SourceLineNumber sourceLineNumbers, string elementName, string version)
361 {
362 return Message(sourceLineNumbers, Ids.InvalidFourPartVersion, "Invalid {0}/@Version '{1}'. {0} version has a max value of \"65535.65535.65535.65535\" and must be all numeric.", elementName, version);
363 }
364
365 public static Message InvalidRemoveFile(SourceLineNumber sourceLineNumbers, string file, string component)
366 {
367 return Message(sourceLineNumbers, Ids.InvalidRemoveFile, "File '{0}' was removed from component '{1}'. Removing a file from a component will not result in the file being removed by a patch. You should author a RemoveFile element in your component to remove the file from the installation if you want the file to be removed.", file, component);
368 }
369
370 public static Message MajorUpgradePatchNotRecommended()
371 {
372 return Message(null, Ids.MajorUpgradePatchNotRecommended, "Changing the ProductCode in a patch is not recommended because the patch cannot be uninstalled nor can it be sequenced along with other patches for the target package. See https://learn.microsoft.com/en-us/windows/win32/msi/applying-major-upgrades-by-patching-the-local-installation-of-the-product for more information.");
373 }
374
375 public static Message MediaExternalCabinetFilenameIllegal(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
376 {
377 return Message(sourceLineNumbers, Ids.MediaExternalCabinetFilenameIllegal, "The {0}/@{1} attribute's value, '{2}', is not a valid external cabinet name. Legal cabinet names should follow 8.3 format: they should contain no more than 8 characters followed by an optional extension of no more than 3 characters. Any character except for the following may be used: \\ ? | > < : / * \" + , ; = [ ] (space). The Windows Installer team has recommended following the 8.3 format for external cabinet files and any other naming scheme is officially unsupported (which means it is not guaranteed to work on all platforms).", elementName, attributeName, value);
378 }
379
380 public static Message MergeRescheduledAction(SourceLineNumber sourceLineNumbers, string tableName, string actionName, string mergeModuleFile)
381 {
382 return Message(sourceLineNumbers, Ids.MergeRescheduledAction, "The {0} table contains an action '{1}' which cannot be merged from the merge module '{2}'. This action is likely colliding with an action in the database that is being created. The colliding action may have been authored in the database or merged in from another merge module. If this is a standard action, it is likely colliding due to a difference in the condition for the action in the database and merge module. If this is a custom action, it should only be declared in the database or one merge module.", tableName, actionName, mergeModuleFile);
383 }
384
385 public static Message MergeTableFailed(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile)
386 {
387 return Message(sourceLineNumbers, Ids.MergeTableFailed, "The {0} table contains a row with primary key(s) '{1}' which cannot be merged from the merge module '{2}'. This is likely due to collision of rows with the same primary key(s) (but other different values in other columns) between the database and the merge module.", tableName, primaryKeys, mergeModuleFile);
388 }
389
390 public static Message MissingUpgradeCode(SourceLineNumber sourceLineNumbers)
391 {
392 return Message(sourceLineNumbers, Ids.MissingUpgradeCode, "The Package/@UpgradeCode attribute was not found; it is strongly recommended to ensure that this package can be upgraded.");
393 }
394
395 public static Message MsiTransactionLimitations(SourceLineNumber sourceLineNumbers)
396 {
397 return Message(sourceLineNumbers, Ids.MsiTransactionLimitations, "MSI transactions have limitations that make it hard to use them successfully in a bundle. Test the bundle thoroughly, especially in upgrade scenarios and the scenario that required them in the first place.");
398 }
399
400 public static Message NestedInstall(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value)
401 {
402 return Message(sourceLineNumbers, Ids.NestedInstall, "The {0}.{1} column's value, '{2}', indicates a nested install. Nested installations are not supported by the WiX team. This action will be left out of the decompiled output.", tableName, columnName, value);
403 }
404
405 public static Message NewComponentAddedToExistingFeature(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath)
406 {
407 return Message(sourceLineNumbers, Ids.NewComponentAddedToExistingFeature, "Component '{0}' was added to feature '{1}' in the transform '{2}'. If you cannot guarantee that this feature will always be installed, you should consider adding new components to new top-level features to prevent prompts for source when installing this patch.", component, feature, transformPath);
408 }
409
410 public static Message NoPerMachineDependencies(SourceLineNumber sourceLineNumbers, string packageId)
411 {
412 return Message(sourceLineNumbers, Ids.NoPerMachineDependencies, "Bundle dependencies will not be registered on per-machine package '{0}' for a per-user bundle. Either make sure that all packages are installed per-machine, or author any per-machine dependencies as permanent packages.", packageId);
413 }
414
415 public static Message NotABinaryWixlib(string wixlib)
416 {
417 return Message(null, Ids.NotABinaryWixlib, "'{0}' is not a binary Wixlib and has no embedded files.", wixlib);
418 }
419
420 public static Message NullMsiAssemblyNameValue(SourceLineNumber sourceLineNumbers, string componentName, string name)
421 {
422 return Message(sourceLineNumbers, Ids.NullMsiAssemblyNameValue, "The assembly in component '{0}' has a null or empty {1} assembly name value.", componentName, name);
423 }
424
425 public static Message OrphanedProgId(SourceLineNumber sourceLineNumbers, string progId)
426 {
427 return Message(sourceLineNumbers, Ids.OrphanedProgId, "ProgId '{0}' is orphaned. It has no associated component, so it will never install. Every ProgId should have either a parent Class element or child Extension element (at any distance).", progId);
428 }
429
430 public static Message PackageCodeSet(SourceLineNumber sourceLineNumbers)
431 {
432 return Message(sourceLineNumbers, Ids.PackageCodeSet, "The Package/@Id attribute has been set. Setting this attribute will allow nonidentical .msi files to have the same package code. This may be a problem because the package code is the primary identifier used by the installer to search for and validate the correct package for a given installation. If a package is changed without changing the package code, the installer may not use the newer package if both are still accessible to the installer. Please remove the Id attribute in order to automatically generate a new package code for each new .msi file.");
433 }
434
435 public static Message PatchTable(SourceLineNumber sourceLineNumbers, string tableName)
436 {
437 return Message(sourceLineNumbers, Ids.PatchTable, "The {0} table is added to the install package by a transform from a patch package (.msp) and not authored directly into an install package (.msi). The information in this table will be left out of the decompiled output.", tableName);
438 }
439
440 public static Message PathCanonicalized(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string originalValue, string canonicalValue)
441 {
442 return Message(sourceLineNumbers, Ids.PathCanonicalized, "The {0}/@{1} attribute's value, '{2}', has been canonicalized to '{3}'.", elementName, attributeName, originalValue, canonicalValue);
443 }
444
445 public static Message PerUserButForcingPerMachine(SourceLineNumber sourceLineNumbers, string path)
446 {
447 return Message(sourceLineNumbers, Ids.PerUserButForcingPerMachine, "The MSI '{0}' is a per-user package being forced to per-machine. Verify that the MsiPackage/@ForcePerMachine attribute is expected and that the per-user package works correctly when forced to install per-machine.", path);
448 }
449
450 public static Message PlaceholderValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
451 {
452 return Message(sourceLineNumbers, Ids.PlaceholderValue, "The {0}/@{1} attribute's value, '{2}', is a placeholder value used in example files. Please replace this placeholder with the appropriate value.", elementName, attributeName, value);
453 }
454
455 public static Message PossiblyIncorrectTypelibVersion(SourceLineNumber sourceLineNumbers, string id)
456 {
457 return Message(sourceLineNumbers, Ids.PossiblyIncorrectTypelibVersion, "The Typelib table entry with Id '{0}' could have an incorrect version of '256.0'. InstallShield has a bug relating to the Typelib Version column: it will incorrectly set the value '65536' in to represent version '1.0'. However, this number actually corresponds to version '256.0'. This bug will not affect the typelib version that is registered during installation, however, it will prevent the Windows Installer from correctly identifying whether a typelib is already installed and lead to unnecessary reinstallations of the typelib.", id);
458 }
459
460 public static Message PreprocessorUnknownPragma(SourceLineNumber sourceLineNumbers, string pragmaName)
461 {
462 return Message(sourceLineNumbers, Ids.PreprocessorUnknownPragma, "The pragma '{0}' is unknown. Please ensure you have referenced the extension that defines this pragma.", pragmaName);
463 }
464
465 public static Message PreprocessorWarning(SourceLineNumber sourceLineNumbers, string message)
466 {
467 return Message(sourceLineNumbers, Ids.PreprocessorWarning, "{0}", message);
468 }
469
470 public static Message ProductIdAuthored(SourceLineNumber sourceLineNumbers)
471 {
472 return Message(sourceLineNumbers, Ids.ProductIdAuthored, "The 'ProductID' property should not be directly authored because it will prevent the ValidateProductID standard action from performing any validation during the installation. This property will be set by the ValidateProductID standard action or control event.");
473 }
474
475 public static Message PropertyModularizationSuppressed(SourceLineNumber sourceLineNumbers)
476 {
477 return Message(sourceLineNumbers, Ids.PropertyModularizationSuppressed, "The Property/@SuppressModularization attribute has been set to 'yes'. Using this functionality is strongly discouraged; it should only be necessary as a workaround of last resort in rare scenarios.");
478 }
479
480 public static Message PropertyUseless(SourceLineNumber sourceLineNumbers, string id)
481 {
482 return Message(sourceLineNumbers, Ids.PropertyUseless, "Property '{0}' does not contain a Value attribute and is not marked as Admin, Secure, or Hidden. The Property element is being ignored.", id);
483 }
484
485 public static Message PropertyValueContainsPropertyReference(SourceLineNumber sourceLineNumbers, string propertyId, string otherProperty)
486 {
487 return Message(sourceLineNumbers, Ids.PropertyValueContainsPropertyReference, "The '{0}' Property contains '[{1}]' in its value which is an illegal reference to another property. If this value is a string literal, not a property reference, please ignore this warning. To set a property with the value of another property, use a CustomAction with Property and Value attributes.", propertyId, otherProperty);
488 }
489
490 public static Message RelatedAttributeConditionallyIgnored(SourceLineNumber sourceLineNumbers, string recessiveAttribute, string dominantAttribute, string dominantValue)
491 {
492 return Message(sourceLineNumbers, Ids.RelatedAttributeConditionallyIgnored, "Ignoring attribute {0} because attribute {1} is set to {2}.", recessiveAttribute, dominantAttribute, dominantValue);
493 }
494
495 public static Message RemotePayloadsMustNotAlsoBeCompressed(SourceLineNumber sourceLineNumbers, string elementName)
496 {
497 return Message(sourceLineNumbers, Ids.RemotePayloadsMustNotAlsoBeCompressed, "The {0}/@Compressed attribute must have value 'no' when a RemotePayload child element is present. RemotePayload indicates that a package will always be downloaded and cannot be compressed into a bundle. To eliminate this warning, explicitly set the {0}/@Compressed attribute to 'no'.", elementName);
498 }
499
500 public static Message RemoveFileNameRequired(SourceLineNumber sourceLineNumbers)
501 {
502 return Message(sourceLineNumbers, Ids.RemoveFileNameRequired, "The RemoveFile/@Name attribute will soon become required. In order to match the old functionality of not specifying this attribute, please use the new RemoveFolder element instead.");
503 }
504
505 public static Message RequiresMsi200for64bitPackage(SourceLineNumber sourceLineNumbers)
506 {
507 return Message(sourceLineNumbers, Ids.RequiresMsi200for64bitPackage, "Package/@InstallerVersion must be 200 or greater for a 64-bit package. The value will be changed to 200. Please specify a value of 200 or greater in order to eliminate this warning.");
508 }
509
510 public static Message RequiresMsi500forArmPackage(SourceLineNumber sourceLineNumbers)
511 {
512 return Message(sourceLineNumbers, Ids.RequiresMsi500forArmPackage, "Package/@InstallerVersion must be 500 or greater for an ARM64 package. The value will be changed to 500. Please specify a value of 500 or greater in order to eliminate this warning.");
513 }
514
515 public static Message ReservedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
516 {
517 return Message(sourceLineNumbers, Ids.ReservedAttribute, "The {0}/@{1} attribute is reserved for future use and has no effect in this version of the WiX toolset.", elementName, attributeName);
518 }
519
520 public static Message RetainRangeMismatch(SourceLineNumber sourceLineNumbers, string fileId)
521 {
522 return Message(sourceLineNumbers, Ids.RetainRangeMismatch, "Mismatch in RetainRangeCounts for the file '{0}' - ignoring the retain ranges.", fileId);
523 }
524
525 public static Message ServiceConfigFamilyNotSupported(SourceLineNumber sourceLineNumbers, string elementName)
526 {
527 return Message(sourceLineNumbers, Ids.ServiceConfigFamilyNotSupported, "{0} functionality is documented in the Windows Installer SDK to \"not [work] as expected.\" Consider replacing {0} with the WixToolset.Util.wixext ServiceConfig element.", elementName);
528 }
529
530 public static Message SkippingMergeModuleTable(SourceLineNumber sourceLineNumbers, string tableName)
531 {
532 return Message(sourceLineNumbers, Ids.SkippingMergeModuleTable, "The {0} table can only be represented in WiX for merge modules. The information in this table will be left out of the decompiled output.", tableName);
533 }
534
535 public static Message StandardDirectoryConflictInMergeModule(SourceLineNumber sourceLineNumbers, string directory, string standardDirectory)
536 {
537 return Message(sourceLineNumbers, Ids.StandardDirectoryConflictInMergeModule, "The Directory '{0}' starts with the same Id as the standard folder in Windows Installer '{1}'. A directory Id that begins with the same Id as a standard folder that is in an MSM may encounter a conflict when merging the MSM into an MSI. This may result in the contents of this merge module being installed to an unexpected location. To eliminate this warning, change your directory Id to not start with the same Id as any standard folders.", directory, standardDirectory);
538 }
539
540 public static Message SuppressAction(SourceLineNumber sourceLineNumbers, string action, string sequenceName)
541 {
542 return Message(sourceLineNumbers, Ids.SuppressAction, "The action '{0}' in the {1} table is being suppressed.", action, sequenceName);
543 }
544
545 public static Message SuppressAction2(SourceLineNumber sourceLineNumbers)
546 {
547 return Message(sourceLineNumbers, Ids.SuppressAction2, "The location of the suppressed action related to previous warning.");
548 }
549
550 public static Message SuppressMergedAction(string action, string sequenceName)
551 {
552 return Message(null, Ids.SuppressMergedAction, "The merged action '{0}' in the {1} table is being suppressed.", action, sequenceName);
553 }
554
555 public static Message TableIncompatibleWithInstallerVersion(SourceLineNumber sourceLineNumbers, string tableName, int packageInstallerVersion)
556 {
557 return Message(sourceLineNumbers, Ids.TableIncompatibleWithInstallerVersion, "Using table '{0}' requires a version of Windows Installer greater than specified in your package ('{1}').", tableName, packageInstallerVersion);
558 }
559
560 public static Message TargetDirCorrectedDefaultDir()
561 {
562 return Message(null, Ids.TargetDirCorrectedDefaultDir, "The Directory with Id 'TARGETDIR' must have the value 'SourceDir' in its 'DefaultDir' column. This has been automatically corrected for you in the decompiled output.");
563 }
564
565 public static Message TooManyProgIds(SourceLineNumber sourceLineNumbers, string clsId, string progId, string otherClsId)
566 {
567 return Message(sourceLineNumbers, Ids.TooManyProgIds, "Class '{0}' tried to use ProgId '{1}' which has already been associated with class '{2}'. This information will be left out of the decompiled output.", clsId, progId, otherClsId);
568 }
569
570 public static Message SymbolNotTranslatedToOutput(IntermediateSymbol symbol)
571 {
572 var symbolString = $"SymbolName: '{symbol.Definition.Name}', Id: '{symbol.Id?.Id}'";
573 return Message(symbol.SourceLineNumbers, Ids.SymbolNotTranslatedToOutput, "The binder doesn't know how to place the following symbol into the output: {0}", symbolString);
574 }
575
576 public static Message UnableToFindFileFromCabOrImage(SourceLineNumber sourceLineNumbers, string existingFileSpec, string srcFileSpec)
577 {
578 return Message(sourceLineNumbers, Ids.UnableToFindFileFromCabOrImage, "Unable to find existing file {0} to place in src location {1}. Will likely cause a linker break.", existingFileSpec, srcFileSpec);
579 }
580
581 public static Message UnableToResetAcls(string error)
582 {
583 return Message(null, Ids.UnableToResetAcls, "Unable to reset acls on destination files. Exception detail: {0}", error);
584 }
585
586 public static Message UnavailableBundleConditionVariable(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string variable, string illegalValueList)
587 {
588 return Message(sourceLineNumbers, Ids.UnavailableBundleConditionVariable, "{0}/@{1} contains the built-in Variable '{2}', which is not available when it is evaluated. (Unavailable Variables are: {3}.). Rewrite the condition to avoid Variables that are never valid during its evaluation.", elementName, attributeName, variable, illegalValueList);
589 }
590
591 public static Message UnclearShortcut(SourceLineNumber sourceLineNumbers, string shortcutId, string fileId, string componentId)
592 {
593 return Message(sourceLineNumbers, Ids.UnclearShortcut, "Because it is an advertised shortcut, the target of shortcut '{0}' will be the keypath of component '{2}' rather than parent file '{1}'. To eliminate this warning, you can (1) make the Shortcut element a child of the File element that is the keypath of component '{2}', (2) make file '{1}' the keypath of component '{2}', or (3) remove the @Advertise attribute so the shortcut is a non-advertised shortcut.", shortcutId, fileId, componentId);
594 }
595
596 public static Message UnexpectedEntrySection(SourceLineNumber sourceLineNumbers, string sectionType, string expectedType)
597 {
598 return Message(sourceLineNumbers, Ids.UnexpectedEntrySection, "Found entry point <{0}> that does not match expected <{1}> output type. Verify that your source code is correct and matches the expected output type.", sectionType, expectedType);
599 }
600
601 public static Message UnexpectedTableInProduct(SourceLineNumber sourceLineNumbers, string tableName)
602 {
603 return Message(sourceLineNumbers, Ids.UnexpectedTableInProduct, "An unexpected row in the '{0}' table was found in this package. Packages should not contain the '{0}' table.", tableName);
604 }
605
606 public static Message UnknownAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
607 {
608 return Message(sourceLineNumbers, Ids.UnknownAction, "The {0} table contains an action '{1}' which is not a known custom action, dialog, or standard action. This action will be left out of the decompiled output.", sequenceTableName, actionName);
609 }
610
611 public static Message UnknownPermission(SourceLineNumber sourceLineNumbers, string tableName, string primaryKey, int bitPosition) 64 public static Message UnknownPermission(SourceLineNumber sourceLineNumbers, string tableName, string primaryKey, int bitPosition)
612 { 65 {
613 return Message(sourceLineNumbers, Ids.UnknownPermission, "The {0} table contains a row with primary key '{1}' which has an unknown permission at bit {2}.", tableName, primaryKey, bitPosition); 66 return Message(sourceLineNumbers, Ids.UnknownPermission, "The {0} table contains a row with primary key '{1}' which has an unknown permission at bit {2}.", tableName, primaryKey, bitPosition);
614 } 67 }
615 68
616 public static Message UnrepresentableColumnValue(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value) 69 public static Message DownloadUrlNotSupportedForBAPayloads(SourceLineNumber sourceLineNumbers, string payloadId)
617 {
618 return Message(sourceLineNumbers, Ids.UnrepresentableColumnValue, "The {0}.{1} column's value, '{2}', cannot currently be represented in the WiX schema.", tableName, columnName, value);
619 }
620
621 public static Message UnsupportedCommandLineArgument(string arg)
622 {
623 return Message(null, Ids.UnsupportedCommandLineArgument, "'{0}' is not a valid command line argument.", arg);
624 }
625
626 public static Message UnsupportedCommandLineArgumentValue(string arg, string value, string fallback)
627 {
628 return Message(null, Ids.UnsupportedCommandLineArgument, "The value '{0}' is not a valid value for command line argument '{1}'. Using the value '{2}' instead.", value, arg, fallback);
629 }
630
631 public static Message UpdateOfNonKeyPathFile(string nonKeyPathFileId, string componentId, string keyPathFileId)
632 {
633 return Message(null, Ids.UpdateOfNonKeyPathFile, "File '{0}' in Component '{1}' was changed, but the KeyPath file '{2}' was not. This file will not be patched on the target system if the REINSTALLMODE does not contain 'A'. The KeyPath file should also be changed and included in your patch.", nonKeyPathFileId, componentId, keyPathFileId);
634 }
635
636 public static Message UxPayloadsOnlySupportEmbedding(SourceLineNumber sourceLineNumbers, string sourceFile)
637 {
638 return Message(sourceLineNumbers, Ids.UxPayloadsOnlySupportEmbedding, "A bootstrapper application or bundle extension payload ('{0}') was marked for something other than embedded packaging, possibly because it included a @DownloadUrl attribute. Bootstrapper application and bundle extension payloads must be embedded in the bundle, so the requested packaging is being ignored and the file is being embedded anyway.", sourceFile);
639 }
640
641 public static Message ValidationFailedDueToSystemPolicy()
642 {
643 return Message(null, Ids.ValidationFailedDueToSystemPolicy, "Validation could not run due to system policy. To eliminate this warning, run the process as admin or suppress ICE validation.");
644 }
645
646 public static Message ValidationWarning(SourceLineNumber sourceLineNumbers, string ice, string message)
647 {
648 return Message(sourceLineNumbers, Ids.ValidationWarning, "{0}: {1}", ice, message);
649 }
650
651 public static Message VariableDeclarationCollision(SourceLineNumber sourceLineNumbers, string variableName, string variableValue, string variableCollidingValue)
652 { 70 {
653 return Message(sourceLineNumbers, Ids.VariableDeclarationCollision, "The variable '{0}' with value '{1}' was previously declared with value '{2}'.", variableName, variableValue, variableCollidingValue); 71 return Message(sourceLineNumbers, Ids.DownloadUrlNotSupportedForBAPayloads, "The BootstrapperApplication Payload '{0}' included a @DownloadUrl attribute. BootstrapperApplication Payloads cannot be downloaded so the download URL is being ignored.", payloadId);
654 } 72 }
655 73
656 public static Message InvalidMsiProductVersion(SourceLineNumber sourceLineNumbers, string version, string package) 74 public static Message InvalidMsiProductVersion(SourceLineNumber sourceLineNumbers, string version, string package)
@@ -669,14 +87,10 @@ namespace WixToolset.Data
669 version); 87 version);
670 } 88 }
671 89
672 public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType) 90 public static Message SymbolNotTranslatedToOutput(IntermediateSymbol symbol)
673 {
674 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);
675 }
676
677 public static Message InvalidEnvironmentVariable(string environmentVariable, string value, string defaultValue)
678 { 91 {
679 return Message(null, Ids.InvalidEnvironmentVariable, "The {0} environment variable is set to an invalid value of '{1}'. The default value '{2}' will be used instead.", environmentVariable, value, defaultValue); 92 var symbolString = $"SymbolName: '{symbol.Definition.Name}', Id: '{symbol.Id?.Id}'";
93 return Message(symbol.SourceLineNumbers, Ids.SymbolNotTranslatedToOutput, "The binder doesn't know how to place the following symbol into the output: {0}", symbolString);
680 } 94 }
681 95
682 public static Message WindowsInstallerFileTooLarge(SourceLineNumber sourceLineNumbers, string path, string fileDescription) 96 public static Message WindowsInstallerFileTooLarge(SourceLineNumber sourceLineNumbers, string path, string fileDescription)
@@ -689,154 +103,23 @@ namespace WixToolset.Data
689 return Message(sourceLineNumbers, Ids.WindowsInstallerFileTooLarge, "The Windows Installer does not support {0} files larger than 2GB in size. Reduce the size or number of files embedded in '{1}' or the installation will likely fail with an unexpected error.", fileDescription, path); 103 return Message(sourceLineNumbers, Ids.WindowsInstallerFileTooLarge, "The Windows Installer does not support {0} files larger than 2GB in size. Reduce the size or number of files embedded in '{1}' or the installation will likely fail with an unexpected error.", fileDescription, path);
690 } 104 }
691 105
692 public static Message InvalidWixVersion(SourceLineNumber sourceLineNumbers, string version, string elementName, string attributeName)
693 {
694 return Message(sourceLineNumbers, Ids.InvalidWixVersion, "Invalid WixVersion '{0}' in {1}/@'{2}'. Comparisons may yield unexpected results.", version, elementName, attributeName);
695 }
696
697 public static Message VBScriptIsDeprecated(SourceLineNumber sourceLineNumbers)
698 {
699 return Message(sourceLineNumbers, Ids.VBScriptIsDeprecated, "VBScript is a deprecated Windows component: https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features. VBScript custom actions might fail on some Windows systems. Rewrite or eliminate VBScript custom actions for best compatibility.");
700 }
701
702 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 106 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
703 { 107 {
704 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); 108 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
705 } 109 }
706 110
707 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
708 {
709 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args);
710 }
711
712 public enum Ids 111 public enum Ids
713 { 112 {
714 IdentifierCannotBeModularized = 1000,
715 EmptyAttributeValue = 1001,
716 UnableToFindFileFromCabOrImage = 1002,
717 CopyFileFileIdUseless = 1003,
718 NestedInstall = 1004,
719 OrphanedProgId = 1005,
720 PropertyUseless = 1006,
721 RemoveFileNameRequired = 1007,
722 SuppressAction = 1008,
723 SuppressMergedAction = 1009,
724 TargetDirCorrectedDefaultDir = 1010,
725 AccessDeniedForDeletion = 1011,
726 DirectoryInUse = 1012,
727 AccessDeniedForSettingAttributes = 1013,
728 UnknownAction = 1024,
729 IdentifierTooLong = 1026,
730 UnknownPermission = 1030, 113 UnknownPermission = 1030,
731 DirectoryRedundantNames = 1031,
732 UnableToResetAcls = 1032,
733 MediaExternalCabinetFilenameIllegal = 1033,
734 DeprecatedPreProcVariable = 1034,
735 FileSearchFileNameIssue = 1043,
736 AmbiguousFileOrDirectoryName = 1044,
737 PossiblyIncorrectTypelibVersion = 1048,
738 ImplicitComponentPrimaryFeature = 1049,
739 ActionSequenceCollision = 1050,
740 ActionSequenceCollision2 = 1051,
741 SuppressAction2 = 1052,
742 UnexpectedTableInProduct = 1053,
743 DeprecatedAttribute = 1054, 114 DeprecatedAttribute = 1054,
744 MergeRescheduledAction = 1055,
745 MergeTableFailed = 1056,
746 DecompiledStandardActionRelativelyScheduledInModule = 1057,
747 IllegalActionInSequence = 1058,
748 ExpectedForeignRow = 1059, 115 ExpectedForeignRow = 1059,
749 DecompilingAsCustomTable = 1060,
750 SkippingMergeModuleTable = 1062,
751 UnrepresentableColumnValue = 1064,
752 DeprecatedTable = 1065,
753 PatchTable = 1066,
754 IllegalColumnValue = 1067, 116 IllegalColumnValue = 1067,
755 DeprecatedLongNameAttribute = 1069,
756 GeneratedShortFileNameConflict = 1070,
757 GeneratedShortFileNameConflict2 = 1071,
758 DangerousTableInMergeModule = 1072,
759 DeprecatedLocalizationVariablePrefix = 1073,
760 PlaceholderValue = 1074,
761 MissingUpgradeCode = 1075,
762 ValidationWarning = 1076,
763 PropertyValueContainsPropertyReference = 1077,
764 DeprecatedUpgradeProperty = 1078,
765 EmptyCabinet = 1079,
766 DeprecatedRegistryElement = 1080,
767 IllegalRegistryKeyPath = 1081,
768 ProductIdAuthored = 1083,
769 ImplicitMergeModulePrimaryFeature = 1084,
770 DeprecatedIgnoreModularizationElement = 1085,
771 PropertyModularizationSuppressed = 1086,
772 DeprecatedPackageCompressedAttribute = 1087,
773 DeprecatedQuestionMarksGuid = 1090,
774 PackageCodeSet = 1091,
775 InvalidFourPartVersion = 1093,
776 InvalidRemoveFile = 1095,
777 PreprocessorWarning = 1096,
778 UpdateOfNonKeyPathFile = 1097,
779 UnsupportedCommandLineArgument = 1098,
780 MajorUpgradePatchNotRecommended = 1099,
781 RetainRangeMismatch = 1100,
782 DefaultLanguageUsedForVersionedFile = 1101,
783 DefaultLanguageUsedForUnversionedFile = 1102,
784 DefaultVersionUsedForUnversionedFile = 1103,
785 InvalidHigherInstallerVersionInModule = 1104,
786 ValidationFailedDueToSystemPolicy = 1105,
787 ColumnsIncompatibleWithInstallerVersion = 1106,
788 TableIncompatibleWithInstallerVersion = 1107,
789 DeprecatedCommandLineSwitch = 1108,
790 UnexpectedEntrySection = 1109,
791 NewComponentAddedToExistingFeature = 1110,
792 DeprecatedAttributeValue = 1111, 117 DeprecatedAttributeValue = 1111,
793 UnclearShortcut = 1113,
794 TooManyProgIds = 1114,
795 BadColumnDataIgnored = 1115,
796 NullMsiAssemblyNameValue = 1116,
797 InvalidAttributeCombination = 1117,
798 VariableDeclarationCollision = 1118,
799 DuplicatePrimaryKey = 1119,
800 RequiresMsi200for64bitPackage = 1121,
801 ExternalCabsAreNotSigned = 1122,
802 FailedToDeleteTempDir = 1123,
803 StandardDirectoryConflictInMergeModule = 1124,
804 PreprocessorUnknownPragma = 1125,
805 DeprecatedComponentGroupId = 1126,
806 UxPayloadsOnlySupportEmbedding = 1127,
807 DiscardedRollbackBoundary = 1129,
808 DeprecatedElement = 1130, 118 DeprecatedElement = 1130,
809 CannotUpdateCabCache = 1131,
810 DownloadUrlNotSupportedForBAPayloads = 1132, 119 DownloadUrlNotSupportedForBAPayloads = 1132,
811 DiscouragedAllUsersValue = 1133,
812 ImplicitlyPerUser = 1134,
813 PerUserButForcingPerMachine = 1135,
814 AttributeShouldContain = 1136,
815 DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions = 1137,
816 DeprecatedRegistryKeyActionAttribute = 1138,
817 NotABinaryWixlib = 1139,
818 NoPerMachineDependencies = 1140,
819 DownloadUrlNotSupportedForAttachedContainers = 1141,
820 ReservedAttribute = 1142,
821 RequiresMsi500forArmPackage = 1143,
822 RemotePayloadsMustNotAlsoBeCompressed = 1144,
823 AllChangesIncludedInPatch = 1145,
824 RelatedAttributeConditionallyIgnored = 1146,
825 BackslashTerminateInlineDirectorySyntax = 1147,
826 InvalidMsiProductVersion = 1148, 120 InvalidMsiProductVersion = 1148,
827 ServiceConfigFamilyNotSupported = 1149,
828 SymbolNotTranslatedToOutput = 1150, 121 SymbolNotTranslatedToOutput = 1150,
829 MsiTransactionLimitations = 1151,
830 PathCanonicalized = 1152,
831 DetectConditionRecommended = 1153,
832 CollidingModularizationTypes = 1156,
833 InvalidEnvironmentVariable = 1157,
834 WindowsInstallerFileTooLarge = 1158, 122 WindowsInstallerFileTooLarge = 1158,
835 UnavailableBundleConditionVariable = 1159,
836 DiscardedRollbackBoundary2 = 1160,
837 ExePackageDetectInformationRecommended = 1161,
838 InvalidWixVersion = 1162,
839 VBScriptIsDeprecated = 1163,
840 } 123 }
841 } 124 }
842} 125}
diff --git a/src/ext/Util/wixext/UtilDecompiler.cs b/src/ext/Util/wixext/UtilDecompiler.cs
index fb6d02e5..55bb39c9 100644
--- a/src/ext/Util/wixext/UtilDecompiler.cs
+++ b/src/ext/Util/wixext/UtilDecompiler.cs
@@ -292,7 +292,7 @@ namespace WixToolset.Util
292 break; 292 break;
293 293
294 default: 294 default:
295 this.Messaging.Write(WarningMessages.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "InstallMode", installMode)); 295 this.Messaging.Write(UtilWarnings.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "InstallMode", installMode));
296 break; 296 break;
297 } 297 }
298 298
@@ -347,7 +347,7 @@ namespace WixToolset.Util
347 break; 347 break;
348 348
349 default: 349 default:
350 this.Messaging.Write(WarningMessages.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "Attributes", attributes)); 350 this.Messaging.Write(UtilWarnings.UnrepresentableColumnValue(row.SourceLineNumbers, table.Name, "Attributes", attributes));
351 break; 351 break;
352 } 352 }
353 353
diff --git a/src/ext/Util/wixext/UtilWarnings.cs b/src/ext/Util/wixext/UtilWarnings.cs
index b65abe45..d0d22647 100644
--- a/src/ext/Util/wixext/UtilWarnings.cs
+++ b/src/ext/Util/wixext/UtilWarnings.cs
@@ -18,6 +18,11 @@ namespace WixToolset.Util
18 return Message(sourceLineNumbers, Ids.RequiredAttributeForWindowsXP, "The {0}/@{1} attribute must be specified to successfully install on Windows XP. You can ignore this warning if this installation does not install on Windows XP.", elementName, attributeName); 18 return Message(sourceLineNumbers, Ids.RequiredAttributeForWindowsXP, "The {0}/@{1} attribute must be specified to successfully install on Windows XP. You can ignore this warning if this installation does not install on Windows XP.", elementName, attributeName);
19 } 19 }
20 20
21 public static Message UnrepresentableColumnValue(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value)
22 {
23 return Message(sourceLineNumbers, Ids.UnrepresentableColumnValue, "The {0}.{1} column's value, '{2}', cannot currently be represented in the WiX schema.", tableName, columnName, value);
24 }
25
21 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 26 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
22 { 27 {
23 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); 28 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
@@ -30,6 +35,7 @@ namespace WixToolset.Util
30 35
31 public enum Ids 36 public enum Ids
32 { 37 {
38 UnrepresentableColumnValue = 1064,
33 DeprecatedPerfCounterElement = 5153, 39 DeprecatedPerfCounterElement = 5153,
34 RequiredAttributeForWindowsXP = 5154, 40 RequiredAttributeForWindowsXP = 5154,
35 } 41 }
diff --git a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
index 83dfb606..64e65a55 100644
--- a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
@@ -613,7 +613,7 @@ namespace WixToolset.Core.Burn
613 !facade.PackageSymbol.Permanent && 613 !facade.PackageSymbol.Permanent &&
614 dependencySymbolsById.ContainsKey(facade.PackageId)) 614 dependencySymbolsById.ContainsKey(facade.PackageId))
615 { 615 {
616 this.Messaging.Write(WarningMessages.NoPerMachineDependencies(facade.PackageSymbol.SourceLineNumbers, facade.PackageId)); 616 this.Messaging.Write(BurnBackendWarnings.NoPerMachineDependencies(facade.PackageSymbol.SourceLineNumbers, facade.PackageId));
617 } 617 }
618 } 618 }
619 } 619 }
diff --git a/src/wix/WixToolset.Core.Burn/Bind/ResolveDownloadUrlsCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/ResolveDownloadUrlsCommand.cs
index c678b114..d65aac21 100644
--- a/src/wix/WixToolset.Core.Burn/Bind/ResolveDownloadUrlsCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bind/ResolveDownloadUrlsCommand.cs
@@ -51,7 +51,7 @@ namespace WixToolset.Core.Burn.Bind
51 { 51 {
52 if (!String.IsNullOrEmpty(container.DownloadUrl)) 52 if (!String.IsNullOrEmpty(container.DownloadUrl))
53 { 53 {
54 this.Messaging.Write(WarningMessages.DownloadUrlNotSupportedForAttachedContainers(container.SourceLineNumbers, container.Id.Id)); 54 this.Messaging.Write(BurnBackendWarnings.DownloadUrlNotSupportedForAttachedContainers(container.SourceLineNumbers, container.Id.Id));
55 } 55 }
56 } 56 }
57 } 57 }
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
index 18227ad7..8b31d10f 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
@@ -67,7 +67,7 @@ namespace WixToolset.Core.Burn.Bundles
67 if (insideMsiTransaction && !warnedMsiTransaction) 67 if (insideMsiTransaction && !warnedMsiTransaction)
68 { 68 {
69 warnedMsiTransaction = true; 69 warnedMsiTransaction = true;
70 this.Messaging.Write(WarningMessages.MsiTransactionLimitations(pendingRollbackBoundary.SourceLineNumbers)); 70 this.Messaging.Write(BurnBackendWarnings.MsiTransactionLimitations(pendingRollbackBoundary.SourceLineNumbers));
71 } 71 }
72 72
73 usedBoundaries.Add(pendingRollbackBoundary); 73 usedBoundaries.Add(pendingRollbackBoundary);
@@ -107,8 +107,8 @@ namespace WixToolset.Core.Burn.Bundles
107 var nextRollbackBoundary = boundariesById[groupSymbol.ChildId]; 107 var nextRollbackBoundary = boundariesById[groupSymbol.ChildId];
108 if (null != pendingRollbackBoundary && pendingRollbackBoundary.Id.Id != BurnConstants.BundleDefaultBoundaryId) 108 if (null != pendingRollbackBoundary && pendingRollbackBoundary.Id.Id != BurnConstants.BundleDefaultBoundaryId)
109 { 109 {
110 this.Messaging.Write(WarningMessages.DiscardedRollbackBoundary(nextRollbackBoundary.SourceLineNumbers, nextRollbackBoundary.Id.Id)); 110 this.Messaging.Write(BurnBackendWarnings.DiscardedRollbackBoundary(nextRollbackBoundary.SourceLineNumbers, nextRollbackBoundary.Id.Id));
111 this.Messaging.Write(WarningMessages.DiscardedRollbackBoundary2(lastRollbackBoundary.SourceLineNumbers)); 111 this.Messaging.Write(BurnBackendWarnings.DiscardedRollbackBoundary2(lastRollbackBoundary.SourceLineNumbers));
112 } 112 }
113 else 113 else
114 { 114 {
@@ -120,7 +120,7 @@ namespace WixToolset.Core.Burn.Bundles
120 120
121 if (null != pendingRollbackBoundary) 121 if (null != pendingRollbackBoundary)
122 { 122 {
123 this.Messaging.Write(WarningMessages.DiscardedRollbackBoundary(pendingRollbackBoundary.SourceLineNumbers, pendingRollbackBoundary.Id.Id)); 123 this.Messaging.Write(BurnBackendWarnings.DiscardedRollbackBoundary(pendingRollbackBoundary.SourceLineNumbers, pendingRollbackBoundary.Id.Id));
124 } 124 }
125 125
126 // With the forward rollback boundaries assigned, we can now go 126 // With the forward rollback boundaries assigned, we can now go
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/PerformBundleBackendValidationCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/PerformBundleBackendValidationCommand.cs
index 01df9f32..c7c92a64 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/PerformBundleBackendValidationCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/PerformBundleBackendValidationCommand.cs
@@ -117,7 +117,7 @@ namespace WixToolset.Core.Burn.Bundles
117 { 117 {
118 if (!this.BackendHelper.IsValidWixVersion(symbol.ArpDisplayVersion)) 118 if (!this.BackendHelper.IsValidWixVersion(symbol.ArpDisplayVersion))
119 { 119 {
120 this.Messaging.Write(WarningMessages.InvalidWixVersion(symbol.SourceLineNumbers, symbol.ArpDisplayVersion, "ArpEntry", "Version")); 120 this.Messaging.Write(BurnBackendWarnings.InvalidWixVersion(symbol.SourceLineNumbers, symbol.ArpDisplayVersion, "ArpEntry", "Version"));
121 } 121 }
122 } 122 }
123 } 123 }
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
index 783c9f6b..8b370b90 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
@@ -294,7 +294,7 @@ namespace WixToolset.Core.Burn.Bundles
294 { 294 {
295 if (!perMachine) 295 if (!perMachine)
296 { 296 {
297 this.Messaging.Write(WarningMessages.PerUserButForcingPerMachine(this.PackagePayload.SourceLineNumbers, this.PackageId)); 297 this.Messaging.Write(BurnBackendWarnings.PerUserButForcingPerMachine(this.PackagePayload.SourceLineNumbers, this.PackageId));
298 this.ChainPackage.PerMachine = true; // ensure that we think the package is per-machine. 298 this.ChainPackage.PerMachine = true; // ensure that we think the package is per-machine.
299 } 299 }
300 300
@@ -308,7 +308,7 @@ namespace WixToolset.Core.Burn.Bundles
308 // Not forced per-machine and no ALLUSERS property, flip back to per-user. 308 // Not forced per-machine and no ALLUSERS property, flip back to per-user.
309 if (perMachine) 309 if (perMachine)
310 { 310 {
311 this.Messaging.Write(WarningMessages.ImplicitlyPerUser(this.ChainPackage.SourceLineNumbers, this.PackageId)); 311 this.Messaging.Write(BurnBackendWarnings.ImplicitlyPerUser(this.ChainPackage.SourceLineNumbers, this.PackageId));
312 this.ChainPackage.PerMachine = false; 312 this.ChainPackage.PerMachine = false;
313 } 313 }
314 } 314 }
@@ -321,7 +321,7 @@ namespace WixToolset.Core.Burn.Bundles
321 } 321 }
322 else if (allusers.Equals("2", StringComparison.Ordinal)) 322 else if (allusers.Equals("2", StringComparison.Ordinal))
323 { 323 {
324 this.Messaging.Write(WarningMessages.DiscouragedAllUsersValue(this.ChainPackage.SourceLineNumbers, this.PackageId, perMachine ? "machine" : "user")); 324 this.Messaging.Write(BurnBackendWarnings.DiscouragedAllUsersValue(this.ChainPackage.SourceLineNumbers, this.PackageId, perMachine ? "machine" : "user"));
325 } 325 }
326 else 326 else
327 { 327 {
diff --git a/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs b/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs
index 9c7cde13..ab045981 100644
--- a/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs
+++ b/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs
@@ -51,6 +51,51 @@ namespace WixToolset.Core.Burn
51 return Message(sourceLineNumbers, Ids.UnknownMsiPackagePlatform, "The MsiPackage '{0}' has an unknown platform: '{1}'. It is assumed to be 64-bit.", msiPath, platform); 51 return Message(sourceLineNumbers, Ids.UnknownMsiPackagePlatform, "The MsiPackage '{0}' has an unknown platform: '{1}'. It is assumed to be 64-bit.", msiPath, platform);
52 } 52 }
53 53
54 public static Message DiscardedRollbackBoundary(SourceLineNumber sourceLineNumbers, string rollbackBoundaryId)
55 {
56 return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary, "The RollbackBoundary '{0}' was discarded because it was not followed by a package. Without a package the rollback boundary doesn't do anything. Verify that the RollbackBoundary element is not followed by another RollbackBoundary and that the element is not at the end of the chain.", rollbackBoundaryId);
57 }
58
59 public static Message DiscardedRollbackBoundary2(SourceLineNumber sourceLineNumbers)
60 {
61 return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary2, "Location of rollback boundary related to previous warning.");
62 }
63
64 public static Message DiscouragedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string machineOrUser)
65 {
66 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, use the Package/@Scope attribute values 'perUser' or 'perMachine' instead.", path, machineOrUser);
67 }
68
69 public static Message DownloadUrlNotSupportedForAttachedContainers(SourceLineNumber sourceLineNumbers, string containerId)
70 {
71 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);
72 }
73
74 public static Message ImplicitlyPerUser(SourceLineNumber sourceLineNumbers, string path)
75 {
76 return Message(sourceLineNumbers, Ids.ImplicitlyPerUser, "The MSI '{0}' does not explicitly indicate that it is a per-user package even though the ALLUSERS Property is blank. This suggests a per-user package so the Bundle will assume the package is per-user. If possible, use the Package/@InstallScope attribute to be explicit instead.", path);
77 }
78
79 public static Message MsiTransactionLimitations(SourceLineNumber sourceLineNumbers)
80 {
81 return Message(sourceLineNumbers, Ids.MsiTransactionLimitations, "MSI transactions have limitations that make it hard to use them successfully in a bundle. Test the bundle thoroughly, especially in upgrade scenarios and the scenario that required them in the first place.");
82 }
83
84 public static Message NoPerMachineDependencies(SourceLineNumber sourceLineNumbers, string packageId)
85 {
86 return Message(sourceLineNumbers, Ids.NoPerMachineDependencies, "Bundle dependencies will not be registered on per-machine package '{0}' for a per-user bundle. Either make sure that all packages are installed per-machine, or author any per-machine dependencies as permanent packages.", packageId);
87 }
88
89 public static Message PerUserButForcingPerMachine(SourceLineNumber sourceLineNumbers, string path)
90 {
91 return Message(sourceLineNumbers, Ids.PerUserButForcingPerMachine, "The MSI '{0}' is a per-user package being forced to per-machine. Verify that the MsiPackage/@ForcePerMachine attribute is expected and that the per-user package works correctly when forced to install per-machine.", path);
92 }
93
94 public static Message InvalidWixVersion(SourceLineNumber sourceLineNumbers, string version, string elementName, string attributeName)
95 {
96 return Message(sourceLineNumbers, Ids.InvalidWixVersion, "Invalid WixVersion '{0}' in {1}/@'{2}'. Comparisons may yield unexpected results.", version, elementName, attributeName);
97 }
98
54 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 99 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
55 { 100 {
56 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); 101 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
@@ -58,6 +103,15 @@ namespace WixToolset.Core.Burn
58 103
59 public enum Ids 104 public enum Ids
60 { 105 {
106 DiscardedRollbackBoundary = 1129,
107 DiscouragedAllUsersValue = 1133,
108 ImplicitlyPerUser = 1134,
109 PerUserButForcingPerMachine = 1135,
110 NoPerMachineDependencies = 1140,
111 DownloadUrlNotSupportedForAttachedContainers = 1141,
112 MsiTransactionLimitations = 1151,
113 DiscardedRollbackBoundary2 = 1160,
114 InvalidWixVersion = 1162,
61 AttachedContainerPayloadCollision = 8500, 115 AttachedContainerPayloadCollision = 8500,
62 AttachedContainerPayloadCollision2 = 8501, 116 AttachedContainerPayloadCollision2 = 8501,
63 EmptyContainer = 8502, 117 EmptyContainer = 8502,
diff --git a/src/wix/WixToolset.Core.Native/NativeWarnings.cs b/src/wix/WixToolset.Core.Native/NativeWarnings.cs
new file mode 100644
index 00000000..215f7a40
--- /dev/null
+++ b/src/wix/WixToolset.Core.Native/NativeWarnings.cs
@@ -0,0 +1,24 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset.Core.Native
4{
5 using WixToolset.Data;
6
7 internal static class NativeWarnings
8 {
9 public static Message ValidationFailedDueToSystemPolicy()
10 {
11 return Message(null, Ids.ValidationFailedDueToSystemPolicy, "Validation could not run due to system policy. To eliminate this warning, run the process as admin or suppress ICE validation.");
12 }
13
14 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
15 {
16 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
17 }
18
19 public enum Ids
20 {
21 ValidationFailedDueToSystemPolicy = 1105,
22 }
23 }
24}
diff --git a/src/wix/WixToolset.Core.Native/WindowsInstallerValidator.cs b/src/wix/WixToolset.Core.Native/WindowsInstallerValidator.cs
index 434b0887..b62cb225 100644
--- a/src/wix/WixToolset.Core.Native/WindowsInstallerValidator.cs
+++ b/src/wix/WixToolset.Core.Native/WindowsInstallerValidator.cs
@@ -258,7 +258,7 @@ namespace WixToolset.Core.Native
258 } 258 }
259 else if (0x659 == e.NativeErrorCode) 259 else if (0x659 == e.NativeErrorCode)
260 { 260 {
261 this.Callback.WriteMessage(WarningMessages.ValidationFailedDueToSystemPolicy()); 261 this.Callback.WriteMessage(NativeWarnings.ValidationFailedDueToSystemPolicy());
262 } 262 }
263 else 263 else
264 { 264 {
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
index ad0b2425..f95dd0ac 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
@@ -117,7 +117,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
117 { 117 {
118 processorCount = 1; 118 processorCount = 1;
119 119
120 this.Messaging.Write(WarningMessages.InvalidEnvironmentVariable("NUMBER_OF_PROCESSORS", Environment.ProcessorCount.ToString(), processorCount.ToString())); 120 this.Messaging.Write(WindowsInstallerBackendWarnings.InvalidEnvironmentVariable("NUMBER_OF_PROCESSORS", Environment.ProcessorCount.ToString(), processorCount.ToString()));
121 } 121 }
122 122
123 // If the cabbing thread count was provided, and it isn't more than double the number of processors, use it. 123 // If the cabbing thread count was provided, and it isn't more than double the number of processors, use it.
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
index acfaa793..0de70e00 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
@@ -133,7 +133,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
133 var cabinetName = mediaSymbol.Cabinet.TrimStart('#'); 133 var cabinetName = mediaSymbol.Cabinet.TrimStart('#');
134 134
135 // If building a patch, remind them to run -p for torch. 135 // If building a patch, remind them to run -p for torch.
136 this.Messaging.Write(WarningMessages.EmptyCabinet(mediaSymbol.SourceLineNumbers, cabinetName, OutputType.Patch == data.Type)); 136 this.Messaging.Write(WindowsInstallerBackendWarnings.EmptyCabinet(mediaSymbol.SourceLineNumbers, cabinetName, OutputType.Patch == data.Type));
137 } 137 }
138 138
139 var resolvedCabinet = this.cabinetResolver.ResolveCabinet(intermediateCabinetPath, fileFacades); 139 var resolvedCabinet = this.cabinetResolver.ResolveCabinet(intermediateCabinetPath, fileFacades);
@@ -160,7 +160,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
160 } 160 }
161 catch (Exception e) 161 catch (Exception e)
162 { 162 {
163 this.Messaging.Write(WarningMessages.CannotUpdateCabCache(mediaSymbol.SourceLineNumbers, resolvedCabinet.Path, e.Message)); 163 this.Messaging.Write(WindowsInstallerBackendWarnings.CannotUpdateCabCache(mediaSymbol.SourceLineNumbers, resolvedCabinet.Path, e.Message));
164 } 164 }
165 } 165 }
166 166
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs
index 8b77a8bc..355661bf 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs
@@ -386,7 +386,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
386 if (RowOperation.Modify == row.Operation && 386 if (RowOperation.Modify == row.Operation &&
387 "ProductCode".Equals(row.FieldAsString(0), StringComparison.Ordinal)) 387 "ProductCode".Equals(row.FieldAsString(0), StringComparison.Ordinal))
388 { 388 {
389 this.Messaging.Write(WarningMessages.MajorUpgradePatchNotRecommended()); 389 this.Messaging.Write(WindowsInstallerBackendWarnings.MajorUpgradePatchNotRecommended());
390 } 390 }
391 } 391 }
392 } 392 }
@@ -506,7 +506,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
506 506
507 if (!foundRemoveFileEntry) 507 if (!foundRemoveFileEntry)
508 { 508 {
509 this.Messaging.Write(WarningMessages.InvalidRemoveFile(row.SourceLineNumbers, fileId, componentId)); 509 this.Messaging.Write(WindowsInstallerBackendWarnings.InvalidRemoveFile(row.SourceLineNumbers, fileId, componentId));
510 } 510 }
511 } 511 }
512 } 512 }
@@ -567,7 +567,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
567 // Features may not be present if not referenced 567 // Features may not be present if not referenced
568 if (!featureOps.ContainsKey(feature_) || RowOperation.Add != (RowOperation)featureOps[feature_]) 568 if (!featureOps.ContainsKey(feature_) || RowOperation.Add != (RowOperation)featureOps[feature_])
569 { 569 {
570 this.Messaging.Write(WarningMessages.NewComponentAddedToExistingFeature(row.SourceLineNumbers, component_, feature_, transformPath)); 570 this.Messaging.Write(WindowsInstallerBackendWarnings.NewComponentAddedToExistingFeature(row.SourceLineNumbers, component_, feature_, transformPath));
571 } 571 }
572 } 572 }
573 } 573 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
index e565bbb5..d154831e 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
@@ -553,7 +553,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
553 { 553 {
554 if (directoryId.StartsWith(standardDirectoryId, StringComparison.Ordinal)) 554 if (directoryId.StartsWith(standardDirectoryId, StringComparison.Ordinal))
555 { 555 {
556 this.Messaging.Write(WarningMessages.StandardDirectoryConflictInMergeModule(symbol.SourceLineNumbers, directoryId, standardDirectoryId)); 556 this.Messaging.Write(WindowsInstallerBackendWarnings.StandardDirectoryConflictInMergeModule(symbol.SourceLineNumbers, directoryId, standardDirectoryId));
557 } 557 }
558 } 558 }
559 } 559 }
@@ -1396,10 +1396,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1396 { 1396 {
1397 foreach (var conflicts in this.GeneratedShortNames.Values.Where(l => l.Count > 1)) 1397 foreach (var conflicts in this.GeneratedShortNames.Values.Where(l => l.Count > 1))
1398 { 1398 {
1399 this.Messaging.Write(WarningMessages.GeneratedShortFileNameConflict(conflicts[0].SourceLineNumbers, conflicts[0].ShortName)); 1399 this.Messaging.Write(WindowsInstallerBackendWarnings.GeneratedShortFileNameConflict(conflicts[0].SourceLineNumbers, conflicts[0].ShortName));
1400 for (var i = 1; i < conflicts.Count; ++i) 1400 for (var i = 1; i < conflicts.Count; ++i)
1401 { 1401 {
1402 this.Messaging.Write(WarningMessages.GeneratedShortFileNameConflict2(conflicts[i].SourceLineNumbers)); 1402 this.Messaging.Write(WindowsInstallerBackendWarnings.GeneratedShortFileNameConflict2(conflicts[i].SourceLineNumbers));
1403 } 1403 }
1404 } 1404 }
1405 } 1405 }
@@ -1430,7 +1430,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1430 { 1430 {
1431 foreach (var row in table.Rows) 1431 foreach (var row in table.Rows)
1432 { 1432 {
1433 this.Messaging.Write(WarningMessages.DangerousTableInMergeModule(row.SourceLineNumbers, table.Name)); 1433 this.Messaging.Write(WindowsInstallerBackendWarnings.DangerousTableInMergeModule(row.SourceLineNumbers, table.Name));
1434 } 1434 }
1435 } 1435 }
1436 else if (31 < table.Name.Length) 1436 else if (31 < table.Name.Length)
@@ -1474,7 +1474,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1474 { 1474 {
1475 foreach (var row in table.Rows) 1475 foreach (var row in table.Rows)
1476 { 1476 {
1477 this.Messaging.Write(WarningMessages.UnexpectedTableInProduct(row.SourceLineNumbers, table.Name)); 1477 this.Messaging.Write(WindowsInstallerBackendWarnings.UnexpectedTableInProduct(row.SourceLineNumbers, table.Name));
1478 } 1478 }
1479 } 1479 }
1480 else if (31 < table.Name.Length) 1480 else if (31 < table.Name.Length)
@@ -1508,7 +1508,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1508 } 1508 }
1509 else if (keyTableDefinition.Columns[keyColumnIndex - 1].ModularizeType != columnDefinition.ModularizeType && ColumnModularizeType.CompanionFile != columnDefinition.ModularizeType) 1509 else if (keyTableDefinition.Columns[keyColumnIndex - 1].ModularizeType != columnDefinition.ModularizeType && ColumnModularizeType.CompanionFile != columnDefinition.ModularizeType)
1510 { 1510 {
1511 this.Messaging.Write(WarningMessages.CollidingModularizationTypes(tableDefinition.Name, columnDefinition.Name, columnDefinition.KeyTable, keyColumnIndex, columnDefinition.ModularizeType.ToString(), keyTableDefinition.Columns[keyColumnIndex - 1].ModularizeType.ToString())); 1511 this.Messaging.Write(WindowsInstallerBackendWarnings.CollidingModularizationTypes(tableDefinition.Name, columnDefinition.Name, columnDefinition.KeyTable, keyColumnIndex, columnDefinition.ModularizeType.ToString(), keyTableDefinition.Columns[keyColumnIndex - 1].ModularizeType.ToString()));
1512 } 1512 }
1513 } 1513 }
1514 // else - ignore missing table definitions as that error is caught in other places 1514 // else - ignore missing table definitions as that error is caught in other places
@@ -1540,7 +1540,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1540 { 1540 {
1541 foreach (var row in isolatedComponentTable.Rows) 1541 foreach (var row in isolatedComponentTable.Rows)
1542 { 1542 {
1543 this.Messaging.Write(WarningMessages.TableIncompatibleWithInstallerVersion(row.SourceLineNumbers, "IsolatedComponent", outputInstallerVersion)); 1543 this.Messaging.Write(WindowsInstallerBackendWarnings.TableIncompatibleWithInstallerVersion(row.SourceLineNumbers, "IsolatedComponent", outputInstallerVersion));
1544 } 1544 }
1545 } 1545 }
1546 } 1546 }
@@ -1554,7 +1554,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1554 { 1554 {
1555 if (null != row[12] || null != row[13] || null != row[14] || null != row[15]) 1555 if (null != row[12] || null != row[13] || null != row[14] || null != row[15])
1556 { 1556 {
1557 this.Messaging.Write(WarningMessages.ColumnsIncompatibleWithInstallerVersion(row.SourceLineNumbers, "Shortcut", outputInstallerVersion)); 1557 this.Messaging.Write(WindowsInstallerBackendWarnings.ColumnsIncompatibleWithInstallerVersion(row.SourceLineNumbers, "Shortcut", outputInstallerVersion));
1558 } 1558 }
1559 } 1559 }
1560 } 1560 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
index 5e360329..6566fbf0 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
@@ -151,7 +151,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
151 var moduleInstallerVersion = Convert.ToInt32(moduleInstallerVersionString, CultureInfo.InvariantCulture); 151 var moduleInstallerVersion = Convert.ToInt32(moduleInstallerVersionString, CultureInfo.InvariantCulture);
152 if (moduleInstallerVersion > this.OutputInstallerVersion) 152 if (moduleInstallerVersion > this.OutputInstallerVersion)
153 { 153 {
154 this.Messaging.Write(WarningMessages.InvalidHigherInstallerVersionInModule(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, moduleInstallerVersion, this.OutputInstallerVersion)); 154 this.Messaging.Write(WindowsInstallerBackendWarnings.InvalidHigherInstallerVersionInModule(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, moduleInstallerVersion, this.OutputInstallerVersion));
155 } 155 }
156 } 156 }
157 catch (FormatException) 157 catch (FormatException)
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs
index 180ab3d6..aa02a04c 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs
@@ -230,7 +230,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
230 230
231 if (allComponentsHaveConditions) 231 if (allComponentsHaveConditions)
232 { 232 {
233 this.Messaging.Write(WarningMessages.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId, type, path)); 233 this.Messaging.Write(WindowsInstallerBackendWarnings.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId, type, path));
234 } 234 }
235 else 235 else
236 { 236 {
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
index 24837d39..d3d3db9f 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
@@ -175,12 +175,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind
175 this.Messaging.Write(WindowsInstallerBackendErrors.MergeLanguageUnsupported(wixMergeRow.SourceLineNumbers, mergeError.Language, wixMergeRow.SourceFile)); 175 this.Messaging.Write(WindowsInstallerBackendErrors.MergeLanguageUnsupported(wixMergeRow.SourceLineNumbers, mergeError.Language, wixMergeRow.SourceFile));
176 break; 176 break;
177 case MsmErrorType.msmErrorResequenceMerge: 177 case MsmErrorType.msmErrorResequenceMerge:
178 this.Messaging.Write(WarningMessages.MergeRescheduledAction(wixMergeRow.SourceLineNumbers, mergeError.DatabaseTable, databaseKeys.ToString(), wixMergeRow.SourceFile)); 178 this.Messaging.Write(WindowsInstallerBackendWarnings.MergeRescheduledAction(wixMergeRow.SourceLineNumbers, mergeError.DatabaseTable, databaseKeys.ToString(), wixMergeRow.SourceFile));
179 break; 179 break;
180 case MsmErrorType.msmErrorTableMerge: 180 case MsmErrorType.msmErrorTableMerge:
181 if ("_Validation" != mergeError.DatabaseTable) // ignore merge errors in the _Validation table 181 if ("_Validation" != mergeError.DatabaseTable) // ignore merge errors in the _Validation table
182 { 182 {
183 this.Messaging.Write(WarningMessages.MergeTableFailed(wixMergeRow.SourceLineNumbers, mergeError.DatabaseTable, databaseKeys.ToString(), wixMergeRow.SourceFile)); 183 this.Messaging.Write(WindowsInstallerBackendWarnings.MergeTableFailed(wixMergeRow.SourceLineNumbers, mergeError.DatabaseTable, databaseKeys.ToString(), wixMergeRow.SourceFile));
184 } 184 }
185 break; 185 break;
186 case MsmErrorType.msmErrorPlatformMismatch: 186 case MsmErrorType.msmErrorPlatformMismatch:
@@ -238,7 +238,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
238 { 238 {
239 if (null != record) 239 if (null != record)
240 { 240 {
241 this.Messaging.Write(WarningMessages.SuppressMergedAction(suppressAction.Action, tableName)); 241 this.Messaging.Write(WindowsInstallerBackendWarnings.SuppressMergedAction(suppressAction.Action, tableName));
242 view.Modify(ModifyView.Delete, record); 242 view.Modify(ModifyView.Delete, record);
243 } 243 }
244 } 244 }
@@ -257,7 +257,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
257 { 257 {
258 foreach (var resultRecord in view.Records) 258 foreach (var resultRecord in view.Records)
259 { 259 {
260 this.Messaging.Write(WarningMessages.SuppressMergedAction(resultRecord.GetString(1), tableName)); 260 this.Messaging.Write(WindowsInstallerBackendWarnings.SuppressMergedAction(resultRecord.GetString(1), tableName));
261 } 261 }
262 } 262 }
263 263
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
index 28fa0533..caa3c720 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
@@ -145,10 +145,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
145 { 145 {
146 if (requiredActionSymbol.Overridable || requiredActionSymbol.Id.Access == AccessModifier.Virtual) 146 if (requiredActionSymbol.Overridable || requiredActionSymbol.Id.Access == AccessModifier.Virtual)
147 { 147 {
148 this.Messaging.Write(WarningMessages.SuppressAction(suppressActionSymbol.SourceLineNumbers, suppressActionSymbol.Action, suppressActionSymbol.SequenceTable.ToString())); 148 this.Messaging.Write(WindowsInstallerBackendWarnings.SuppressAction(suppressActionSymbol.SourceLineNumbers, suppressActionSymbol.Action, suppressActionSymbol.SequenceTable.ToString()));
149 if (null != requiredActionSymbol.SourceLineNumbers) 149 if (null != requiredActionSymbol.SourceLineNumbers)
150 { 150 {
151 this.Messaging.Write(WarningMessages.SuppressAction2(requiredActionSymbol.SourceLineNumbers)); 151 this.Messaging.Write(WindowsInstallerBackendWarnings.SuppressAction2(requiredActionSymbol.SourceLineNumbers));
152 } 152 }
153 153
154 requiredActionSymbols.Remove(key); 154 requiredActionSymbols.Remove(key);
@@ -258,10 +258,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
258 { 258 {
259 if (sequenceScheduledActionSymbol.Sequence == actionSymbol.Sequence) 259 if (sequenceScheduledActionSymbol.Sequence == actionSymbol.Sequence)
260 { 260 {
261 this.Messaging.Write(WarningMessages.ActionSequenceCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, sequenceScheduledActionSymbol.Action, actionSymbol.Sequence ?? 0)); 261 this.Messaging.Write(WindowsInstallerBackendWarnings.ActionSequenceCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, sequenceScheduledActionSymbol.Action, actionSymbol.Sequence ?? 0));
262 if (null != sequenceScheduledActionSymbol.SourceLineNumbers) 262 if (null != sequenceScheduledActionSymbol.SourceLineNumbers)
263 { 263 {
264 this.Messaging.Write(WarningMessages.ActionSequenceCollision2(sequenceScheduledActionSymbol.SourceLineNumbers)); 264 this.Messaging.Write(WindowsInstallerBackendWarnings.ActionSequenceCollision2(sequenceScheduledActionSymbol.SourceLineNumbers));
265 } 265 }
266 } 266 }
267 } 267 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
index b6ff5fbd..929a348b 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
@@ -241,14 +241,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind
241 // for unversioned file. That's allowed but generally a dangerous thing to do so let's point that out to the user. 241 // for unversioned file. That's allowed but generally a dangerous thing to do so let's point that out to the user.
242 if (!this.AllFileFacades.Any(r => facade.Version.Equals(r.Id, StringComparison.Ordinal))) 242 if (!this.AllFileFacades.Any(r => facade.Version.Equals(r.Id, StringComparison.Ordinal)))
243 { 243 {
244 this.Messaging.Write(WarningMessages.DefaultVersionUsedForUnversionedFile(facade.SourceLineNumber, facade.Version, facade.Id)); 244 this.Messaging.Write(WindowsInstallerBackendWarnings.DefaultVersionUsedForUnversionedFile(facade.SourceLineNumber, facade.Version, facade.Id));
245 } 245 }
246 } 246 }
247 else 247 else
248 { 248 {
249 if (null != facade.Language) 249 if (null != facade.Language)
250 { 250 {
251 this.Messaging.Write(WarningMessages.DefaultLanguageUsedForUnversionedFile(facade.SourceLineNumber, facade.Language, facade.Id)); 251 this.Messaging.Write(WindowsInstallerBackendWarnings.DefaultLanguageUsedForUnversionedFile(facade.SourceLineNumber, facade.Language, facade.Id));
252 } 252 }
253 253
254 int[] hash; 254 int[] hash;
@@ -303,7 +303,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
303 303
304 if (!String.IsNullOrEmpty(facade.Language) && String.IsNullOrEmpty(language)) 304 if (!String.IsNullOrEmpty(facade.Language) && String.IsNullOrEmpty(language))
305 { 305 {
306 this.Messaging.Write(WarningMessages.DefaultLanguageUsedForVersionedFile(facade.SourceLineNumber, facade.Language, facade.Id)); 306 this.Messaging.Write(WindowsInstallerBackendWarnings.DefaultLanguageUsedForVersionedFile(facade.SourceLineNumber, facade.Language, facade.Id));
307 } 307 }
308 else // override the default provided by the user (usually nothing) with the actual language from the file itself. 308 else // override the default provided by the user (usually nothing) with the actual language from the file itself.
309 { 309 {
@@ -420,7 +420,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
420 // check for null value (this can occur when grabbing the file version from an assembly without one) 420 // check for null value (this can occur when grabbing the file version from an assembly without one)
421 if (String.IsNullOrEmpty(value)) 421 if (String.IsNullOrEmpty(value))
422 { 422 {
423 this.Messaging.Write(WarningMessages.NullMsiAssemblyNameValue(facade.SourceLineNumber, facade.ComponentRef, name)); 423 this.Messaging.Write(WindowsInstallerBackendWarnings.NullMsiAssemblyNameValue(facade.SourceLineNumber, facade.ComponentRef, name));
424 } 424 }
425 else 425 else
426 { 426 {
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
index 56f32308..06dedc17 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
@@ -440,7 +440,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
440 // Make sure all changes to non keypath files also had a change in the keypath. 440 // Make sure all changes to non keypath files also had a change in the keypath.
441 if (!componentWithChangedKeyPath.ContainsKey(componentFile.Key) && componentKeyPath.TryGetValue(componentFile.Key, out var keyPath)) 441 if (!componentWithChangedKeyPath.ContainsKey(componentFile.Key) && componentKeyPath.TryGetValue(componentFile.Key, out var keyPath))
442 { 442 {
443 this.Messaging.Write(WarningMessages.UpdateOfNonKeyPathFile(componentFile.Value, componentFile.Key, keyPath)); 443 this.Messaging.Write(WindowsInstallerBackendWarnings.UpdateOfNonKeyPathFile(componentFile.Value, componentFile.Key, keyPath));
444 } 444 }
445 } 445 }
446 } 446 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
index dc3ee06d..ac998cf0 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
@@ -387,7 +387,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
387 } 387 }
388 catch (ArgumentException) // action/dialog is not valid for this sequence 388 catch (ArgumentException) // action/dialog is not valid for this sequence
389 { 389 {
390 this.Messaging.Write(WarningMessages.IllegalActionInSequence(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action)); 390 this.Messaging.Write(WindowsInstallerBackendWarnings.IllegalActionInSequence(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
391 } 391 }
392 } 392 }
393 } 393 }
@@ -500,7 +500,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
500 return xStandardAction; 500 return xStandardAction;
501 501
502 default: 502 default:
503 this.Messaging.Write(WarningMessages.UnknownAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action)); 503 this.Messaging.Write(WindowsInstallerBackendWarnings.UnknownAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
504 return null; 504 return null;
505 } 505 }
506 506
@@ -523,7 +523,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
523 523
524 if ((null != actionSymbol.Before || null != actionSymbol.After) && 0 == actionSymbol.Sequence) 524 if ((null != actionSymbol.Before || null != actionSymbol.After) && 0 == actionSymbol.Sequence)
525 { 525 {
526 this.Messaging.Write(WarningMessages.DecompiledStandardActionRelativelyScheduledInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action)); 526 this.Messaging.Write(WindowsInstallerBackendWarnings.DecompiledStandardActionRelativelyScheduledInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
527 } 527 }
528 else if (actionSymbol.Sequence.HasValue) 528 else if (actionSymbol.Sequence.HasValue)
529 { 529 {
@@ -694,7 +694,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
694 } 694 }
695 else 695 else
696 { 696 {
697 this.Messaging.Write(WarningMessages.IllegalRegistryKeyPath(row.SourceLineNumbers, "Component", keyPath)); 697 this.Messaging.Write(WindowsInstallerBackendWarnings.IllegalRegistryKeyPath(row.SourceLineNumbers, "Component", keyPath));
698 } 698 }
699 } 699 }
700 else 700 else
@@ -1191,7 +1191,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
1191 { 1191 {
1192 if (addedProgIds.TryGetValue(xProgId, out var progid)) 1192 if (addedProgIds.TryGetValue(xProgId, out var progid))
1193 { 1193 {
1194 this.Messaging.Write(WarningMessages.TooManyProgIds(row.SourceLineNumbers, row.FieldAsString(0), row.FieldAsString(3), progid)); 1194 this.Messaging.Write(WindowsInstallerBackendWarnings.TooManyProgIds(row.SourceLineNumbers, row.FieldAsString(0), row.FieldAsString(3), progid));
1195 } 1195 }
1196 else 1196 else
1197 { 1197 {
@@ -2427,7 +2427,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2427 this.DecompileActionTextTable(table); 2427 this.DecompileActionTextTable(table);
2428 break; 2428 break;
2429 case "AdvtUISequence": 2429 case "AdvtUISequence":
2430 this.Messaging.Write(WarningMessages.DeprecatedTable(table.Name)); 2430 this.Messaging.Write(WindowsInstallerBackendWarnings.DeprecatedTable(table.Name));
2431 break; 2431 break;
2432 case "AppId": 2432 case "AppId":
2433 this.DecompileAppIdTable(table); 2433 this.DecompileAppIdTable(table);
@@ -2556,7 +2556,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2556 this.DecompileMIMETable(table); 2556 this.DecompileMIMETable(table);
2557 break; 2557 break;
2558 case "ModuleAdvtUISequence": 2558 case "ModuleAdvtUISequence":
2559 this.Messaging.Write(WarningMessages.DeprecatedTable(table.Name)); 2559 this.Messaging.Write(WindowsInstallerBackendWarnings.DeprecatedTable(table.Name));
2560 break; 2560 break;
2561 case "ModuleComponents": 2561 case "ModuleComponents":
2562 // handled by DecompileComponentTable (since the ModuleComponents table 2562 // handled by DecompileComponentTable (since the ModuleComponents table
@@ -2746,7 +2746,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2746 case "ModuleSubstitution": 2746 case "ModuleSubstitution":
2747 if (OutputType.Module != output.Type) 2747 if (OutputType.Module != output.Type)
2748 { 2748 {
2749 this.Messaging.Write(WarningMessages.SkippingMergeModuleTable(output.SourceLineNumbers, tableName)); 2749 this.Messaging.Write(WindowsInstallerBackendWarnings.SkippingMergeModuleTable(output.SourceLineNumbers, tableName));
2750 return false; 2750 return false;
2751 } 2751 }
2752 else 2752 else
@@ -2772,7 +2772,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
2772 case "MsiPatchSequence": 2772 case "MsiPatchSequence":
2773 case "Patch": 2773 case "Patch":
2774 case "PatchPackage": 2774 case "PatchPackage":
2775 this.Messaging.Write(WarningMessages.PatchTable(output.SourceLineNumbers, tableName)); 2775 this.Messaging.Write(WindowsInstallerBackendWarnings.PatchTable(output.SourceLineNumbers, tableName));
2776 return false; 2776 return false;
2777 case "_SummaryInformation": 2777 case "_SummaryInformation":
2778 return true; 2778 return true;
@@ -3549,7 +3549,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
3549 { 3549 {
3550 if (0 < table.Rows.Count || this.SuppressDroppingEmptyTables) 3550 if (0 < table.Rows.Count || this.SuppressDroppingEmptyTables)
3551 { 3551 {
3552 this.Messaging.Write(WarningMessages.DecompilingAsCustomTable(table.Rows[0].SourceLineNumbers, table.Name)); 3552 this.Messaging.Write(WindowsInstallerBackendWarnings.DecompilingAsCustomTable(table.Rows[0].SourceLineNumbers, table.Name));
3553 3553
3554 var xCustomTable = new XElement(Names.CustomTableElement, 3554 var xCustomTable = new XElement(Names.CustomTableElement,
3555 new XAttribute("Id", table.Name)); 3555 new XAttribute("Id", table.Name));
@@ -3896,7 +3896,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
3896 } 3896 }
3897 break; 3897 break;
3898 case WindowsInstallerConstants.MsidbCustomActionTypeInstall: 3898 case WindowsInstallerConstants.MsidbCustomActionTypeInstall:
3899 this.Messaging.Write(WarningMessages.NestedInstall(row.SourceLineNumbers, table.Name, row.Fields[1].Column.Name, row[1])); 3899 this.Messaging.Write(WindowsInstallerBackendWarnings.NestedInstall(row.SourceLineNumbers, table.Name, row.Fields[1].Column.Name, row[1]));
3900 continue; 3900 continue;
3901 default: 3901 default:
3902 this.Messaging.Write(WarningMessages.IllegalColumnValue(row.SourceLineNumbers, table.Name, row.Fields[1].Column.Name, row[1])); 3902 this.Messaging.Write(WarningMessages.IllegalColumnValue(row.SourceLineNumbers, table.Name, row.Fields[1].Column.Name, row[1]));
@@ -4121,7 +4121,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
4121 4121
4122 if (id == "TARGETDIR" && names[0] != "SourceDir") 4122 if (id == "TARGETDIR" && names[0] != "SourceDir")
4123 { 4123 {
4124 this.Messaging.Write(WarningMessages.TargetDirCorrectedDefaultDir()); 4124 this.Messaging.Write(WindowsInstallerBackendWarnings.TargetDirCorrectedDefaultDir());
4125 xDirectory.SetAttributeValue("Name", "SourceDir"); 4125 xDirectory.SetAttributeValue("Name", "SourceDir");
4126 } 4126 }
4127 else 4127 else
@@ -4471,7 +4471,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
4471 if (WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise == (attributes & WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise) && 4471 if (WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise == (attributes & WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise) &&
4472 WindowsInstallerConstants.MsidbFeatureAttributesNoUnsupportedAdvertise == (attributes & WindowsInstallerConstants.MsidbFeatureAttributesNoUnsupportedAdvertise)) 4472 WindowsInstallerConstants.MsidbFeatureAttributesNoUnsupportedAdvertise == (attributes & WindowsInstallerConstants.MsidbFeatureAttributesNoUnsupportedAdvertise))
4473 { 4473 {
4474 this.Messaging.Write(WarningMessages.InvalidAttributeCombination(row.SourceLineNumbers, "msidbFeatureAttributesDisallowAdvertise", "msidbFeatureAttributesNoUnsupportedAdvertise", "Feature.AllowAdvertiseType", "no")); 4474 this.Messaging.Write(WindowsInstallerBackendWarnings.InvalidAttributeCombination(row.SourceLineNumbers, "msidbFeatureAttributesDisallowAdvertise", "msidbFeatureAttributesNoUnsupportedAdvertise", "Feature.AllowAdvertiseType", "no"));
4475 feature.SetAttributeValue("AllowAdvertise", "no"); 4475 feature.SetAttributeValue("AllowAdvertise", "no");
4476 } 4476 }
4477 else if (WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise == (attributes & WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise)) 4477 else if (WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise == (attributes & WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise))
@@ -6729,7 +6729,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
6729 6729
6730 if (65536 == version) 6730 if (65536 == version)
6731 { 6731 {
6732 this.Messaging.Write(WarningMessages.PossiblyIncorrectTypelibVersion(row.SourceLineNumbers, id)); 6732 this.Messaging.Write(WindowsInstallerBackendWarnings.PossiblyIncorrectTypelibVersion(row.SourceLineNumbers, id));
6733 } 6733 }
6734 6734
6735 xTypeLib.SetAttributeValue("MajorVersion", (version & 0xFFFF00) >> 8); 6735 xTypeLib.SetAttributeValue("MajorVersion", (version & 0xFFFF00) >> 8);
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs
index bd1b31e0..b8f64cb7 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs
@@ -270,7 +270,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe
270 // If we did find external cabs but not all of them were signed, give a warning 270 // If we did find external cabs but not all of them were signed, give a warning
271 if (foundUnsignedExternals) 271 if (foundUnsignedExternals)
272 { 272 {
273 this.Messaging.Write(WarningMessages.ExternalCabsAreNotSigned(this.InputPath)); 273 this.Messaging.Write(WindowsInstallerBackendWarnings.ExternalCabsAreNotSigned(this.InputPath));
274 } 274 }
275 275
276 if (shouldCommit) 276 if (shouldCommit)
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs
index ac6a6ab3..95a6a223 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs
@@ -195,7 +195,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
195 195
196 if (!success) 196 if (!success)
197 { 197 {
198 this.Messaging.Write(WarningMessages.BadColumnDataIgnored(row.SourceLineNumbers, Convert.ToString(intValue, CultureInfo.InvariantCulture), tableName, row.Fields[i].Column.Name)); 198 this.Messaging.Write(WindowsInstallerBackendWarnings.BadColumnDataIgnored(row.SourceLineNumbers, Convert.ToString(intValue, CultureInfo.InvariantCulture), tableName, row.Fields[i].Column.Name));
199 } 199 }
200 break; 200 break;
201 case ColumnType.Object: 201 case ColumnType.Object:
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs
index 169a1e29..7d82cfca 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs
@@ -119,7 +119,7 @@ namespace WixToolset.Core.WindowsInstaller.Validate
119 this.Messaging.Write(WindowsInstallerBackendErrors.ValidationError(messageSourceLineNumbers, message.IceName, message.Description)); 119 this.Messaging.Write(WindowsInstallerBackendErrors.ValidationError(messageSourceLineNumbers, message.IceName, message.Description));
120 break; 120 break;
121 case ValidationMessageType.Warning: 121 case ValidationMessageType.Warning:
122 this.Messaging.Write(WarningMessages.ValidationWarning(messageSourceLineNumbers, message.IceName, message.Description)); 122 this.Messaging.Write(WindowsInstallerBackendWarnings.ValidationWarning(messageSourceLineNumbers, message.IceName, message.Description));
123 break; 123 break;
124 case ValidationMessageType.Info: 124 case ValidationMessageType.Info:
125 this.Messaging.Write(VerboseMessages.ValidationInfo(message.IceName, message.Description)); 125 this.Messaging.Write(VerboseMessages.ValidationInfo(message.IceName, message.Description));
@@ -184,7 +184,7 @@ namespace WixToolset.Core.WindowsInstaller.Validate
184 } 184 }
185 catch (ArgumentException) 185 catch (ArgumentException)
186 { 186 {
187 this.Messaging.Write(WarningMessages.DuplicatePrimaryKey(row.SourceLineNumbers, primaryKey, table.Name)); 187 this.Messaging.Write(WindowsInstallerBackendWarnings.DuplicatePrimaryKey(row.SourceLineNumbers, primaryKey, table.Name));
188 } 188 }
189 } 189 }
190 } 190 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs
index bc61c59c..a549c8cd 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs
@@ -11,6 +11,236 @@ namespace WixToolset.Core.WindowsInstaller
11 return Message(sourceLineNumbers, Ids.LongPatchBaselineIdTrimmed, "The PatchBaseline/@Id='{0}' is too long. It is recommended to use short identifiers like 'RTM' and 'SP1'. The identifier has been trimmed to '{1}' so the patch can be created.", baseTransformName, trimmedTransformName); 11 return Message(sourceLineNumbers, Ids.LongPatchBaselineIdTrimmed, "The PatchBaseline/@Id='{0}' is too long. It is recommended to use short identifiers like 'RTM' and 'SP1'. The identifier has been trimmed to '{1}' so the patch can be created.", baseTransformName, trimmedTransformName);
12 } 12 }
13 13
14 public static Message ActionSequenceCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2, int sequenceNumber)
15 {
16 return Message(sourceLineNumbers, Ids.ActionSequenceCollision, "The {0} table contains actions '{1}' and '{2}' which both have the same sequence number {3}. Please change the sequence number for one of these actions to avoid an ICE warning.", sequenceTableName, actionName1, actionName2, sequenceNumber);
17 }
18
19 public static Message ActionSequenceCollision2(SourceLineNumber sourceLineNumbers)
20 {
21 return Message(sourceLineNumbers, Ids.ActionSequenceCollision2, "The location of the action related to previous warning.");
22 }
23
24 public static Message BadColumnDataIgnored(SourceLineNumber sourceLineNumbers, string value, string tableName, string columnName)
25 {
26 return Message(sourceLineNumbers, Ids.BadColumnDataIgnored, "The value '{0}' in table '{1}', column '{2}' is invalid according to the column's validation information. The decompiled output includes a best-effort representation of this value.", value, tableName, columnName);
27 }
28
29 public static Message CannotUpdateCabCache(SourceLineNumber sourceLineNumbers, string cabinetPath, string detail)
30 {
31 return Message(sourceLineNumbers, Ids.CannotUpdateCabCache, "Cannot update the timestamp of cached cabinet: '{0}'. If the timestamp is not updated, the build may rebuild more than is necessary. To fix the issue, ensure that the cabinet file is writable, error: {1}", cabinetPath, detail);
32 }
33
34 public static Message ColumnsIncompatibleWithInstallerVersion(SourceLineNumber sourceLineNumbers, string tableName, int packageInstallerVersion)
35 {
36 return Message(sourceLineNumbers, Ids.ColumnsIncompatibleWithInstallerVersion, "Table '{0}' uses columns that require a version of Windows Installer greater than specified in your package ('{1}').", tableName, packageInstallerVersion);
37 }
38
39 public static Message DangerousTableInMergeModule(SourceLineNumber sourceLineNumbers, string tableName)
40 {
41 return Message(sourceLineNumbers, Ids.DangerousTableInMergeModule, "Merge modules should not contain the '{0}' table because all merge conflicts cannot avoided. However, this warning can be suppressed if all of the consumers of the Merge Module agree to not duplicate identifiers in the '{0}' table.", tableName);
42 }
43
44 public static Message DecompiledStandardActionRelativelyScheduledInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
45 {
46 return Message(sourceLineNumbers, Ids.DecompiledStandardActionRelativelyScheduledInModule, "The {0} table contains a standard action '{1}' that does not have a sequence number specified. A value in the Sequence column is required for standard actions in a merge module. Remove the action from the decompiled authoring to have WiX automatically sequence it.", sequenceTableName, actionName);
47 }
48
49 public static Message DecompilingAsCustomTable(SourceLineNumber sourceLineNumbers, string tableName)
50 {
51 return Message(sourceLineNumbers, Ids.DecompilingAsCustomTable, "The {0} table is being decompiled as a custom table.", tableName);
52 }
53
54 public static Message DefaultLanguageUsedForUnversionedFile(SourceLineNumber sourceLineNumbers, string language, string fileId)
55 {
56 return Message(sourceLineNumbers, Ids.DefaultLanguageUsedForUnversionedFile, "The DefaultLanguage '{0}' was used for file '{1}' which has no language or version. For unversioned files, specifying a value for DefaultLanguage is not neccessary and it will not be used when determining file versions. Remove the DefaultLanguage attribute to eliminate this warning.", language, fileId);
57 }
58
59 public static Message DefaultLanguageUsedForVersionedFile(SourceLineNumber sourceLineNumbers, string language, string fileId)
60 {
61 return Message(sourceLineNumbers, Ids.DefaultLanguageUsedForVersionedFile, "The DefaultLanguage '{0}' was used for file '{1}' which has no language. Specifying a language that is different from the actual file may result in unexpected versioning behavior during a repair or while patching. Either specify a value for DefaultLanguage or put the language in the version information resource to eliminate this warning.", language, fileId);
62 }
63
64 public static Message DefaultVersionUsedForUnversionedFile(SourceLineNumber sourceLineNumbers, string version, string fileId)
65 {
66 return Message(sourceLineNumbers, Ids.DefaultVersionUsedForUnversionedFile, "The DefaultVersion '{0}' was used for file '{1}' which has no version. No entry for this file will be placed in the MsiFileHash table. For unversioned files, specifying a version that is different from the actual file may result in unexpected versioning behavior during a repair or while patching. Version the resource to eliminate this warning.", version, fileId);
67 }
68
69 public static Message DeprecatedTable(string tableName)
70 {
71 return Message(null, Ids.DeprecatedTable, "The {0} table is not supported by the WiX toolset because it has been deprecated by the Windows Installer team. Any information in this table will be left out of the decompiled output.", tableName);
72 }
73
74 public static Message DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
75 {
76 return Message(sourceLineNumbers, Ids.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions, "Component/@Id='{0}' with {2} '{3}' has a @Guid value '{1}' that duplicates another component in this package. This is not officially supported by Windows Installer and cannot be used when creating patches. It otherwise works as long as all components with the same GUID have mutually-exclusive conditions. It is recommended to give each component its own unique GUID.", componentId, guid, type, keyPath);
77 }
78
79 public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)
80 {
81 return Message(sourceLineNumbers, Ids.DuplicatePrimaryKey, "The primary key '{0}' is duplicated in table '{1}' and will be ignored. Please remove one of the entries or rename a part of the primary key to avoid the collision.", primaryKey, tableName);
82 }
83
84 public static Message EmptyCabinet(SourceLineNumber sourceLineNumbers, string cabinetName, bool isPatch)
85 {
86 if (isPatch)
87 {
88 return Message(sourceLineNumbers, Ids.EmptyCabinet, "The cabinet '{0}' does not contain any files. If this patch contains no files, this warning can likely be safely ignored. Otherwise, try passing -p to torch.exe when first building the transforms, or add a ComponentRef to your PatchFamily authoring to pull changed files into the cabinet.", cabinetName, isPatch);
89 }
90
91 return Message(sourceLineNumbers, Ids.EmptyCabinet, "The cabinet '{0}' does not contain any files. If this installation contains no files, this warning can likely be safely ignored. Otherwise, please add files to the cabinet or remove it.", cabinetName);
92 }
93
94 public static Message ExternalCabsAreNotSigned(string databaseFile)
95 {
96 return Message(null, Ids.ExternalCabsAreNotSigned, "The installer database '{0}' has external cabs, but at least one of them is not signed. Please ensure that all external cabs are signed, if you mean to sign them. If you don't mean to sign them, there is no need to inscribe the MSI as part of your build.", databaseFile);
97 }
98
99 public static Message GeneratedShortFileNameConflict(SourceLineNumber sourceLineNumbers, string shortFileName)
100 {
101 return Message(sourceLineNumbers, Ids.GeneratedShortFileNameConflict, "The short file name '{0}' was generated for multiple files that may be installed to the same directory. This could be due to conflicting long file names specified by the File/@Name attribute. If that is the case, please resolve the conflict in those attributes. Otherwise, please manually set the File/@ShortName attribute on the conflicting row to fix the collision. If one of the colliding files was added via a patch, that short file name should be specified manually to avoid disturbing the original short file name.", shortFileName);
102 }
103
104 public static Message GeneratedShortFileNameConflict2(SourceLineNumber sourceLineNumbers)
105 {
106 return Message(sourceLineNumbers, Ids.GeneratedShortFileNameConflict2, "The location of a conflicting generated short file name related to the previous warning.");
107 }
108
109 public static Message IllegalActionInSequence(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
110 {
111 return Message(sourceLineNumbers, Ids.IllegalActionInSequence, "The {0} table contains an action '{1}' which is not allowed in this table. If this is a standard action then it is not valid for this table, if it is a custom action or dialog then this table does not accept actions of that type. This action will be left out of the decompiled output.", sequenceTableName, actionName);
112 }
113
114 public static Message IllegalRegistryKeyPath(SourceLineNumber sourceLineNumbers, string componentName, string registryId)
115 {
116 return Message(sourceLineNumbers, Ids.IllegalRegistryKeyPath, "Component '{0}' specifies an illegal registry keypath of '{1}'. Since this entry actually represents a registry key, not a registry value, it cannot be the keypath.", componentName, registryId);
117 }
118
119 public static Message InvalidAttributeCombination(SourceLineNumber sourceLineNumbers, string attrib1, string attrib2, string name, string value)
120 {
121 return Message(sourceLineNumbers, Ids.InvalidAttributeCombination, "It is invalid to combine attributes {0} and {1}. The decompiled output will set attribute {2} to {3}.", attrib1, attrib2, name, value);
122 }
123
124 public static Message InvalidHigherInstallerVersionInModule(SourceLineNumber sourceLineNumbers, string moduleId, int moduleInstallerVersion, int packageInstallerVersion)
125 {
126 return Message(sourceLineNumbers, Ids.InvalidHigherInstallerVersionInModule, "Merge module '{0}' has an installer version of {1} which is greater than the package's installer version of {2}. Merging a module with a higher installer version than the package it is being merged into can result in invalid values in the resulting msi. You must set the Package/@InstallerVersion attribute to {1} or greater to merge this merge module into your package.", moduleId, moduleInstallerVersion, packageInstallerVersion);
127 }
128
129 public static Message InvalidRemoveFile(SourceLineNumber sourceLineNumbers, string file, string component)
130 {
131 return Message(sourceLineNumbers, Ids.InvalidRemoveFile, "File '{0}' was removed from component '{1}'. Removing a file from a component will not result in the file being removed by a patch. You should author a RemoveFile element in your component to remove the file from the installation if you want the file to be removed.", file, component);
132 }
133
134 public static Message MajorUpgradePatchNotRecommended()
135 {
136 return Message(null, Ids.MajorUpgradePatchNotRecommended, "Changing the ProductCode in a patch is not recommended because the patch cannot be uninstalled nor can it be sequenced along with other patches for the target package. See https://learn.microsoft.com/en-us/windows/win32/msi/applying-major-upgrades-by-patching-the-local-installation-of-the-product for more information.");
137 }
138
139 public static Message MergeRescheduledAction(SourceLineNumber sourceLineNumbers, string tableName, string actionName, string mergeModuleFile)
140 {
141 return Message(sourceLineNumbers, Ids.MergeRescheduledAction, "The {0} table contains an action '{1}' which cannot be merged from the merge module '{2}'. This action is likely colliding with an action in the database that is being created. The colliding action may have been authored in the database or merged in from another merge module. If this is a standard action, it is likely colliding due to a difference in the condition for the action in the database and merge module. If this is a custom action, it should only be declared in the database or one merge module.", tableName, actionName, mergeModuleFile);
142 }
143
144 public static Message MergeTableFailed(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile)
145 {
146 return Message(sourceLineNumbers, Ids.MergeTableFailed, "The {0} table contains a row with primary key(s) '{1}' which cannot be merged from the merge module '{2}'. This is likely due to collision of rows with the same primary key(s) (but other different values in other columns) between the database and the merge module.", tableName, primaryKeys, mergeModuleFile);
147 }
148
149 public static Message NestedInstall(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value)
150 {
151 return Message(sourceLineNumbers, Ids.NestedInstall, "The {0}.{1} column's value, '{2}', indicates a nested install. Nested installations are not supported by the WiX team. This action will be left out of the decompiled output.", tableName, columnName, value);
152 }
153
154 public static Message NewComponentAddedToExistingFeature(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath)
155 {
156 return Message(sourceLineNumbers, Ids.NewComponentAddedToExistingFeature, "Component '{0}' was added to feature '{1}' in the transform '{2}'. If you cannot guarantee that this feature will always be installed, you should consider adding new components to new top-level features to prevent prompts for source when installing this patch.", component, feature, transformPath);
157 }
158
159 public static Message NullMsiAssemblyNameValue(SourceLineNumber sourceLineNumbers, string componentName, string name)
160 {
161 return Message(sourceLineNumbers, Ids.NullMsiAssemblyNameValue, "The assembly in component '{0}' has a null or empty {1} assembly name value.", componentName, name);
162 }
163
164 public static Message PatchTable(SourceLineNumber sourceLineNumbers, string tableName)
165 {
166 return Message(sourceLineNumbers, Ids.PatchTable, "The {0} table is added to the install package by a transform from a patch package (.msp) and not authored directly into an install package (.msi). The information in this table will be left out of the decompiled output.", tableName);
167 }
168
169 public static Message PossiblyIncorrectTypelibVersion(SourceLineNumber sourceLineNumbers, string id)
170 {
171 return Message(sourceLineNumbers, Ids.PossiblyIncorrectTypelibVersion, "The Typelib table entry with Id '{0}' could have an incorrect version of '256.0'. InstallShield has a bug relating to the Typelib Version column: it will incorrectly set the value '65536' in to represent version '1.0'. However, this number actually corresponds to version '256.0'. This bug will not affect the typelib version that is registered during installation, however, it will prevent the Windows Installer from correctly identifying whether a typelib is already installed and lead to unnecessary reinstallations of the typelib.", id);
172 }
173
174 public static Message SkippingMergeModuleTable(SourceLineNumber sourceLineNumbers, string tableName)
175 {
176 return Message(sourceLineNumbers, Ids.SkippingMergeModuleTable, "The {0} table can only be represented in WiX for merge modules. The information in this table will be left out of the decompiled output.", tableName);
177 }
178
179 public static Message StandardDirectoryConflictInMergeModule(SourceLineNumber sourceLineNumbers, string directory, string standardDirectory)
180 {
181 return Message(sourceLineNumbers, Ids.StandardDirectoryConflictInMergeModule, "The Directory '{0}' starts with the same Id as the standard folder in Windows Installer '{1}'. A directory Id that begins with the same Id as a standard folder that is in an MSM may encounter a conflict when merging the MSM into an MSI. This may result in the contents of this merge module being installed to an unexpected location. To eliminate this warning, change your directory Id to not start with the same Id as any standard folders.", directory, standardDirectory);
182 }
183
184 public static Message SuppressAction(SourceLineNumber sourceLineNumbers, string action, string sequenceName)
185 {
186 return Message(sourceLineNumbers, Ids.SuppressAction, "The action '{0}' in the {1} table is being suppressed.", action, sequenceName);
187 }
188
189 public static Message SuppressAction2(SourceLineNumber sourceLineNumbers)
190 {
191 return Message(sourceLineNumbers, Ids.SuppressAction2, "The location of the suppressed action related to previous warning.");
192 }
193
194 public static Message SuppressMergedAction(string action, string sequenceName)
195 {
196 return Message(null, Ids.SuppressMergedAction, "The merged action '{0}' in the {1} table is being suppressed.", action, sequenceName);
197 }
198
199 public static Message TableIncompatibleWithInstallerVersion(SourceLineNumber sourceLineNumbers, string tableName, int packageInstallerVersion)
200 {
201 return Message(sourceLineNumbers, Ids.TableIncompatibleWithInstallerVersion, "Using table '{0}' requires a version of Windows Installer greater than specified in your package ('{1}').", tableName, packageInstallerVersion);
202 }
203
204 public static Message TargetDirCorrectedDefaultDir()
205 {
206 return Message(null, Ids.TargetDirCorrectedDefaultDir, "The Directory with Id 'TARGETDIR' must have the value 'SourceDir' in its 'DefaultDir' column. This has been automatically corrected for you in the decompiled output.");
207 }
208
209 public static Message TooManyProgIds(SourceLineNumber sourceLineNumbers, string clsId, string progId, string otherClsId)
210 {
211 return Message(sourceLineNumbers, Ids.TooManyProgIds, "Class '{0}' tried to use ProgId '{1}' which has already been associated with class '{2}'. This information will be left out of the decompiled output.", clsId, progId, otherClsId);
212 }
213
214 public static Message UnexpectedTableInProduct(SourceLineNumber sourceLineNumbers, string tableName)
215 {
216 return Message(sourceLineNumbers, Ids.UnexpectedTableInProduct, "An unexpected row in the '{0}' table was found in this package. Packages should not contain the '{0}' table.", tableName);
217 }
218
219 public static Message UnknownAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
220 {
221 return Message(sourceLineNumbers, Ids.UnknownAction, "The {0} table contains an action '{1}' which is not a known custom action, dialog, or standard action. This action will be left out of the decompiled output.", sequenceTableName, actionName);
222 }
223
224 public static Message UpdateOfNonKeyPathFile(string nonKeyPathFileId, string componentId, string keyPathFileId)
225 {
226 return Message(null, Ids.UpdateOfNonKeyPathFile, "File '{0}' in Component '{1}' was changed, but the KeyPath file '{2}' was not. This file will not be patched on the target system if the REINSTALLMODE does not contain 'A'. The KeyPath file should also be changed and included in your patch.", nonKeyPathFileId, componentId, keyPathFileId);
227 }
228
229 public static Message ValidationWarning(SourceLineNumber sourceLineNumbers, string ice, string message)
230 {
231 return Message(sourceLineNumbers, Ids.ValidationWarning, "{0}: {1}", ice, message);
232 }
233
234 public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType)
235 {
236 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);
237 }
238
239 public static Message InvalidEnvironmentVariable(string environmentVariable, string value, string defaultValue)
240 {
241 return Message(null, Ids.InvalidEnvironmentVariable, "The {0} environment variable is set to an invalid value of '{1}'. The default value '{2}' will be used instead.", environmentVariable, value, defaultValue);
242 }
243
14 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 244 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
15 { 245 {
16 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); 246 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
@@ -18,6 +248,51 @@ namespace WixToolset.Core.WindowsInstaller
18 248
19 public enum Ids 249 public enum Ids
20 { 250 {
251 NestedInstall = 1004,
252 SuppressAction = 1008,
253 SuppressMergedAction = 1009,
254 TargetDirCorrectedDefaultDir = 1010,
255 UnknownAction = 1024,
256 PossiblyIncorrectTypelibVersion = 1048,
257 ActionSequenceCollision = 1050,
258 ActionSequenceCollision2 = 1051,
259 SuppressAction2 = 1052,
260 UnexpectedTableInProduct = 1053,
261 MergeRescheduledAction = 1055,
262 MergeTableFailed = 1056,
263 DecompiledStandardActionRelativelyScheduledInModule = 1057,
264 IllegalActionInSequence = 1058,
265 DecompilingAsCustomTable = 1060,
266 SkippingMergeModuleTable = 1062,
267 DeprecatedTable = 1065,
268 PatchTable = 1066,
269 GeneratedShortFileNameConflict = 1070,
270 GeneratedShortFileNameConflict2 = 1071,
271 DangerousTableInMergeModule = 1072,
272 ValidationWarning = 1076,
273 EmptyCabinet = 1079,
274 IllegalRegistryKeyPath = 1081,
275 InvalidRemoveFile = 1095,
276 UpdateOfNonKeyPathFile = 1097,
277 MajorUpgradePatchNotRecommended = 1099,
278 DefaultLanguageUsedForVersionedFile = 1101,
279 DefaultLanguageUsedForUnversionedFile = 1102,
280 DefaultVersionUsedForUnversionedFile = 1103,
281 InvalidHigherInstallerVersionInModule = 1104,
282 ColumnsIncompatibleWithInstallerVersion = 1106,
283 TableIncompatibleWithInstallerVersion = 1107,
284 NewComponentAddedToExistingFeature = 1110,
285 TooManyProgIds = 1114,
286 BadColumnDataIgnored = 1115,
287 NullMsiAssemblyNameValue = 1116,
288 InvalidAttributeCombination = 1117,
289 DuplicatePrimaryKey = 1119,
290 ExternalCabsAreNotSigned = 1122,
291 StandardDirectoryConflictInMergeModule = 1124,
292 CannotUpdateCabCache = 1131,
293 DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions = 1137,
294 CollidingModularizationTypes = 1156,
295 InvalidEnvironmentVariable = 1157,
21 LongPatchBaselineIdTrimmed = 7100, 296 LongPatchBaselineIdTrimmed = 7100,
22 } // last available is 7499. 7500 is WindowsInstallerBackendErrors. 297 } // last available is 7499. 7500 is WindowsInstallerBackendErrors.
23 } 298 }
diff --git a/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs b/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs
index e1ee0ef2..673428e2 100644
--- a/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs
+++ b/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs
@@ -166,7 +166,7 @@ namespace WixToolset.Core.Bind
166 } 166 }
167 catch (Exception e) 167 catch (Exception e)
168 { 168 {
169 this.Messaging.Write(WarningMessages.UnableToResetAcls(e.Message)); 169 this.Messaging.Write(CompilerWarnings.UnableToResetAcls(e.Message));
170 } 170 }
171 } 171 }
172 } 172 }
diff --git a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
index 4883932a..d6df0e59 100644
--- a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -719,7 +719,7 @@ namespace WixToolset.Core.CommandLine
719 { 719 {
720 if (value.Equals("embedded", StringComparison.OrdinalIgnoreCase)) 720 if (value.Equals("embedded", StringComparison.OrdinalIgnoreCase))
721 { 721 {
722 this.Messaging.Write(WarningMessages.UnsupportedCommandLineArgumentValue(arg, value, "full")); 722 this.Messaging.Write(CompilerWarnings.UnsupportedCommandLineArgumentValue(arg, value, "full"));
723 723
724 this.PdbType = PdbType.Full; 724 this.PdbType = PdbType.Full;
725 } 725 }
diff --git a/src/wix/WixToolset.Core/Common.cs b/src/wix/WixToolset.Core/Common.cs
index b4b734c8..0919109a 100644
--- a/src/wix/WixToolset.Core/Common.cs
+++ b/src/wix/WixToolset.Core/Common.cs
@@ -583,7 +583,7 @@ namespace WixToolset.Core
583 { 583 {
584 if (72 < value.Length) 584 if (72 < value.Length)
585 { 585 {
586 messaging.Write(WarningMessages.IdentifierTooLong(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 586 messaging.Write(CompilerWarnings.IdentifierTooLong(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
587 } 587 }
588 588
589 return value; 589 return value;
diff --git a/src/wix/WixToolset.Core/Compile/CompilerPayload.cs b/src/wix/WixToolset.Core/Compile/CompilerPayload.cs
index 40205f19..0da88ae4 100644
--- a/src/wix/WixToolset.Core/Compile/CompilerPayload.cs
+++ b/src/wix/WixToolset.Core/Compile/CompilerPayload.cs
@@ -179,7 +179,7 @@ namespace WixToolset.Core
179 179
180 if (YesNoDefaultType.Yes == this.Compressed) 180 if (YesNoDefaultType.Yes == this.Compressed)
181 { 181 {
182 this.Core.Write(WarningMessages.RemotePayloadsMustNotAlsoBeCompressed(this.SourceLineNumbers, this.Element.Name.LocalName)); 182 this.Core.Write(CompilerWarnings.RemotePayloadsMustNotAlsoBeCompressed(this.SourceLineNumbers, this.Element.Name.LocalName));
183 } 183 }
184 184
185 this.Compressed = YesNoDefaultType.No; 185 this.Compressed = YesNoDefaultType.No;
@@ -195,7 +195,7 @@ namespace WixToolset.Core
195 { 195 {
196 if (this.Compressed == YesNoDefaultType.No) 196 if (this.Compressed == YesNoDefaultType.No)
197 { 197 {
198 this.Core.Write(WarningMessages.UxPayloadsOnlySupportEmbedding(this.SourceLineNumbers, this.SourceFile)); 198 this.Core.Write(CompilerWarnings.UxPayloadsOnlySupportEmbedding(this.SourceLineNumbers, this.SourceFile));
199 } 199 }
200 200
201 if (!String.IsNullOrEmpty(this.DownloadUrl)) 201 if (!String.IsNullOrEmpty(this.DownloadUrl))
diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs
index 82ab0e1e..37aeb8f0 100644
--- a/src/wix/WixToolset.Core/Compiler.cs
+++ b/src/wix/WixToolset.Core/Compiler.cs
@@ -373,7 +373,7 @@ namespace WixToolset.Core
373 var id = value.Substring(start + 1, end - start - 1); 373 var id = value.Substring(start + 1, end - start - 1);
374 if (Common.IsIdentifier(id)) 374 if (Common.IsIdentifier(id))
375 { 375 {
376 this.Core.Write(WarningMessages.PropertyValueContainsPropertyReference(sourceLineNumbers, propertyId.Id, id)); 376 this.Core.Write(CompilerWarnings.PropertyValueContainsPropertyReference(sourceLineNumbers, propertyId.Id, id));
377 } 377 }
378 378
379 start = (end < value.Length) ? value.IndexOf('[', end + 1) : -1; 379 start = (end < value.Length) ? value.IndexOf('[', end + 1) : -1;
@@ -719,7 +719,7 @@ namespace WixToolset.Core
719 { 719 {
720 if (18 < id.Id.Length) 720 if (18 < id.Id.Length)
721 { 721 {
722 this.Core.Write(WarningMessages.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 18)); 722 this.Core.Write(CompilerWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 18));
723 } 723 }
724 } 724 }
725 } 725 }
@@ -799,7 +799,7 @@ namespace WixToolset.Core
799 { 799 {
800 if (20 < id.Id.Length) 800 if (20 < id.Id.Length)
801 { 801 {
802 this.Core.Write(WarningMessages.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 20)); 802 this.Core.Write(CompilerWarnings.IdentifierCannotBeModularized(sourceLineNumbers, node.Name.LocalName, "Id", id.Id, id.Id.Length, 20));
803 } 803 }
804 } 804 }
805 } 805 }
@@ -3152,7 +3152,7 @@ namespace WixToolset.Core
3152 3152
3153 if (null == destinationName && null == destinationDirectory && null == destinationProperty) 3153 if (null == destinationName && null == destinationDirectory && null == destinationProperty)
3154 { 3154 {
3155 this.Core.Write(WarningMessages.CopyFileFileIdUseless(sourceLineNumbers)); 3155 this.Core.Write(CompilerWarnings.CopyFileFileIdUseless(sourceLineNumbers));
3156 } 3156 }
3157 3157
3158 if (!this.Core.EncounteredError) 3158 if (!this.Core.EncounteredError)
@@ -3463,7 +3463,7 @@ namespace WixToolset.Core
3463 3463
3464 if (targetType == CustomActionTargetType.VBScript) 3464 if (targetType == CustomActionTargetType.VBScript)
3465 { 3465 {
3466 this.Core.Write(WarningMessages.VBScriptIsDeprecated(sourceLineNumbers)); 3466 this.Core.Write(CompilerWarnings.VBScriptIsDeprecated(sourceLineNumbers));
3467 } 3467 }
3468 3468
3469 // if we have an in-lined Script CustomAction ensure no source or target attributes were provided 3469 // if we have an in-lined Script CustomAction ensure no source or target attributes were provided
@@ -3813,7 +3813,7 @@ namespace WixToolset.Core
3813 } 3813 }
3814 else if (name.Equals(shortName, StringComparison.OrdinalIgnoreCase)) 3814 else if (name.Equals(shortName, StringComparison.OrdinalIgnoreCase))
3815 { 3815 {
3816 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name)); 3816 this.Core.Write(CompilerWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "Name", "ShortName", name));
3817 } 3817 }
3818 } 3818 }
3819 3819
@@ -3835,7 +3835,7 @@ namespace WixToolset.Core
3835 } 3835 }
3836 else if (sourceName.Equals(shortSourceName, StringComparison.OrdinalIgnoreCase)) 3836 else if (sourceName.Equals(shortSourceName, StringComparison.OrdinalIgnoreCase))
3837 { 3837 {
3838 this.Core.Write(WarningMessages.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName)); 3838 this.Core.Write(CompilerWarnings.DirectoryRedundantNames(sourceLineNumbers, node.Name.LocalName, "SourceName", "ShortSourceName", sourceName));
3839 } 3839 }
3840 } 3840 }
3841 3841
@@ -4376,7 +4376,7 @@ namespace WixToolset.Core
4376 title = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 4376 title = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
4377 if ("PUT-FEATURE-TITLE-HERE" == title) 4377 if ("PUT-FEATURE-TITLE-HERE" == title)
4378 { 4378 {
4379 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, title)); 4379 this.Core.Write(CompilerWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, title));
4380 } 4380 }
4381 break; 4381 break;
4382 case "TypicalDefault": 4382 case "TypicalDefault":
@@ -5939,7 +5939,7 @@ namespace WixToolset.Core
5939 // Using both ShortName and Name will not always work due to a Windows Installer bug. 5939 // Using both ShortName and Name will not always work due to a Windows Installer bug.
5940 if (null != shortName && null != name) 5940 if (null != shortName && null != name)
5941 { 5941 {
5942 this.Core.Write(WarningMessages.FileSearchFileNameIssue(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name")); 5942 this.Core.Write(CompilerWarnings.FileSearchFileNameIssue(sourceLineNumbers, node.Name.LocalName, "ShortName", "Name"));
5943 } 5943 }
5944 else if (null == shortName && null == name) // at least one name must be specified. 5944 else if (null == shortName && null == name) // at least one name must be specified.
5945 { 5945 {
@@ -7169,7 +7169,7 @@ namespace WixToolset.Core
7169 // external cabinet files must use 8.3 filenames 7169 // external cabinet files must use 8.3 filenames
7170 if (!String.IsNullOrEmpty(cabinet) && !this.Core.IsValidLongFilename(cabinet) && !Common.ContainsValidBinderVariable(cabinet)) 7170 if (!String.IsNullOrEmpty(cabinet) && !this.Core.IsValidLongFilename(cabinet) && !Common.ContainsValidBinderVariable(cabinet))
7171 { 7171 {
7172 this.Core.Write(WarningMessages.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet)); 7172 this.Core.Write(CompilerWarnings.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet));
7173 } 7173 }
7174 } 7174 }
7175 } 7175 }
@@ -7309,7 +7309,7 @@ namespace WixToolset.Core
7309 } 7309 }
7310 else if (!this.Core.IsValidLongFilename(exampleCabinetName) && !Common.ContainsValidBinderVariable(exampleCabinetName)) // ignore short names with wix variables because it rarely works out. 7310 else if (!this.Core.IsValidLongFilename(exampleCabinetName) && !Common.ContainsValidBinderVariable(exampleCabinetName)) // ignore short names with wix variables because it rarely works out.
7311 { 7311 {
7312 this.Core.Write(WarningMessages.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "CabinetTemplate", cabinetTemplate)); 7312 this.Core.Write(CompilerWarnings.MediaExternalCabinetFilenameIllegal(sourceLineNumbers, node.Name.LocalName, "CabinetTemplate", cabinetTemplate));
7313 } 7313 }
7314 } 7314 }
7315 break; 7315 break;
@@ -7319,14 +7319,14 @@ namespace WixToolset.Core
7319 case "DiskPrompt": 7319 case "DiskPrompt":
7320 diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 7320 diskPrompt = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7321 this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined 7321 this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, "DiskPrompt"); // ensure the output has a DiskPrompt Property defined
7322 this.Core.Write(WarningMessages.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 7322 this.Core.Write(CompilerWarnings.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
7323 break; 7323 break;
7324 case "EmbedCab": 7324 case "EmbedCab":
7325 embedCab = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 7325 embedCab = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
7326 break; 7326 break;
7327 case "VolumeLabel": 7327 case "VolumeLabel":
7328 volumeLabel = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 7328 volumeLabel = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
7329 this.Core.Write(WarningMessages.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); 7329 this.Core.Write(CompilerWarnings.ReservedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
7330 break; 7330 break;
7331 case "MaximumUncompressedMediaSize": 7331 case "MaximumUncompressedMediaSize":
7332 maximumUncompressedMediaSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int32.MaxValue); 7332 maximumUncompressedMediaSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, Int32.MaxValue);
diff --git a/src/wix/WixToolset.Core/CompilerCore.cs b/src/wix/WixToolset.Core/CompilerCore.cs
index 5abd3f70..88b37ed8 100644
--- a/src/wix/WixToolset.Core/CompilerCore.cs
+++ b/src/wix/WixToolset.Core/CompilerCore.cs
@@ -716,7 +716,7 @@ namespace WixToolset.Core
716 } 716 }
717 else if (CompilerCore.IsAmbiguousFilename(value)) 717 else if (CompilerCore.IsAmbiguousFilename(value))
718 { 718 {
719 this.Write(WarningMessages.AmbiguousFileOrDirectoryName(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 719 this.Write(CompilerWarnings.AmbiguousFileOrDirectoryName(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
720 } 720 }
721 } 721 }
722 722
diff --git a/src/wix/WixToolset.Core/CompilerWarnings.cs b/src/wix/WixToolset.Core/CompilerWarnings.cs
index 6685f2b2..8c302a6e 100644
--- a/src/wix/WixToolset.Core/CompilerWarnings.cs
+++ b/src/wix/WixToolset.Core/CompilerWarnings.cs
@@ -2,6 +2,7 @@
2 2
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using System;
5 using WixToolset.Data; 6 using WixToolset.Data;
6 7
7 internal static class CompilerWarnings 8 internal static class CompilerWarnings
@@ -61,6 +62,191 @@ namespace WixToolset.Core
61 return Message(sourceLineNumbers, Ids.Win64Component, "The Provides element should not be authored in the 64-bit component with identifier {0}. The dependency feature may not work if installing this package on 64-bit Windows operating systems prior to Windows 7 and Windows Server 2008 R2. Set the Component/@Bitness attribute to \"always32\" to ensure the dependency feature works correctly on legacy operating systems.", componentId); 62 return Message(sourceLineNumbers, Ids.Win64Component, "The Provides element should not be authored in the 64-bit component with identifier {0}. The dependency feature may not work if installing this package on 64-bit Windows operating systems prior to Windows 7 and Windows Server 2008 R2. Set the Component/@Bitness attribute to \"always32\" to ensure the dependency feature works correctly on legacy operating systems.", componentId);
62 } 63 }
63 64
65 public static Message AllChangesIncludedInPatch(SourceLineNumber sourceLineNumbers)
66 {
67 return Message(sourceLineNumbers, Ids.AllChangesIncludedInPatch, "All changes between the baseline and upgraded packages will be included in the patch except for any change to the ProductCode. The 'All' element is supported primarily for testing purposes and negates the benefits of patch families.");
68 }
69
70 public static Message AmbiguousFileOrDirectoryName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
71 {
72 return Message(sourceLineNumbers, Ids.AmbiguousFileOrDirectoryName, "The {0}/@{1} attribute's value '{2}' is an ambiguous short name because it ends with a '~' character followed by a number. Under some circumstances, this name could resolve to more than one file or directory name and lead to unpredictable results (for example 'MICROS~1' may correspond to 'Microsoft Shared' or 'Microsoft Foo' or literally 'Micros~1').", elementName, attributeName, value);
73 }
74
75 public static Message AttributeShouldContain(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue, string expectedContains, string otherAttributeName, string otherAttributeValue)
76 {
77 return Message(sourceLineNumbers, Ids.AttributeShouldContain, "The {0}/@{1} attribute value '{2}' should contain '{3}' when the {0}/@{4} attribute is set to '{5}'.", elementName, attributeName, attributeValue, expectedContains, otherAttributeName, otherAttributeValue);
78 }
79
80 public static Message CopyFileFileIdUseless(SourceLineNumber sourceLineNumbers)
81 {
82 return Message(sourceLineNumbers, Ids.CopyFileFileIdUseless, "Since the CopyFile/@FileId attribute was specified but none of the following attributes (DestinationName, DestinationDirectory, DestinationProperty) were specified, this authoring will not do anything.");
83 }
84
85 public static Message DeprecatedPreProcVariable(SourceLineNumber sourceLineNumbers, string oldName, string newName)
86 {
87 return Message(sourceLineNumbers, Ids.DeprecatedPreProcVariable, "The built-in preprocessor variable '{0}' is deprecated. Please correct your authoring to use the new '{1}' preprocessor variable instead.", oldName, newName);
88 }
89
90 public static Message DeprecatedUpgradeProperty(SourceLineNumber sourceLineNumbers)
91 {
92 return Message(sourceLineNumbers, Ids.DeprecatedUpgradeProperty, "Specifying a Property element as a child of an Upgrade element has been deprecated. Please specify this Property element as a child of a different element such as Package or Fragment.");
93 }
94
95 public static Message DirectoryRedundantNames(SourceLineNumber sourceLineNumbers, string elementName, string shortNameAttributeName, string longNameAttributeName, string attributeValue)
96 {
97 return Message(sourceLineNumbers, Ids.DirectoryRedundantNames, "The {0} element's {1} and {2} values are both '{3}'. This is redundant; the {2} attribute should be removed.", elementName, shortNameAttributeName, longNameAttributeName, attributeValue);
98 }
99
100 public static Message DirectoryRedundantNames(SourceLineNumber sourceLineNumbers, string elementName, string sourceNameAttributeName, string longSourceAttributeName)
101 {
102 return Message(sourceLineNumbers, Ids.DirectoryRedundantNames, "The {0} element's source and destination names are identical. This is redundant; the {1} and {2} attributes should be removed if present.", elementName, sourceNameAttributeName, longSourceAttributeName);
103 }
104
105 public static Message DetectConditionRecommended(SourceLineNumber sourceLineNumbers, string elementName)
106 {
107 return Message(sourceLineNumbers, Ids.DetectConditionRecommended, "The {0}/@DetectCondition attribute is recommended so the package is only installed when absent.", elementName);
108 }
109
110 public static Message ExePackageDetectInformationRecommended(SourceLineNumber sourceLineNumbers)
111 {
112 return Message(sourceLineNumbers, Ids.ExePackageDetectInformationRecommended, "The ExePackage/@DetectCondition attribute or child element ArpEntry is recommended so the package is only installed when absent.");
113 }
114
115
116 public static Message FileSearchFileNameIssue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
117 {
118 return Message(sourceLineNumbers, Ids.FileSearchFileNameIssue, "The {0} element's {1} and {2} attributes were found. Due to a bug with the Windows Installer, only the Name or LongName attribute should be used. Use the Name attribute for 8.3 compliant file names and the LongName attribute for longer ones. When using only the LongName attribute, ICE03 should be ignored for the Signature table's FileName column.", elementName, attributeName1, attributeName2);
119 }
120
121 public static Message IdentifierCannotBeModularized(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string identifier, int length, int maximumLength)
122 {
123 return Message(sourceLineNumbers, Ids.IdentifierCannotBeModularized, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. It will be too long if modularized. The identifier shouldn't be longer than {4} characters long to allow for modularization (appending a guid for merge modules).", elementName, attributeName, identifier, length, maximumLength);
124 }
125
126 public static Message IdentifierTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
127 {
128 return Message(sourceLineNumbers, Ids.IdentifierTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for an identifier. Standard identifiers are 72 characters long or less.", elementName, attributeName, value);
129 }
130
131 public static Message MediaExternalCabinetFilenameIllegal(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
132 {
133 return Message(sourceLineNumbers, Ids.MediaExternalCabinetFilenameIllegal, "The {0}/@{1} attribute's value, '{2}', is not a valid external cabinet name. Legal cabinet names should follow 8.3 format: they should contain no more than 8 characters followed by an optional extension of no more than 3 characters. Any character except for the following may be used: \\ ? | > < : / * \" + , ; = [ ] (space). The Windows Installer team has recommended following the 8.3 format for external cabinet files and any other naming scheme is officially unsupported (which means it is not guaranteed to work on all platforms).", elementName, attributeName, value);
134 }
135
136 public static Message MissingUpgradeCode(SourceLineNumber sourceLineNumbers)
137 {
138 return Message(sourceLineNumbers, Ids.MissingUpgradeCode, "The Package/@UpgradeCode attribute was not found; it is strongly recommended to ensure that this package can be upgraded.");
139 }
140
141 public static Message OrphanedProgId(SourceLineNumber sourceLineNumbers, string progId)
142 {
143 return Message(sourceLineNumbers, Ids.OrphanedProgId, "ProgId '{0}' is orphaned. It has no associated component, so it will never install. Every ProgId should have either a parent Class element or child Extension element (at any distance).", progId);
144 }
145
146 public static Message PathCanonicalized(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string originalValue, string canonicalValue)
147 {
148 return Message(sourceLineNumbers, Ids.PathCanonicalized, "The {0}/@{1} attribute's value, '{2}', has been canonicalized to '{3}'.", elementName, attributeName, originalValue, canonicalValue);
149 }
150
151 public static Message PlaceholderValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
152 {
153 return Message(sourceLineNumbers, Ids.PlaceholderValue, "The {0}/@{1} attribute's value, '{2}', is a placeholder value used in example files. Please replace this placeholder with the appropriate value.", elementName, attributeName, value);
154 }
155
156 public static Message PreprocessorUnknownPragma(SourceLineNumber sourceLineNumbers, string pragmaName)
157 {
158 return Message(sourceLineNumbers, Ids.PreprocessorUnknownPragma, "The pragma '{0}' is unknown. Please ensure you have referenced the extension that defines this pragma.", pragmaName);
159 }
160
161 public static Message PreprocessorWarning(SourceLineNumber sourceLineNumbers, string message)
162 {
163 return Message(sourceLineNumbers, Ids.PreprocessorWarning, "{0}", message);
164 }
165
166 public static Message ProductIdAuthored(SourceLineNumber sourceLineNumbers)
167 {
168 return Message(sourceLineNumbers, Ids.ProductIdAuthored, "The 'ProductID' property should not be directly authored because it will prevent the ValidateProductID standard action from performing any validation during the installation. This property will be set by the ValidateProductID standard action or control event.");
169 }
170
171 public static Message PropertyModularizationSuppressed(SourceLineNumber sourceLineNumbers)
172 {
173 return Message(sourceLineNumbers, Ids.PropertyModularizationSuppressed, "The Property/@SuppressModularization attribute has been set to 'yes'. Using this functionality is strongly discouraged; it should only be necessary as a workaround of last resort in rare scenarios.");
174 }
175
176 public static Message PropertyUseless(SourceLineNumber sourceLineNumbers, string id)
177 {
178 return Message(sourceLineNumbers, Ids.PropertyUseless, "Property '{0}' does not contain a Value attribute and is not marked as Admin, Secure, or Hidden. The Property element is being ignored.", id);
179 }
180
181 public static Message PropertyValueContainsPropertyReference(SourceLineNumber sourceLineNumbers, string propertyId, string otherProperty)
182 {
183 return Message(sourceLineNumbers, Ids.PropertyValueContainsPropertyReference, "The '{0}' Property contains '[{1}]' in its value which is an illegal reference to another property. If this value is a string literal, not a property reference, please ignore this warning. To set a property with the value of another property, use a CustomAction with Property and Value attributes.", propertyId, otherProperty);
184 }
185
186 public static Message RemotePayloadsMustNotAlsoBeCompressed(SourceLineNumber sourceLineNumbers, string elementName)
187 {
188 return Message(sourceLineNumbers, Ids.RemotePayloadsMustNotAlsoBeCompressed, "The {0}/@Compressed attribute must have value 'no' when a RemotePayload child element is present. RemotePayload indicates that a package will always be downloaded and cannot be compressed into a bundle. To eliminate this warning, explicitly set the {0}/@Compressed attribute to 'no'.", elementName);
189 }
190
191 public static Message RequiresMsi200for64bitPackage(SourceLineNumber sourceLineNumbers)
192 {
193 return Message(sourceLineNumbers, Ids.RequiresMsi200for64bitPackage, "Package/@InstallerVersion must be 200 or greater for a 64-bit package. The value will be changed to 200. Please specify a value of 200 or greater in order to eliminate this warning.");
194 }
195
196 public static Message RequiresMsi500forArmPackage(SourceLineNumber sourceLineNumbers)
197 {
198 return Message(sourceLineNumbers, Ids.RequiresMsi500forArmPackage, "Package/@InstallerVersion must be 500 or greater for an ARM64 package. The value will be changed to 500. Please specify a value of 500 or greater in order to eliminate this warning.");
199 }
200
201 public static Message ReservedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
202 {
203 return Message(sourceLineNumbers, Ids.ReservedAttribute, "The {0}/@{1} attribute is reserved for future use and has no effect in this version of the WiX toolset.", elementName, attributeName);
204 }
205
206 public static Message ServiceConfigFamilyNotSupported(SourceLineNumber sourceLineNumbers, string elementName)
207 {
208 return Message(sourceLineNumbers, Ids.ServiceConfigFamilyNotSupported, "{0} functionality is documented in the Windows Installer SDK to \"not [work] as expected.\" Consider replacing {0} with the WixToolset.Util.wixext ServiceConfig element.", elementName);
209 }
210
211
212 public static Message UnableToResetAcls(string error)
213 {
214 return Message(null, Ids.UnableToResetAcls, "Unable to reset acls on destination files. Exception detail: {0}", error);
215 }
216
217 public static Message UnavailableBundleConditionVariable(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string variable, string illegalValueList)
218 {
219 return Message(sourceLineNumbers, Ids.UnavailableBundleConditionVariable, "{0}/@{1} contains the built-in Variable '{2}', which is not available when it is evaluated. (Unavailable Variables are: {3}.). Rewrite the condition to avoid Variables that are never valid during its evaluation.", elementName, attributeName, variable, illegalValueList);
220 }
221
222 public static Message UnclearShortcut(SourceLineNumber sourceLineNumbers, string shortcutId, string fileId, string componentId)
223 {
224 return Message(sourceLineNumbers, Ids.UnclearShortcut, "Because it is an advertised shortcut, the target of shortcut '{0}' will be the keypath of component '{2}' rather than parent file '{1}'. To eliminate this warning, you can (1) make the Shortcut element a child of the File element that is the keypath of component '{2}', (2) make file '{1}' the keypath of component '{2}', or (3) remove the @Advertise attribute so the shortcut is a non-advertised shortcut.", shortcutId, fileId, componentId);
225 }
226
227 public static Message UnsupportedCommandLineArgumentValue(string arg, string value, string fallback)
228 {
229 return Message(null, Ids.UnsupportedCommandLineArgument, "The value '{0}' is not a valid value for command line argument '{1}'. Using the value '{2}' instead.", value, arg, fallback);
230 }
231
232 public static Message UxPayloadsOnlySupportEmbedding(SourceLineNumber sourceLineNumbers, string sourceFile)
233 {
234 return Message(sourceLineNumbers, Ids.UxPayloadsOnlySupportEmbedding, "A bootstrapper application or bundle extension payload ('{0}') was marked for something other than embedded packaging, possibly because it included a @DownloadUrl attribute. Bootstrapper application and bundle extension payloads must be embedded in the bundle, so the requested packaging is being ignored and the file is being embedded anyway.", sourceFile);
235 }
236
237 public static Message VariableDeclarationCollision(SourceLineNumber sourceLineNumbers, string variableName, string variableValue, string variableCollidingValue)
238 {
239 return Message(sourceLineNumbers, Ids.VariableDeclarationCollision, "The variable '{0}' with value '{1}' was previously declared with value '{2}'.", variableName, variableValue, variableCollidingValue);
240 }
241
242
243
244
245 public static Message VBScriptIsDeprecated(SourceLineNumber sourceLineNumbers)
246 {
247 return Message(sourceLineNumbers, Ids.VBScriptIsDeprecated, "VBScript is a deprecated Windows component: https://learn.microsoft.com/en-us/windows/whats-new/deprecated-features. VBScript custom actions might fail on some Windows systems. Rewrite or eliminate VBScript custom actions for best compatibility.");
248 }
249
64 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 250 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
65 { 251 {
66 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); 252 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
@@ -68,6 +254,41 @@ namespace WixToolset.Core
68 254
69 public enum Ids 255 public enum Ids
70 { 256 {
257 IdentifierCannotBeModularized = 1000,
258 CopyFileFileIdUseless = 1003,
259 OrphanedProgId = 1005,
260 PropertyUseless = 1006,
261 IdentifierTooLong = 1026,
262 DirectoryRedundantNames = 1031,
263 UnableToResetAcls = 1032,
264 MediaExternalCabinetFilenameIllegal = 1033,
265 DeprecatedPreProcVariable = 1034,
266 FileSearchFileNameIssue = 1043,
267 AmbiguousFileOrDirectoryName = 1044,
268 PlaceholderValue = 1074,
269 MissingUpgradeCode = 1075,
270 PropertyValueContainsPropertyReference = 1077,
271 DeprecatedUpgradeProperty = 1078,
272 ProductIdAuthored = 1083,
273 PropertyModularizationSuppressed = 1086,
274 PreprocessorWarning = 1096,
275 UnsupportedCommandLineArgument = 1098,
276 UnclearShortcut = 1113,
277 VariableDeclarationCollision = 1118,
278 RequiresMsi200for64bitPackage = 1121,
279 PreprocessorUnknownPragma = 1125,
280 UxPayloadsOnlySupportEmbedding = 1127,
281 AttributeShouldContain = 1136,
282 ReservedAttribute = 1142,
283 RequiresMsi500forArmPackage = 1143,
284 RemotePayloadsMustNotAlsoBeCompressed = 1144,
285 AllChangesIncludedInPatch = 1145,
286 ServiceConfigFamilyNotSupported = 1149,
287 PathCanonicalized = 1152,
288 DetectConditionRecommended = 1153,
289 UnavailableBundleConditionVariable = 1159,
290 ExePackageDetectInformationRecommended = 1161,
291 VBScriptIsDeprecated = 1163,
71 ProvidesKeyNotFound = 5431, 292 ProvidesKeyNotFound = 5431,
72 RequiresKeyNotFound = 5432, 293 RequiresKeyNotFound = 5432,
73 PropertyRemoved = 5433, 294 PropertyRemoved = 5433,
@@ -76,7 +297,6 @@ namespace WixToolset.Core
76 DirectoryRefStandardDirectoryDeprecated = 5436, 297 DirectoryRefStandardDirectoryDeprecated = 5436,
77 DefiningStandardDirectoryDeprecated = 5437, 298 DefiningStandardDirectoryDeprecated = 5437,
78 ReadonlyLogVariableTarget = 5438, 299 ReadonlyLogVariableTarget = 5438,
79 // DO_NOT_REUSE ReservedBurnNamespaceWarning = 5439,
80 PatchCreationDeprecated = 5440, 300 PatchCreationDeprecated = 5440,
81 } // 5400-5499 and 6600-6699 were the ranges for Dependency and Tag which are now in Core between CompilerWarnings and CompilerErrors. 301 } // 5400-5499 and 6600-6699 were the ranges for Dependency and Tag which are now in Core between CompilerWarnings and CompilerErrors.
82 } 302 }
diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs
index 81f759a1..2a36581c 100644
--- a/src/wix/WixToolset.Core/Compiler_Bundle.cs
+++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs
@@ -2518,7 +2518,7 @@ namespace WixToolset.Core
2518 } 2518 }
2519 else 2519 else
2520 { 2520 {
2521 this.Core.Write(WarningMessages.ExePackageDetectInformationRecommended(sourceLineNumbers)); 2521 this.Core.Write(CompilerWarnings.ExePackageDetectInformationRecommended(sourceLineNumbers));
2522 } 2522 }
2523 } 2523 }
2524 2524
@@ -2536,17 +2536,17 @@ namespace WixToolset.Core
2536 { 2536 {
2537 if (null == installArguments || -1 == installArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 2537 if (null == installArguments || -1 == installArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2538 { 2538 {
2539 this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "InstallArguments", installArguments, expectedArgument, "Protocol", "netfx4")); 2539 this.Core.Write(CompilerWarnings.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "InstallArguments", installArguments, expectedArgument, "Protocol", "netfx4"));
2540 } 2540 }
2541 2541
2542 if (!String.IsNullOrEmpty(repairArguments) && -1 == repairArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 2542 if (!String.IsNullOrEmpty(repairArguments) && -1 == repairArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2543 { 2543 {
2544 this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "RepairArguments", repairArguments, expectedArgument, "Protocol", "netfx4")); 2544 this.Core.Write(CompilerWarnings.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "RepairArguments", repairArguments, expectedArgument, "Protocol", "netfx4"));
2545 } 2545 }
2546 2546
2547 if (!String.IsNullOrEmpty(uninstallArguments) && -1 == uninstallArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase)) 2547 if (!String.IsNullOrEmpty(uninstallArguments) && -1 == uninstallArguments.IndexOf(expectedArgument, StringComparison.OrdinalIgnoreCase))
2548 { 2548 {
2549 this.Core.Write(WarningMessages.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "UninstallArguments", uninstallArguments, expectedArgument, "Protocol", "netfx4")); 2549 this.Core.Write(CompilerWarnings.AttributeShouldContain(sourceLineNumbers, node.Name.LocalName, "UninstallArguments", uninstallArguments, expectedArgument, "Protocol", "netfx4"));
2550 } 2550 }
2551 } 2551 }
2552 2552
@@ -2578,7 +2578,7 @@ namespace WixToolset.Core
2578 // Detect condition is recommended for Msu packages. 2578 // Detect condition is recommended for Msu packages.
2579 if (String.IsNullOrEmpty(detectCondition)) 2579 if (String.IsNullOrEmpty(detectCondition))
2580 { 2580 {
2581 this.Core.Write(WarningMessages.DetectConditionRecommended(sourceLineNumbers, node.Name.LocalName)); 2581 this.Core.Write(CompilerWarnings.DetectConditionRecommended(sourceLineNumbers, node.Name.LocalName));
2582 } 2582 }
2583 } 2583 }
2584 2584
diff --git a/src/wix/WixToolset.Core/Compiler_Module.cs b/src/wix/WixToolset.Core/Compiler_Module.cs
index 41a75165..788b0f0c 100644
--- a/src/wix/WixToolset.Core/Compiler_Module.cs
+++ b/src/wix/WixToolset.Core/Compiler_Module.cs
@@ -45,7 +45,7 @@ namespace WixToolset.Core
45 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 45 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
46 if ("PUT-MODULE-NAME-HERE" == this.activeName) 46 if ("PUT-MODULE-NAME-HERE" == this.activeName)
47 { 47 {
48 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName)); 48 this.Core.Write(CompilerWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName));
49 } 49 }
50 else 50 else
51 { 51 {
diff --git a/src/wix/WixToolset.Core/Compiler_Package.cs b/src/wix/WixToolset.Core/Compiler_Package.cs
index 004c8c1d..00e2d6dc 100644
--- a/src/wix/WixToolset.Core/Compiler_Package.cs
+++ b/src/wix/WixToolset.Core/Compiler_Package.cs
@@ -73,14 +73,14 @@ namespace WixToolset.Core
73 manufacturer = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters); 73 manufacturer = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters);
74 if ("PUT-COMPANY-NAME-HERE" == manufacturer) 74 if ("PUT-COMPANY-NAME-HERE" == manufacturer)
75 { 75 {
76 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, manufacturer)); 76 this.Core.Write(CompilerWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, manufacturer));
77 } 77 }
78 break; 78 break;
79 case "Name": 79 case "Name":
80 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters); 80 this.activeName = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.MustHaveNonWhitespaceCharacters);
81 if ("PUT-PRODUCT-NAME-HERE" == this.activeName) 81 if ("PUT-PRODUCT-NAME-HERE" == this.activeName)
82 { 82 {
83 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName)); 83 this.Core.Write(CompilerWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, this.activeName));
84 } 84 }
85 break; 85 break;
86 case "ProductCode": 86 case "ProductCode":
@@ -165,7 +165,7 @@ namespace WixToolset.Core
165 { 165 {
166 if (id is null) 166 if (id is null)
167 { 167 {
168 this.Core.Write(WarningMessages.MissingUpgradeCode(sourceLineNumbers)); 168 this.Core.Write(CompilerWarnings.MissingUpgradeCode(sourceLineNumbers));
169 } 169 }
170 else 170 else
171 { 171 {
@@ -510,13 +510,13 @@ namespace WixToolset.Core
510 if (String.Equals(platform, "X64", StringComparison.OrdinalIgnoreCase) && 200 > msiVersion) 510 if (String.Equals(platform, "X64", StringComparison.OrdinalIgnoreCase) && 200 > msiVersion)
511 { 511 {
512 msiVersion = 200; 512 msiVersion = 200;
513 this.Core.Write(WarningMessages.RequiresMsi200for64bitPackage(sourceLineNumbers)); 513 this.Core.Write(CompilerWarnings.RequiresMsi200for64bitPackage(sourceLineNumbers));
514 } 514 }
515 515
516 if (String.Equals(platform, "Arm64", StringComparison.OrdinalIgnoreCase) && 500 > msiVersion) 516 if (String.Equals(platform, "Arm64", StringComparison.OrdinalIgnoreCase) && 500 > msiVersion)
517 { 517 {
518 msiVersion = 500; 518 msiVersion = 500;
519 this.Core.Write(WarningMessages.RequiresMsi500forArmPackage(sourceLineNumbers)); 519 this.Core.Write(CompilerWarnings.RequiresMsi500forArmPackage(sourceLineNumbers));
520 } 520 }
521 521
522 this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers) 522 this.Core.AddSymbol(new SummaryInformationSymbol(sourceLineNumbers)
@@ -871,7 +871,7 @@ namespace WixToolset.Core
871 packageAuthor = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 871 packageAuthor = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
872 if ("PUT-COMPANY-NAME-HERE" == packageAuthor) 872 if ("PUT-COMPANY-NAME-HERE" == packageAuthor)
873 { 873 {
874 this.Core.Write(WarningMessages.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, packageAuthor)); 874 this.Core.Write(CompilerWarnings.PlaceholderValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, packageAuthor));
875 } 875 }
876 break; 876 break;
877 default: 877 default:
@@ -1443,7 +1443,7 @@ namespace WixToolset.Core
1443 // raise an error for an orphaned ProgId 1443 // raise an error for an orphaned ProgId
1444 if (YesNoType.Yes == advertise && !foundExtension && null == parent && null == classId) 1444 if (YesNoType.Yes == advertise && !foundExtension && null == parent && null == classId)
1445 { 1445 {
1446 this.Core.Write(WarningMessages.OrphanedProgId(sourceLineNumbers, progId)); 1446 this.Core.Write(CompilerWarnings.OrphanedProgId(sourceLineNumbers, progId));
1447 } 1447 }
1448 1448
1449 return progId; 1449 return progId;
@@ -1509,7 +1509,7 @@ namespace WixToolset.Core
1509 } 1509 }
1510 else if ("ProductID" == id.Id) 1510 else if ("ProductID" == id.Id)
1511 { 1511 {
1512 this.Core.Write(WarningMessages.ProductIdAuthored(sourceLineNumbers)); 1512 this.Core.Write(CompilerWarnings.ProductIdAuthored(sourceLineNumbers));
1513 } 1513 }
1514 else if ("SecureCustomProperties" == id.Id || "AdminProperties" == id.Id || "MsiHiddenProperties" == id.Id) 1514 else if ("SecureCustomProperties" == id.Id || "AdminProperties" == id.Id || "MsiHiddenProperties" == id.Id)
1515 { 1515 {
@@ -1572,7 +1572,7 @@ namespace WixToolset.Core
1572 // the element. 1572 // the element.
1573 if (String.IsNullOrEmpty(value) && !admin && !secure && !hidden) 1573 if (String.IsNullOrEmpty(value) && !admin && !secure && !hidden)
1574 { 1574 {
1575 this.Core.Write(WarningMessages.PropertyUseless(sourceLineNumbers, id.Id)); 1575 this.Core.Write(CompilerWarnings.PropertyUseless(sourceLineNumbers, id.Id));
1576 } 1576 }
1577 else // there is a value and/or a flag set, do that. 1577 else // there is a value and/or a flag set, do that.
1578 { 1578 {
@@ -1582,7 +1582,7 @@ namespace WixToolset.Core
1582 1582
1583 if (!this.Core.EncounteredError && YesNoType.Yes == suppressModularization) 1583 if (!this.Core.EncounteredError && YesNoType.Yes == suppressModularization)
1584 { 1584 {
1585 this.Core.Write(WarningMessages.PropertyModularizationSuppressed(sourceLineNumbers)); 1585 this.Core.Write(CompilerWarnings.PropertyModularizationSuppressed(sourceLineNumbers));
1586 1586
1587 this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers) 1587 this.Core.AddSymbol(new WixSuppressModularizationSymbol(sourceLineNumbers)
1588 { 1588 {
@@ -2758,7 +2758,7 @@ namespace WixToolset.Core
2758 string requiredPrivileges = null; 2758 string requiredPrivileges = null;
2759 string sid = null; 2759 string sid = null;
2760 2760
2761 this.Core.Write(WarningMessages.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName)); 2761 this.Core.Write(CompilerWarnings.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName));
2762 2762
2763 foreach (var attrib in node.Attributes()) 2763 foreach (var attrib in node.Attributes())
2764 { 2764 {
@@ -3140,7 +3140,7 @@ namespace WixToolset.Core
3140 string actions = null; 3140 string actions = null;
3141 string actionsDelays = null; 3141 string actionsDelays = null;
3142 3142
3143 this.Core.Write(WarningMessages.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName)); 3143 this.Core.Write(CompilerWarnings.ServiceConfigFamilyNotSupported(sourceLineNumbers, node.Name.LocalName));
3144 3144
3145 foreach (var attrib in node.Attributes()) 3145 foreach (var attrib in node.Attributes())
3146 { 3146 {
@@ -4331,7 +4331,7 @@ namespace WixToolset.Core
4331 { 4331 {
4332 if (YesNoType.Yes != parentKeyPath && "Component" != parentElementLocalName) 4332 if (YesNoType.Yes != parentKeyPath && "Component" != parentElementLocalName)
4333 { 4333 {
4334 this.Core.Write(WarningMessages.UnclearShortcut(sourceLineNumbers, id.Id, componentId, defaultTarget)); 4334 this.Core.Write(CompilerWarnings.UnclearShortcut(sourceLineNumbers, id.Id, componentId, defaultTarget));
4335 } 4335 }
4336 4336
4337 target = Guid.Empty.ToString("B"); 4337 target = Guid.Empty.ToString("B");
@@ -4738,7 +4738,7 @@ namespace WixToolset.Core
4738 { 4738 {
4739 case "Property": 4739 case "Property":
4740 this.ParsePropertyElement(child); 4740 this.ParsePropertyElement(child);
4741 this.Core.Write(WarningMessages.DeprecatedUpgradeProperty(childSourceLineNumbers)); 4741 this.Core.Write(CompilerWarnings.DeprecatedUpgradeProperty(childSourceLineNumbers));
4742 break; 4742 break;
4743 case "UpgradeVersion": 4743 case "UpgradeVersion":
4744 this.ParseUpgradeVersionElement(child, id); 4744 this.ParseUpgradeVersionElement(child, id);
diff --git a/src/wix/WixToolset.Core/Compiler_Patch.cs b/src/wix/WixToolset.Core/Compiler_Patch.cs
index e20737dd..98bbf6a6 100644
--- a/src/wix/WixToolset.Core/Compiler_Patch.cs
+++ b/src/wix/WixToolset.Core/Compiler_Patch.cs
@@ -715,7 +715,7 @@ namespace WixToolset.Core
715 this.Core.ParseForExtensionElements(node); 715 this.Core.ParseForExtensionElements(node);
716 716
717 // Always warn when using the All element. 717 // Always warn when using the All element.
718 this.Core.Write(WarningMessages.AllChangesIncludedInPatch(sourceLineNumbers)); 718 this.Core.Write(CompilerWarnings.AllChangesIncludedInPatch(sourceLineNumbers));
719 719
720 if (!this.Core.EncounteredError) 720 if (!this.Core.EncounteredError)
721 { 721 {
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs b/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs
index 77ab4ed7..f55a9823 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs
@@ -162,7 +162,7 @@ namespace WixToolset.Core.ExtensibilityServices
162 var canonicalizedPath = normalizedPath.Substring(root.Length); 162 var canonicalizedPath = normalizedPath.Substring(root.Length);
163 if (canonicalizedPath != relativePath) 163 if (canonicalizedPath != relativePath)
164 { 164 {
165 this.Messaging.Write(WarningMessages.PathCanonicalized(sourceLineNumbers, elementName, attributeName, relativePath, canonicalizedPath)); 165 this.Messaging.Write(CompilerWarnings.PathCanonicalized(sourceLineNumbers, elementName, attributeName, relativePath, canonicalizedPath));
166 } 166 }
167 return canonicalizedPath; 167 return canonicalizedPath;
168 } 168 }
@@ -341,7 +341,7 @@ namespace WixToolset.Core.ExtensibilityServices
341 if (condition.Contains(variableName)) 341 if (condition.Contains(variableName))
342 { 342 {
343 var illegalValues = CreateValueList(ValueListKind.Or, unavailableVariables); 343 var illegalValues = CreateValueList(ValueListKind.Or, unavailableVariables);
344 this.Messaging.Write(WarningMessages.UnavailableBundleConditionVariable(sourceLineNumbers, elementName, attributeName, variableName, illegalValues)); 344 this.Messaging.Write(CompilerWarnings.UnavailableBundleConditionVariable(sourceLineNumbers, elementName, attributeName, variableName, illegalValues));
345 345
346 return false; 346 return false;
347 } 347 }
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
index 57d19450..41bfd382 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
@@ -444,7 +444,7 @@ namespace WixToolset.Core.ExtensibilityServices
444 } 444 }
445 else if (72 < value.Length) 445 else if (72 < value.Length)
446 { 446 {
447 this.Messaging.Write(WarningMessages.IdentifierTooLong(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 447 this.Messaging.Write(CompilerWarnings.IdentifierTooLong(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
448 } 448 }
449 449
450 return new Identifier(access, value); 450 return new Identifier(access, value);
@@ -488,7 +488,7 @@ namespace WixToolset.Core.ExtensibilityServices
488 } 488 }
489 else if (CompilerCore.IsAmbiguousFilename(value)) 489 else if (CompilerCore.IsAmbiguousFilename(value))
490 { 490 {
491 this.Messaging.Write(WarningMessages.AmbiguousFileOrDirectoryName(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 491 this.Messaging.Write(CompilerWarnings.AmbiguousFileOrDirectoryName(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
492 } 492 }
493 } 493 }
494 494
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs b/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
index 3cdd0f43..d8951c67 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
@@ -48,7 +48,7 @@ namespace WixToolset.Core.ExtensibilityServices
48 { 48 {
49 if (showWarning && value != currentValue) 49 if (showWarning && value != currentValue)
50 { 50 {
51 this.Messaging.Write(WarningMessages.VariableDeclarationCollision(context.CurrentSourceLineNumber, name, value, currentValue)); 51 this.Messaging.Write(CompilerWarnings.VariableDeclarationCollision(context.CurrentSourceLineNumber, name, value, currentValue));
52 } 52 }
53 53
54 context.Variables[name] = value; 54 context.Variables[name] = value;
@@ -226,7 +226,7 @@ namespace WixToolset.Core.ExtensibilityServices
226 return context.CurrentSourceLineNumber.FileName; 226 return context.CurrentSourceLineNumber.FileName;
227 227
228 case "PLATFORM": 228 case "PLATFORM":
229 this.Messaging.Write(WarningMessages.DeprecatedPreProcVariable(context.CurrentSourceLineNumber, "$(sys.PLATFORM)", "$(sys.BUILDARCH)")); 229 this.Messaging.Write(CompilerWarnings.DeprecatedPreProcVariable(context.CurrentSourceLineNumber, "$(sys.PLATFORM)", "$(sys.BUILDARCH)"));
230 230
231 goto case "BUILDARCH"; 231 goto case "BUILDARCH";
232 232
@@ -320,7 +320,7 @@ namespace WixToolset.Core.ExtensibilityServices
320 { 320 {
321 // Add any core defined pragmas here 321 // Add any core defined pragmas here
322 default: 322 default:
323 this.Messaging.Write(WarningMessages.PreprocessorUnknownPragma(context.CurrentSourceLineNumber, pragmaName)); 323 this.Messaging.Write(CompilerWarnings.PreprocessorUnknownPragma(context.CurrentSourceLineNumber, pragmaName));
324 break; 324 break;
325 } 325 }
326 break; 326 break;
@@ -331,7 +331,7 @@ namespace WixToolset.Core.ExtensibilityServices
331 { 331 {
332 if (!extension.ProcessPragma(prefix, pragma, args, parent)) 332 if (!extension.ProcessPragma(prefix, pragma, args, parent))
333 { 333 {
334 this.Messaging.Write(WarningMessages.PreprocessorUnknownPragma(context.CurrentSourceLineNumber, pragmaName)); 334 this.Messaging.Write(CompilerWarnings.PreprocessorUnknownPragma(context.CurrentSourceLineNumber, pragmaName));
335 } 335 }
336 } 336 }
337 break; 337 break;
diff --git a/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
index a9f4e027..092a1737 100644
--- a/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
+++ b/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
@@ -69,7 +69,7 @@ namespace WixToolset.Core.Link
69 { 69 {
70 if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType) 70 if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType)
71 { 71 {
72 this.Messaging.Write(WarningMessages.UnexpectedEntrySection(section.Symbols.FirstOrDefault()?.SourceLineNumbers, section.Type.ToString(), expectedEntrySectionType.ToString())); 72 this.Messaging.Write(LinkerWarnings.UnexpectedEntrySection(section.Symbols.FirstOrDefault()?.SourceLineNumbers, section.Type.ToString(), expectedEntrySectionType.ToString()));
73 } 73 }
74 74
75 if (null == this.EntrySection) 75 if (null == this.EntrySection)
diff --git a/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs b/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs
index 48b2286d..f69c8685 100644
--- a/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs
+++ b/src/wix/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs
@@ -183,7 +183,7 @@ namespace WixToolset.Core.Link
183 } 183 }
184 else if (PackagingType.Embedded != payloadSymbol.Packaging) 184 else if (PackagingType.Embedded != payloadSymbol.Packaging)
185 { 185 {
186 this.Messaging.Write(WarningMessages.UxPayloadsOnlySupportEmbedding(payloadSymbol.SourceLineNumbers, payloadSymbol.SourceFile.Path)); 186 this.Messaging.Write(CompilerWarnings.UxPayloadsOnlySupportEmbedding(payloadSymbol.SourceLineNumbers, payloadSymbol.SourceFile.Path));
187 payloadSymbol.Packaging = PackagingType.Embedded; 187 payloadSymbol.Packaging = PackagingType.Embedded;
188 } 188 }
189 } 189 }
diff --git a/src/wix/WixToolset.Core/Linker.cs b/src/wix/WixToolset.Core/Linker.cs
index b119e4be..d2dc1887 100644
--- a/src/wix/WixToolset.Core/Linker.cs
+++ b/src/wix/WixToolset.Core/Linker.cs
@@ -906,7 +906,7 @@ namespace WixToolset.Core
906 { 906 {
907 if (!multipleFeatureComponents.Contains(connectionId)) 907 if (!multipleFeatureComponents.Contains(connectionId))
908 { 908 {
909 this.Messaging.Write(WarningMessages.ImplicitComponentPrimaryFeature(connectionId)); 909 this.Messaging.Write(LinkerWarnings.ImplicitComponentPrimaryFeature(connectionId));
910 910
911 // remember this component so only one warning is generated for it 911 // remember this component so only one warning is generated for it
912 multipleFeatureComponents[connectionId] = null; 912 multipleFeatureComponents[connectionId] = null;
@@ -914,7 +914,7 @@ namespace WixToolset.Core
914 } 914 }
915 else 915 else
916 { 916 {
917 this.Messaging.Write(WarningMessages.ImplicitMergeModulePrimaryFeature(connectionId)); 917 this.Messaging.Write(LinkerWarnings.ImplicitMergeModulePrimaryFeature(connectionId));
918 } 918 }
919 } 919 }
920 920
diff --git a/src/wix/WixToolset.Core/LinkerWarnings.cs b/src/wix/WixToolset.Core/LinkerWarnings.cs
index 0eca090e..554e2d0f 100644
--- a/src/wix/WixToolset.Core/LinkerWarnings.cs
+++ b/src/wix/WixToolset.Core/LinkerWarnings.cs
@@ -16,6 +16,21 @@ namespace WixToolset.Core
16 return Message(sourceLineNumbers, Ids.PayloadInMultipleContainers, "The Payload '{0}' can't be added to Container '{1}' because it was already added to Container '{2}'.", payloadId, containerId1, containerId2); 16 return Message(sourceLineNumbers, Ids.PayloadInMultipleContainers, "The Payload '{0}' can't be added to Container '{1}' because it was already added to Container '{2}'.", payloadId, containerId1, containerId2);
17 } 17 }
18 18
19 public static Message ImplicitComponentPrimaryFeature(string componentId)
20 {
21 return Message(null, Ids.ImplicitComponentPrimaryFeature, "The component '{0}' does not have an explicit primary feature parent specified. If the source files are linked in a different order, the primary parent feature may change. To prevent accidental changes, the primary feature parent should be set to 'yes' in one of the ComponentRef/@Primary, ComponentGroupRef/@Primary, or FeatureGroupRef/@Primary locations for this component.", componentId);
22 }
23
24 public static Message ImplicitMergeModulePrimaryFeature(string componentId)
25 {
26 return Message(null, Ids.ImplicitMergeModulePrimaryFeature, "The merge module '{0}' does not have an explicit primary feature parent specified. If the source files are linked in a different order, the primary parent feature may change. To prevent accidental changes, the primary feature parent should be set to 'yes' in one of the MergeRef/@Primary or FeatureGroupRef/@Primary locations for this component.", componentId);
27 }
28
29 public static Message UnexpectedEntrySection(SourceLineNumber sourceLineNumbers, string sectionType, string expectedType)
30 {
31 return Message(sourceLineNumbers, Ids.UnexpectedEntrySection, "Found entry point <{0}> that does not match expected <{1}> output type. Verify that your source code is correct and matches the expected output type.", sectionType, expectedType);
32 }
33
19 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 34 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
20 { 35 {
21 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); 36 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
@@ -23,6 +38,9 @@ namespace WixToolset.Core
23 38
24 public enum Ids 39 public enum Ids
25 { 40 {
41 ImplicitComponentPrimaryFeature = 1049,
42 ImplicitMergeModulePrimaryFeature = 1084,
43 UnexpectedEntrySection = 1109,
26 LayoutPayloadInContainer = 6900, 44 LayoutPayloadInContainer = 6900,
27 PayloadInMultipleContainers = 6901, 45 PayloadInMultipleContainers = 6901,
28 } // last available is 6999. 7000 is LinkerErrors. 46 } // last available is 6999. 7000 is LinkerErrors.
diff --git a/src/wix/WixToolset.Core/Preprocessor.cs b/src/wix/WixToolset.Core/Preprocessor.cs
index c403d73b..e6e718c6 100644
--- a/src/wix/WixToolset.Core/Preprocessor.cs
+++ b/src/wix/WixToolset.Core/Preprocessor.cs
@@ -568,7 +568,7 @@ namespace WixToolset.Core
568 // Resolve other variables in the warning message. 568 // Resolve other variables in the warning message.
569 warningMessage = state.Helper.PreprocessString(state.Context, warningMessage); 569 warningMessage = state.Helper.PreprocessString(state.Context, warningMessage);
570 570
571 this.Messaging.Write(WarningMessages.PreprocessorWarning(state.Context.CurrentSourceLineNumber, warningMessage)); 571 this.Messaging.Write(CompilerWarnings.PreprocessorWarning(state.Context.CurrentSourceLineNumber, warningMessage));
572 } 572 }
573 573
574 /// <summary> 574 /// <summary>
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs
index eeee46b1..95682989 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs
@@ -73,7 +73,7 @@ namespace WixToolsetTest.CoreIntegration
73 73
74 result.AssertSuccess(); 74 result.AssertSuccess();
75 75
76 Assert.Single(result.Messages, m => m.Id == (int)WarningMessages.Ids.PathCanonicalized); 76 Assert.Single(result.Messages, m => m.Id == 1152); // CompilerWarnings.PathCanonicalized
77 77
78 var intermediate = Intermediate.Load(wixlibPath); 78 var intermediate = Intermediate.Load(wixlibPath);
79 var allSymbols = intermediate.Sections.SelectMany(s => s.Symbols); 79 var allSymbols = intermediate.Sections.SelectMany(s => s.Symbols);
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/WarningFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
index 32785bde..88855133 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/WarningFixture.cs
@@ -53,7 +53,7 @@ namespace WixToolsetTest.CoreIntegration
53 "-o", wixlibPath, 53 "-o", wixlibPath,
54 }); 54 });
55 55
56 Assert.Equal((int)WarningMessages.Ids.PathCanonicalized, result.ExitCode); 56 Assert.Equal(1152, result.ExitCode); // CompilerWarnings.PathCanonicalized
57 57
58 var message = Assert.Single(result.Messages); 58 var message = Assert.Single(result.Messages);
59 Assert.Equal(MessageLevel.Error, message.Level); 59 Assert.Equal(MessageLevel.Error, message.Level);