main
cs 866 lines 66.8 KB
Raw
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
3 namespace WixToolset.Data
4 {
5 using System;
6 using System.Resources;
7
8 public static class WarningMessages
9 {
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)
101 {
102 return Message(sourceLineNumbers, Ids.DeprecatedAttribute, "The {0}/@{1} attribute has been deprecated.", elementName, attributeName);
103 }
104
105 public static Message DeprecatedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string newAttributeName)
106 {
107 return Message(sourceLineNumbers, Ids.DeprecatedAttribute, "The {0}/@{1} attribute has been deprecated. Please use the {2} attribute instead.", elementName, attributeName, newAttributeName);
108 }
109
110 public static Message DeprecatedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string newAttributeName1, string newAttributeName2)
111 {
112 return Message(sourceLineNumbers, Ids.DeprecatedAttribute, "The {0}/@{1} attribute has been deprecated. Please use the {2} or {3} attribute instead.", elementName, attributeName, newAttributeName1, newAttributeName2);
113 }
114
115 public static Message DeprecatedAttributeValue(SourceLineNumber sourceLineNumbers, string attributeValue, string elementName, string attributeName)
116 {
117 return Message(sourceLineNumbers, Ids.DeprecatedAttributeValue, "The value \"{0}\" for the {1}/@{2} attribute has been deprecated. Remove the attribute.", attributeValue, elementName, attributeName);
118 }
119
120 public static Message DeprecatedAttributeValue(SourceLineNumber sourceLineNumbers, string attributeValue, string elementName, string attributeName, string newAttributeValue)
121 {
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);
123 }
124
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)
141 {
142 return Message(sourceLineNumbers, Ids.DeprecatedElement, "The {0} element has been deprecated.", elementName);
143 }
144
145 public static Message DeprecatedElement(SourceLineNumber sourceLineNumbers, string elementName, string newElementName)
146 {
147 return Message(sourceLineNumbers, Ids.DeprecatedElement, "The {0} element has been deprecated. Please use the {1} element instead.", elementName, newElementName);
148 }
149
150 public static Message DeprecatedElement(SourceLineNumber sourceLineNumbers, string elementName, string newElementName1, string newElementName2)
151 {
152 return Message(sourceLineNumbers, Ids.DeprecatedElement, "The {0} element has been deprecated. Please use the {1} or {2} element instead.", elementName, newElementName1, newElementName2);
153 }
154
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 DeprecatedPatchSequenceTargetAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
171 {
172 return Message(sourceLineNumbers, Ids.DeprecatedPatchSequenceTargetAttribute, "The {0}/@{1} attribute has been deprecated in favor of the more strongly-typed ProductCode or TargetImage attributes. Please use the ProductCode attribute for indicating the ProductCode of a patch family directly, or the TargetImage attribute to specify the TargetImage which in turn will retrieve the ProductCode of the patch family.", elementName, attributeName);
173 }
174
175 public static Message DeprecatedPreProcVariable(SourceLineNumber sourceLineNumbers, string oldName, string newName)
176 {
177 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);
178 }
179
180 public static Message DeprecatedQuestionMarksGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
181 {
182 return Message(sourceLineNumbers, Ids.DeprecatedQuestionMarksGuid, "The {0}/@{1} attribute's value '????????-????-????-????-????????????' has been deprecated. Use '*' instead.", elementName, attributeName);
183 }
184
185 public static Message DeprecatedRegistryElement(SourceLineNumber sourceLineNumbers)
186 {
187 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.");
188 }
189
190 public static Message DeprecatedRegistryKeyActionAttribute(SourceLineNumber sourceLineNumbers)
191 {
192 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.");
193 }
194
195 public static Message DeprecatedTable(string tableName)
196 {
197 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);
198 }
199
200 public static Message DeprecatedUpgradeProperty(SourceLineNumber sourceLineNumbers)
201 {
202 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.");
203 }
204
205 public static Message DirectoryInUse(SourceLineNumber sourceLineNumbers, string filePath)
206 {
207 return Message(sourceLineNumbers, Ids.DirectoryInUse, "The directory '{0}' is in use and cannot be deleted.", filePath);
208 }
209
210 public static Message DirectoryRedundantNames(SourceLineNumber sourceLineNumbers, string elementName, string shortNameAttributeName, string longNameAttributeName, string attributeValue)
211 {
212 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);
213 }
214
215 public static Message DirectoryRedundantNames(SourceLineNumber sourceLineNumbers, string elementName, string sourceNameAttributeName, string longSourceAttributeName)
216 {
217 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);
218 }
219
220 public static Message DiscardedRollbackBoundary(SourceLineNumber sourceLineNumbers, string rollbackBoundaryId)
221 {
222 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);
223 }
224
225 public static Message DiscardedRollbackBoundary2(SourceLineNumber sourceLineNumbers)
226 {
227 return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary2, "Location of rollback boundary related to previous warning.");
228 }
229
230 public static Message DiscouragedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string machineOrUser)
231 {
232 return Message(sourceLineNumbers, Ids.DiscouragedAllUsersValue, "Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, use the Package/@Scope attribute values 'perUser' or 'perMachine' instead.", path, machineOrUser);
233 }
234
235 public static Message DetectConditionRecommended(SourceLineNumber sourceLineNumbers, string elementName)
236 {
237 return Message(sourceLineNumbers, Ids.DetectConditionRecommended, "The {0}/@DetectCondition attribute is recommended so the package is only installed when absent.", elementName);
238 }
239
240 public static Message ExePackageDetectInformationRecommended(SourceLineNumber sourceLineNumbers)
241 {
242 return Message(sourceLineNumbers, Ids.ExePackageDetectInformationRecommended, "The ExePackage/@DetectCondition attribute or child element ArpEntry is recommended so the package is only installed when absent.");
243 }
244
245 public static Message DownloadUrlNotSupportedForAttachedContainers(SourceLineNumber sourceLineNumbers, string containerId)
246 {
247 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);
248 }
249
250 public static Message DownloadUrlNotSupportedForBAPayloads(SourceLineNumber sourceLineNumbers, string payloadId)
251 {
252 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);
253 }
254
255 public static Message DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
256 {
257 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);
258 }
259
260 public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)
261 {
262 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);
263 }
264
265 public static Message EmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
266 {
267 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);
268 }
269
270 public static Message EmptyCabinet(SourceLineNumber sourceLineNumbers, string cabinetName, bool isPatch)
271 {
272 if (isPatch)
273 {
274 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);
275 }
276
277 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);
278 }
279
280 public static Message ExpectedForeignRow(SourceLineNumber sourceLineNumbers, string tableName, string primaryKey, string columnName, string columnValue, string foreignTableName)
281 {
282 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);
283 }
284
285 public static Message ExpectedForeignRow(SourceLineNumber sourceLineNumbers, string tableName, string primaryKey, string columnName1, string columnValue1, string columnName2, string columnValue2, string foreignTableName)
286 {
287 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);
288 }
289
290 public static Message ExternalCabsAreNotSigned(string databaseFile)
291 {
292 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);
293 }
294
295 public static Message FailedToDeleteTempDir(string directory)
296 {
297 return Message(null, Ids.FailedToDeleteTempDir, "Failed to delete temporary directory: {0}", directory);
298 }
299
300 public static Message FileSearchFileNameIssue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
301 {
302 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);
303 }
304
305 public static Message GeneratedShortFileNameConflict(SourceLineNumber sourceLineNumbers, string shortFileName)
306 {
307 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);
308 }
309
310 public static Message GeneratedShortFileNameConflict2(SourceLineNumber sourceLineNumbers)
311 {
312 return Message(sourceLineNumbers, Ids.GeneratedShortFileNameConflict2, "The location of a conflicting generated short file name related to the previous warning.");
313 }
314
315 public static Message IdentifierCannotBeModularized(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string identifier, int length, int maximumLength)
316 {
317 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);
318 }
319
320 public static Message IdentifierTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
321 {
322 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);
323 }
324
325 public static Message IllegalActionInSequence(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
326 {
327 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);
328 }
329
330 public static Message IllegalColumnValue(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value)
331 {
332 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);
333 }
334
335 public static Message IllegalPatchCreationTable(SourceLineNumber sourceLineNumbers, string tableName)
336 {
337 return Message(sourceLineNumbers, Ids.IllegalPatchCreationTable, "The {0} table is not legal in a patch creation file. The information in this table will be left out of the decompiled output.", tableName);
338 }
339
340 public static Message IllegalRegistryKeyPath(SourceLineNumber sourceLineNumbers, string componentName, string registryId)
341 {
342 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);
343 }
344
345 public static Message ImplicitComponentPrimaryFeature(string componentId)
346 {
347 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);
348 }
349
350 public static Message ImplicitlyPerUser(SourceLineNumber sourceLineNumbers, string path)
351 {
352 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);
353 }
354
355 public static Message ImplicitMergeModulePrimaryFeature(string componentId)
356 {
357 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);
358 }
359
360 public static Message InsufficientPermissionHarvestTypeLib()
361 {
362 return Message(null, Ids.InsufficientPermissionHarvestTypeLib, "Not enough permissions to harvest type library. On Windows Vista, you must either run Heat elevated, or install Windows Vista SP1 (or higher).");
363 }
364
365 public static Message InvalidAttributeCombination(SourceLineNumber sourceLineNumbers, string attrib1, string attrib2, string name, string value)
366 {
367 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);
368 }
369
370 public static Message InvalidHigherInstallerVersionInModule(SourceLineNumber sourceLineNumbers, string moduleId, int moduleInstallerVersion, int packageInstallerVersion)
371 {
372 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);
373 }
374
375 public static Message InvalidFourPartVersion(SourceLineNumber sourceLineNumbers, string elementName, string version)
376 {
377 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);
378 }
379
380 public static Message InvalidRemoveFile(SourceLineNumber sourceLineNumbers, string file, string component)
381 {
382 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);
383 }
384
385 public static Message MajorUpgradePatchNotRecommended()
386 {
387 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.");
388 }
389
390 public static Message MediaExternalCabinetFilenameIllegal(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
391 {
392 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);
393 }
394
395 public static Message MergeRescheduledAction(SourceLineNumber sourceLineNumbers, string tableName, string actionName, string mergeModuleFile)
396 {
397 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);
398 }
399
400 public static Message MergeTableFailed(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile)
401 {
402 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);
403 }
404
405 public static Message MissingUpgradeCode(SourceLineNumber sourceLineNumbers)
406 {
407 return Message(sourceLineNumbers, Ids.MissingUpgradeCode, "The Package/@UpgradeCode attribute was not found; it is strongly recommended to ensure that this package can be upgraded.");
408 }
409
410 public static Message MsiTransactionLimitations(SourceLineNumber sourceLineNumbers)
411 {
412 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.");
413 }
414
415 public static Message NestedInstall(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value)
416 {
417 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);
418 }
419
420 public static Message NewComponentAddedToExistingFeature(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath)
421 {
422 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);
423 }
424
425 public static Message NoPerMachineDependencies(SourceLineNumber sourceLineNumbers, string packageId)
426 {
427 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);
428 }
429
430 public static Message NotABinaryWixlib(string wixlib)
431 {
432 return Message(null, Ids.NotABinaryWixlib, "'{0}' is not a binary Wixlib and has no embedded files.", wixlib);
433 }
434
435 public static Message NullMsiAssemblyNameValue(SourceLineNumber sourceLineNumbers, string componentName, string name)
436 {
437 return Message(sourceLineNumbers, Ids.NullMsiAssemblyNameValue, "The assembly in component '{0}' has a null or empty {1} assembly name value.", componentName, name);
438 }
439
440 public static Message OrphanedProgId(SourceLineNumber sourceLineNumbers, string progId)
441 {
442 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);
443 }
444
445 public static Message PackageCodeSet(SourceLineNumber sourceLineNumbers)
446 {
447 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.");
448 }
449
450 public static Message PatchTable(SourceLineNumber sourceLineNumbers, string tableName)
451 {
452 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);
453 }
454
455 public static Message PathCanonicalized(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string originalValue, string canonicalValue)
456 {
457 return Message(sourceLineNumbers, Ids.PathCanonicalized, "The {0}/@{1} attribute's value, '{2}', has been canonicalized to '{3}'.", elementName, attributeName, originalValue, canonicalValue);
458 }
459
460 public static Message PerUserButForcingPerMachine(SourceLineNumber sourceLineNumbers, string path)
461 {
462 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);
463 }
464
465 public static Message PlaceholderValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
466 {
467 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);
468 }
469
470 public static Message PossiblyIncorrectTypelibVersion(SourceLineNumber sourceLineNumbers, string id)
471 {
472 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);
473 }
474
475 public static Message PreprocessorUnknownPragma(SourceLineNumber sourceLineNumbers, string pragmaName)
476 {
477 return Message(sourceLineNumbers, Ids.PreprocessorUnknownPragma, "The pragma '{0}' is unknown. Please ensure you have referenced the extension that defines this pragma.", pragmaName);
478 }
479
480 public static Message PreprocessorWarning(SourceLineNumber sourceLineNumbers, string message)
481 {
482 return Message(sourceLineNumbers, Ids.PreprocessorWarning, "{0}", message);
483 }
484
485 public static Message ProductIdAuthored(SourceLineNumber sourceLineNumbers)
486 {
487 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.");
488 }
489
490 public static Message PropertyModularizationSuppressed(SourceLineNumber sourceLineNumbers)
491 {
492 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.");
493 }
494
495 public static Message PropertyUseless(SourceLineNumber sourceLineNumbers, string id)
496 {
497 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);
498 }
499
500 public static Message PropertyValueContainsPropertyReference(SourceLineNumber sourceLineNumbers, string propertyId, string otherProperty)
501 {
502 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);
503 }
504
505 public static Message RelatedAttributeConditionallyIgnored(SourceLineNumber sourceLineNumbers, string recessiveAttribute, string dominantAttribute, string dominantValue)
506 {
507 return Message(sourceLineNumbers, Ids.RelatedAttributeConditionallyIgnored, "Ignoring attribute {0} because attribute {1} is set to {2}.", recessiveAttribute, dominantAttribute, dominantValue);
508 }
509
510 public static Message RemotePayloadsMustNotAlsoBeCompressed(SourceLineNumber sourceLineNumbers, string elementName)
511 {
512 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);
513 }
514
515 public static Message RemoveFileNameRequired(SourceLineNumber sourceLineNumbers)
516 {
517 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.");
518 }
519
520 public static Message RequiresMsi200for64bitPackage(SourceLineNumber sourceLineNumbers)
521 {
522 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.");
523 }
524
525 public static Message RequiresMsi500forArmPackage(SourceLineNumber sourceLineNumbers)
526 {
527 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.");
528 }
529
530 public static Message ReservedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
531 {
532 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);
533 }
534
535 public static Message RetainRangeMismatch(SourceLineNumber sourceLineNumbers, string fileId)
536 {
537 return Message(sourceLineNumbers, Ids.RetainRangeMismatch, "Mismatch in RetainRangeCounts for the file '{0}' - ignoring the retain ranges.", fileId);
538 }
539
540 public static Message ServiceConfigFamilyNotSupported(SourceLineNumber sourceLineNumbers, string elementName)
541 {
542 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);
543 }
544
545 public static Message SkippingMergeModuleTable(SourceLineNumber sourceLineNumbers, string tableName)
546 {
547 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);
548 }
549
550 public static Message SkippingPatchCreationTable(SourceLineNumber sourceLineNumbers, string tableName)
551 {
552 return Message(sourceLineNumbers, Ids.SkippingPatchCreationTable, "The {0} table can only be represented in WiX for patch creation files. The information in this table will be left out of the decompiled output.", tableName);
553 }
554
555 public static Message StandardDirectoryConflictInMergeModule(SourceLineNumber sourceLineNumbers, string directory, string standardDirectory)
556 {
557 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);
558 }
559
560 public static Message SuppressAction(SourceLineNumber sourceLineNumbers, string action, string sequenceName)
561 {
562 return Message(sourceLineNumbers, Ids.SuppressAction, "The action '{0}' in the {1} table is being suppressed.", action, sequenceName);
563 }
564
565 public static Message SuppressAction2(SourceLineNumber sourceLineNumbers)
566 {
567 return Message(sourceLineNumbers, Ids.SuppressAction2, "The location of the suppressed action related to previous warning.");
568 }
569
570 public static Message SuppressMergedAction(string action, string sequenceName)
571 {
572 return Message(null, Ids.SuppressMergedAction, "The merged action '{0}' in the {1} table is being suppressed.", action, sequenceName);
573 }
574
575 public static Message TableIncompatibleWithInstallerVersion(SourceLineNumber sourceLineNumbers, string tableName, int packageInstallerVersion)
576 {
577 return Message(sourceLineNumbers, Ids.TableIncompatibleWithInstallerVersion, "Using table '{0}' requires a version of Windows Installer greater than specified in your package ('{1}').", tableName, packageInstallerVersion);
578 }
579
580 public static Message TargetDirCorrectedDefaultDir()
581 {
582 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.");
583 }
584
585 public static Message TooManyProgIds(SourceLineNumber sourceLineNumbers, string clsId, string progId, string otherClsId)
586 {
587 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);
588 }
589
590 public static Message SymbolNotTranslatedToOutput(IntermediateSymbol symbol)
591 {
592 var symbolString = $"SymbolName: '{symbol.Definition.Name}', Id: '{symbol.Id?.Id}'";
593 return Message(symbol.SourceLineNumbers, Ids.SymbolNotTranslatedToOutput, "The binder doesn't know how to place the following symbol into the output: {0}", symbolString);
594 }
595
596 public static Message UnableToFindFileFromCabOrImage(SourceLineNumber sourceLineNumbers, string existingFileSpec, string srcFileSpec)
597 {
598 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);
599 }
600
601 public static Message UnableToResetAcls(string error)
602 {
603 return Message(null, Ids.UnableToResetAcls, "Unable to reset acls on destination files. Exception detail: {0}", error);
604 }
605
606 public static Message UnavailableBundleConditionVariable(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string variable, string illegalValueList)
607 {
608 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);
609 }
610
611 public static Message UnclearShortcut(SourceLineNumber sourceLineNumbers, string shortcutId, string fileId, string componentId)
612 {
613 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);
614 }
615
616 public static Message UnexpectedEntrySection(SourceLineNumber sourceLineNumbers, string sectionType, string expectedType)
617 {
618 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);
619 }
620
621 public static Message UnexpectedTableInProduct(SourceLineNumber sourceLineNumbers, string tableName)
622 {
623 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);
624 }
625
626 public static Message UnknownAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
627 {
628 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);
629 }
630
631 public static Message UnknownPermission(SourceLineNumber sourceLineNumbers, string tableName, string primaryKey, int bitPosition)
632 {
633 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);
634 }
635
636 public static Message UnrepresentableColumnValue(SourceLineNumber sourceLineNumbers, string tableName, string columnName, object value)
637 {
638 return Message(sourceLineNumbers, Ids.UnrepresentableColumnValue, "The {0}.{1} column's value, '{2}', cannot currently be represented in the WiX schema.", tableName, columnName, value);
639 }
640
641 public static Message UnsupportedCommandLineArgument(string arg)
642 {
643 return Message(null, Ids.UnsupportedCommandLineArgument, "'{0}' is not a valid command line argument.", arg);
644 }
645
646 public static Message UnsupportedCommandLineArgumentValue(string arg, string value, string fallback)
647 {
648 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);
649 }
650
651 public static Message UpdateOfNonKeyPathFile(string nonKeyPathFileId, string componentId, string keyPathFileId)
652 {
653 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);
654 }
655
656 public static Message UxPayloadsOnlySupportEmbedding(SourceLineNumber sourceLineNumbers, string sourceFile)
657 {
658 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);
659 }
660
661 public static Message ValidationFailedDueToSystemPolicy()
662 {
663 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.");
664 }
665
666 public static Message ValidationWarning(SourceLineNumber sourceLineNumbers, string ice, string message)
667 {
668 return Message(sourceLineNumbers, Ids.ValidationWarning, "{0}: {1}", ice, message);
669 }
670
671 public static Message VariableDeclarationCollision(SourceLineNumber sourceLineNumbers, string variableName, string variableValue, string variableCollidingValue)
672 {
673 return Message(sourceLineNumbers, Ids.VariableDeclarationCollision, "The variable '{0}' with value '{1}' was previously declared with value '{2}'.", variableName, variableValue, variableCollidingValue);
674 }
675
676 public static Message InvalidMsiProductVersion(SourceLineNumber sourceLineNumbers, string version, string package)
677 {
678 return Message(sourceLineNumbers, Ids.InvalidMsiProductVersion, "Invalid package version '{0}' in MSI package '{1}'. Package version should have a major version less than 256, a minor version less than 256, and a build version less than 65536. The bundle may incorrectly detect upgrades of this package.", version, package);
679 }
680
681 public static Message InvalidMsiProductVersion(SourceLineNumber sourceLineNumbers, string version)
682 {
683 return Message(sourceLineNumbers, Ids.InvalidMsiProductVersion,
684 "Invalid MSI package version: '{0}'. " +
685 "The Windows Installer SDK says that MSI package versions must have a major version less than 256, a minor version less than 256, and a build version less than 65536. " +
686 "The revision value is ignored but version labels and metadata are not allowed. " +
687 "Violating the MSI rules sometimes works as expected but the behavior is unpredictable and undefined. "+
688 "Future versions of WiX might treat invalid package versions as an error.",
689 version);
690 }
691
692 public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType)
693 {
694 return Message(null, Ids.CollidingModularizationTypes, "The definition for the '{0}' table's '{1}' column is a foreign key relationship to the '{2}' table's column number {3}. The modularization types of the two column definitions differ: table '{0}' uses type {4} and table '{2}' uses type {5}. Change one of the modularization types so that they match.", tableName, columnName, foreignTableName, foreignColumnNumber, modularizationType, foreignModularizationType);
695 }
696
697 public static Message InvalidEnvironmentVariable(string environmentVariable, string value, string defaultValue)
698 {
699 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);
700 }
701
702 public static Message WindowsInstallerFileTooLarge(SourceLineNumber sourceLineNumbers, string path, string fileDescription)
703 {
704 if (String.IsNullOrEmpty(fileDescription))
705 {
706 fileDescription = "MSI or cabinet";
707 }
708
709 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);
710 }
711
712 public static Message InvalidWixVersion(SourceLineNumber sourceLineNumbers, string version, string elementName, string attributeName)
713 {
714 return Message(sourceLineNumbers, Ids.InvalidWixVersion, "Invalid WixVersion '{0}' in {1}/@'{2}'. Comparisons may yield unexpected results.", version, elementName, attributeName);
715 }
716
717 public static Message VBScriptIsDeprecated(SourceLineNumber sourceLineNumbers)
718 {
719 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.");
720 }
721
722 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
723 {
724 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
725 }
726
727 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
728 {
729 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args);
730 }
731
732 public enum Ids
733 {
734 IdentifierCannotBeModularized = 1000,
735 EmptyAttributeValue = 1001,
736 UnableToFindFileFromCabOrImage = 1002,
737 CopyFileFileIdUseless = 1003,
738 NestedInstall = 1004,
739 OrphanedProgId = 1005,
740 PropertyUseless = 1006,
741 RemoveFileNameRequired = 1007,
742 SuppressAction = 1008,
743 SuppressMergedAction = 1009,
744 TargetDirCorrectedDefaultDir = 1010,
745 AccessDeniedForDeletion = 1011,
746 DirectoryInUse = 1012,
747 AccessDeniedForSettingAttributes = 1013,
748 UnknownAction = 1024,
749 IdentifierTooLong = 1026,
750 UnknownPermission = 1030,
751 DirectoryRedundantNames = 1031,
752 UnableToResetAcls = 1032,
753 MediaExternalCabinetFilenameIllegal = 1033,
754 DeprecatedPreProcVariable = 1034,
755 FileSearchFileNameIssue = 1043,
756 AmbiguousFileOrDirectoryName = 1044,
757 PossiblyIncorrectTypelibVersion = 1048,
758 ImplicitComponentPrimaryFeature = 1049,
759 ActionSequenceCollision = 1050,
760 ActionSequenceCollision2 = 1051,
761 SuppressAction2 = 1052,
762 UnexpectedTableInProduct = 1053,
763 DeprecatedAttribute = 1054,
764 MergeRescheduledAction = 1055,
765 MergeTableFailed = 1056,
766 DecompiledStandardActionRelativelyScheduledInModule = 1057,
767 IllegalActionInSequence = 1058,
768 ExpectedForeignRow = 1059,
769 DecompilingAsCustomTable = 1060,
770 IllegalPatchCreationTable = 1061,
771 SkippingMergeModuleTable = 1062,
772 SkippingPatchCreationTable = 1063,
773 UnrepresentableColumnValue = 1064,
774 DeprecatedTable = 1065,
775 PatchTable = 1066,
776 IllegalColumnValue = 1067,
777 DeprecatedLongNameAttribute = 1069,
778 GeneratedShortFileNameConflict = 1070,
779 GeneratedShortFileNameConflict2 = 1071,
780 DangerousTableInMergeModule = 1072,
781 DeprecatedLocalizationVariablePrefix = 1073,
782 PlaceholderValue = 1074,
783 MissingUpgradeCode = 1075,
784 ValidationWarning = 1076,
785 PropertyValueContainsPropertyReference = 1077,
786 DeprecatedUpgradeProperty = 1078,
787 EmptyCabinet = 1079,
788 DeprecatedRegistryElement = 1080,
789 IllegalRegistryKeyPath = 1081,
790 DeprecatedPatchSequenceTargetAttribute = 1082,
791 ProductIdAuthored = 1083,
792 ImplicitMergeModulePrimaryFeature = 1084,
793 DeprecatedIgnoreModularizationElement = 1085,
794 PropertyModularizationSuppressed = 1086,
795 DeprecatedPackageCompressedAttribute = 1087,
796 DeprecatedQuestionMarksGuid = 1090,
797 PackageCodeSet = 1091,
798 InvalidFourPartVersion = 1093,
799 InvalidRemoveFile = 1095,
800 PreprocessorWarning = 1096,
801 UpdateOfNonKeyPathFile = 1097,
802 UnsupportedCommandLineArgument = 1098,
803 MajorUpgradePatchNotRecommended = 1099,
804 RetainRangeMismatch = 1100,
805 DefaultLanguageUsedForVersionedFile = 1101,
806 DefaultLanguageUsedForUnversionedFile = 1102,
807 DefaultVersionUsedForUnversionedFile = 1103,
808 InvalidHigherInstallerVersionInModule = 1104,
809 ValidationFailedDueToSystemPolicy = 1105,
810 ColumnsIncompatibleWithInstallerVersion = 1106,
811 TableIncompatibleWithInstallerVersion = 1107,
812 DeprecatedCommandLineSwitch = 1108,
813 UnexpectedEntrySection = 1109,
814 NewComponentAddedToExistingFeature = 1110,
815 DeprecatedAttributeValue = 1111,
816 InsufficientPermissionHarvestTypeLib = 1112,
817 UnclearShortcut = 1113,
818 TooManyProgIds = 1114,
819 BadColumnDataIgnored = 1115,
820 NullMsiAssemblyNameValue = 1116,
821 InvalidAttributeCombination = 1117,
822 VariableDeclarationCollision = 1118,
823 DuplicatePrimaryKey = 1119,
824 RequiresMsi200for64bitPackage = 1121,
825 ExternalCabsAreNotSigned = 1122,
826 FailedToDeleteTempDir = 1123,
827 StandardDirectoryConflictInMergeModule = 1124,
828 PreprocessorUnknownPragma = 1125,
829 DeprecatedComponentGroupId = 1126,
830 UxPayloadsOnlySupportEmbedding = 1127,
831 DiscardedRollbackBoundary = 1129,
832 DeprecatedElement = 1130,
833 CannotUpdateCabCache = 1131,
834 DownloadUrlNotSupportedForBAPayloads = 1132,
835 DiscouragedAllUsersValue = 1133,
836 ImplicitlyPerUser = 1134,
837 PerUserButForcingPerMachine = 1135,
838 AttributeShouldContain = 1136,
839 DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions = 1137,
840 DeprecatedRegistryKeyActionAttribute = 1138,
841 NotABinaryWixlib = 1139,
842 NoPerMachineDependencies = 1140,
843 DownloadUrlNotSupportedForAttachedContainers = 1141,
844 ReservedAttribute = 1142,
845 RequiresMsi500forArmPackage = 1143,
846 RemotePayloadsMustNotAlsoBeCompressed = 1144,
847 AllChangesIncludedInPatch = 1145,
848 RelatedAttributeConditionallyIgnored = 1146,
849 BackslashTerminateInlineDirectorySyntax = 1147,
850 InvalidMsiProductVersion = 1148,
851 ServiceConfigFamilyNotSupported = 1149,
852 SymbolNotTranslatedToOutput = 1150,
853 MsiTransactionLimitations = 1151,
854 PathCanonicalized = 1152,
855 DetectConditionRecommended = 1153,
856 CollidingModularizationTypes = 1156,
857 InvalidEnvironmentVariable = 1157,
858 WindowsInstallerFileTooLarge = 1158,
859 UnavailableBundleConditionVariable = 1159,
860 DiscardedRollbackBoundary2 = 1160,
861 ExePackageDetectInformationRecommended = 1161,
862 InvalidWixVersion = 1162,
863 VBScriptIsDeprecated = 1163,
864 }
865 }
866 }