@joebigelow / wix / commits / 91b8fb6f

Improve command line error reporting and remove some unused errors

Fixes 6468

Rob Mensching committed Aug 14, 2022 at 14:08 UTC 91b8fb6f3215e9e652ac036f756dec383267adad
21 files changed +432 -426
src/api/wix/WixToolset.Data/ErrorMessages.cs
+144 -197
@@ -10,12 +10,12 @@ namespace WixToolset.Data
10 {
11 public static Message ActionCircularDependency(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
12 {
13 - return Message(sourceLineNumbers, Ids.ActionCircularDependency, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is also scheduled to come before or after action '{1}'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", sequenceTableName, actionName1, actionName2);
13 + return Message(sourceLineNumbers, Ids.ActionCircularDependency, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is also scheduled to come before or after action '{1}'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", sequenceTableName, actionName1, actionName2);
14 }
15
16 public static Message ActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
17 {
18 - return Message(sourceLineNumbers, Ids.ActionCollision, "The {0} table contains an action '{1}' that is declared in two different locations. Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.", sequenceTableName, actionName);
18 + return Message(sourceLineNumbers, Ids.ActionCollision, "The {0} table contains an action '{1}' that is declared in two different locations. Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.", sequenceTableName, actionName);
19 }
20
21 public static Message ActionCollision2(SourceLineNumber sourceLineNumbers)
@@ -25,12 +25,12 @@ namespace WixToolset.Data
25
26 public static Message ActionScheduledRelativeToItself(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
27 {
28 - return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToItself, "The {0}/@{1} attribute's value '{2}' is invalid because it would make this action dependent upon itself. Please change the value to the name of a different action.", elementName, attributeName, attributeValue);
28 + return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToItself, "The {0}/@{1} attribute's value '{2}' is invalid because it would make this action dependent upon itself. Please change the value to the name of a different action.", elementName, attributeName, attributeValue);
29 }
30
31 public static Message ActionScheduledRelativeToTerminationAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
32 {
33 - return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToTerminationAction, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is a special action which only occurs when the installer terminates. These special actions can be identified by their negative sequence numbers. Please schedule the action '{1}' to come before or after a different action.", sequenceTableName, actionName1, actionName2);
33 + return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToTerminationAction, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is a special action which only occurs when the installer terminates. These special actions can be identified by their negative sequence numbers. Please schedule the action '{1}' to come before or after a different action.", sequenceTableName, actionName1, actionName2);
34 }
35
36 public static Message ActionScheduledRelativeToTerminationAction2(SourceLineNumber sourceLineNumbers)
@@ -40,7 +40,7 @@ namespace WixToolset.Data
40
41 public static Message AdditionalArgumentUnexpected(string argument)
42 {
43 - return Message(null, Ids.AdditionalArgumentUnexpected, "Additional argument '{0}' was unexpected. Remove the argument and add the '-?' switch for more information.", argument);
43 + return Message(null, Ids.AdditionalArgumentUnexpected, "Additional argument '{0}' was unexpected. Remove the argument and add the '-?' switch for more information.", argument);
44 }
45
46 public static Message AdminImageRequired(string productCode)
@@ -55,7 +55,7 @@ namespace WixToolset.Data
55
56 public static Message AppIdIncompatibleAdvertiseState(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string parentValue)
57 {
58 - return Message(sourceLineNumbers, Ids.AppIdIncompatibleAdvertiseState, "The {0}/@(1) attribute's value, '{2}' does not match the advertise state on its parent element: '{3}'. (Note: AppIds nested under Fragment, Module, or Product elements must be advertised.)", elementName, attributeName, value, parentValue);
58 + return Message(sourceLineNumbers, Ids.AppIdIncompatibleAdvertiseState, "The {0}/@(1) attribute's value, '{2}' does not match the advertise state on its parent element: '{3}'. (Note: AppIds nested under Fragment, Module, or Product elements must be advertised.)", elementName, attributeName, value, parentValue);
59 }
60
61 public static Message BaselineRequired()
@@ -78,34 +78,14 @@ namespace WixToolset.Data
78 return Message(null, Ids.BundleTooNew, "Unable to read bundle executable '{0}', because this bundle was created with a newer version of WiX (bundle version '{1}'). You must use a newer version of WiX in order to read this bundle.", bundleExecutable, bundleVersion);
79 }
80
81 - public static Message CabClosureFailed(string cabinet)
82 - {
83 - return Message(null, Ids.CabClosureFailed, "Failed to close cab '{0}'.", cabinet);
84 - }
85 -
86 - public static Message CabClosureFailed(string cabinet, int error)
87 - {
88 - return Message(null, Ids.CabClosureFailed, "Failed to close cab '{0}', error: {1}.", cabinet, error);
89 - }
90 -
91 - public static Message CabCreationFailed(string cabName, string fileName, int error)
92 - {
93 - return Message(null, Ids.CabCreationFailed, "Failed to create cab '{0}' while compressing file '{1}' with error 0x{2:X8}.", cabName, fileName, error);
94 - }
95 -
96 - public static Message CabCreationFailed(string cabName, int error)
97 - {
98 - return Message(null, Ids.CabCreationFailed, "Failed to create cab '{0}' with error 0x{1:X8}.", cabName, error);
99 - }
100 -
81 public static Message CabExtractionFailed(string cabName, string directoryName)
82 {
103 - return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' to directory '{1}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, directoryName);
83 + return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' to directory '{1}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, directoryName);
84 }
85
86 public static Message CabExtractionFailed(string cabName, string mergeModulePath, string directoryName)
87 {
108 - return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' from merge module '{1}' to directory '{2}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, mergeModulePath, directoryName);
88 + return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' from merge module '{1}' to directory '{2}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, mergeModulePath, directoryName);
89 }
90
91 public static Message CabFileDoesNotExist(string cabName, string mergeModulePath, string directoryName)
@@ -115,7 +95,7 @@ namespace WixToolset.Data
95
96 public static Message CannotAuthorSpecialProperties(SourceLineNumber sourceLineNumbers, string propertyName)
97 {
118 - return Message(sourceLineNumbers, Ids.CannotAuthorSpecialProperties, "The {0} property was specified. Special MSI properties cannot be authored. Use the attributes on the Property element instead.", propertyName);
98 + return Message(sourceLineNumbers, Ids.CannotAuthorSpecialProperties, "The {0} property was specified. Special MSI properties cannot be authored. Use the attributes on the Property element instead.", propertyName);
99 }
100
101 public static Message CannotDefaultComponentId(SourceLineNumber sourceLineNumbers)
@@ -125,7 +105,7 @@ namespace WixToolset.Data
105
106 public static Message CannotDefaultMismatchedAdvertiseStates(SourceLineNumber sourceLineNumbers)
107 {
128 - return Message(sourceLineNumbers, Ids.CannotDefaultMismatchedAdvertiseStates, "MIME element cannot be marked as the default when its advertise state differs from its parent element. Ensure that the advertise state of the MIME element matches its parents element or remove the Mime/@Advertise attribute completely.");
108 + return Message(sourceLineNumbers, Ids.CannotDefaultMismatchedAdvertiseStates, "MIME element cannot be marked as the default when its advertise state differs from its parent element. Ensure that the advertise state of the MIME element matches its parents element or remove the Mime/@Advertise attribute completely.");
109 }
110
111 public static Message CannotFindFile(SourceLineNumber sourceLineNumbers, string fileId, string fileName, string filePath)
@@ -138,16 +118,6 @@ namespace WixToolset.Data
118 return Message(sourceLineNumbers, Ids.CanNotHaveTwoParents, "The DirectorySearchRef {0} can not have a Parent attribute {1} and also be nested under parent element {2}", directorySearch, parentAttribute, parentElement);
119 }
120
141 - public static Message CannotLoadBinderFileManager(string binderFileManager, string currentBinderFileManager)
142 - {
143 - return Message(null, Ids.CannotLoadBinderFileManager, "Cannot load binder file manager: {0}. Light can only load one binder file manager and has already loaded binder file manager: {1}.", binderFileManager, currentBinderFileManager);
144 - }
145 -
146 - public static Message CannotLoadLinkerExtension(string linkerExtension, string currentLinkerExtension)
147 - {
148 - return Message(null, Ids.CannotLoadLinkerExtension, "Cannot load linker extension: {0}. Light can only load one link extension and has already loaded link extension: {1}.", linkerExtension, currentLinkerExtension);
149 - }
150 -
121 public static Message CannotOpenMergeModule(SourceLineNumber sourceLineNumbers, string mergeModuleIdentifier, string mergeModuleFile)
122 {
123 return Message(sourceLineNumbers, Ids.CannotOpenMergeModule, "Cannot open the merge module '{0}' from file '{1}'.", mergeModuleIdentifier, mergeModuleFile);
@@ -168,14 +138,24 @@ namespace WixToolset.Data
138 return Message(null, Ids.CircularSearchReference, "A circular reference of search ordering constraints was detected: {0}. Search ordering references must form a directed acyclic graph.", chain);
139 }
140
141 + public static Message CommandLineCommandRequired()
142 + {
143 + return Message(null, Ids.CommandLineCommandRequired, "A command is required. Add -h for list of available subcommands.");
144 + }
145 +
146 + public static Message CommandLineCommandRequired(string command)
147 + {
148 + return Message(null, Ids.CommandLineCommandRequired, "A subcommand is required for the \"{0}\" command. Add -h for list of available commands.", command);
149 + }
150 +
151 public static Message ComponentExpectedFeature(SourceLineNumber sourceLineNumbers, string component, string type, string target)
152 {
173 - return Message(sourceLineNumbers, Ids.ComponentExpectedFeature, "The component '{0}' is not assigned to a feature. The component's {1} '{2}' requires it to be assigned to at least one feature.", component, type, target);
153 + return Message(sourceLineNumbers, Ids.ComponentExpectedFeature, "The component '{0}' is not assigned to a feature. The component's {1} '{2}' requires it to be assigned to at least one feature.", component, type, target);
154 }
155
156 public static Message ComponentMultipleKeyPaths(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string fileElementName, string registryElementName, string odbcDataSourceElementName)
157 {
178 - return Message(sourceLineNumbers, Ids.ComponentMultipleKeyPaths, "The {0} element has multiple key paths set. The key path may only be set to '{2}' in extension elements that support it or one of the following locations: {0}/@{1}, {3}/@{1}, {4}/@{1}, or {5}/@{1}.", elementName, attributeName, value, fileElementName, registryElementName, odbcDataSourceElementName);
158 + return Message(sourceLineNumbers, Ids.ComponentMultipleKeyPaths, "The {0} element has multiple key paths set. The key path may only be set to '{2}' in extension elements that support it or one of the following locations: {0}/@{1}, {3}/@{1}, {4}/@{1}, or {5}/@{1}.", elementName, attributeName, value, fileElementName, registryElementName, odbcDataSourceElementName);
159 }
160
161 public static Message ComponentReferencedTwice(SourceLineNumber sourceLineNumbers, string crefChildId)
@@ -185,7 +165,7 @@ namespace WixToolset.Data
165
166 public static Message ConditionExpected(SourceLineNumber sourceLineNumbers, string elementName)
167 {
188 - return Message(sourceLineNumbers, Ids.ConditionExpected, "The {0} element's inner text cannot be an empty string or completely whitespace. If you don't want a condition, then simply remove the entire {0} element.", elementName);
168 + return Message(sourceLineNumbers, Ids.ConditionExpected, "The {0} element's inner text cannot be an empty string or completely whitespace. If you don't want a condition, then simply remove the entire {0} element.", elementName);
169 }
170
171 public static Message CorruptFileFormat(string path, string format)
@@ -210,42 +190,37 @@ namespace WixToolset.Data
190
191 public static Message CubeFileNotFound(string cubeFile)
192 {
213 - return Message(null, Ids.CubeFileNotFound, "The cube file '{0}' cannot be found. This file is required for MSI validation.", cubeFile);
214 - }
215 -
216 - public static Message CustomActionIllegalInnerText(SourceLineNumber sourceLineNumbers, string elementName, string innerText, string attributeName)
217 - {
218 - return Message(sourceLineNumbers, Ids.CustomActionIllegalInnerText, "The {0} element contains illegal inner text: '{1}'. It may not contain inner text unless the {2} attribute is specified.", elementName, innerText, attributeName);
193 + return Message(null, Ids.CubeFileNotFound, "The cube file '{0}' cannot be found. This file is required for MSI validation.", cubeFile);
194 }
195
196 public static Message CustomActionMultipleSources(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5)
197 {
223 - return Message(sourceLineNumbers, Ids.CustomActionMultipleSources, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following source attributes specified at a time: {2}, {3}, {4}, {5}, or {6}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5);
198 + return Message(sourceLineNumbers, Ids.CustomActionMultipleSources, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following source attributes specified at a time: {2}, {3}, {4}, {5}, or {6}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5);
199 }
200
201 public static Message CustomActionMultipleTargets(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5, string attributeName6, string attributeName7)
202 {
228 - return Message(sourceLineNumbers, Ids.CustomActionMultipleTargets, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following target attributes specified at a time: {2}, {3}, {4}, {5}, {6}, {7}, or {8}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5, attributeName6, attributeName7);
203 + return Message(sourceLineNumbers, Ids.CustomActionMultipleTargets, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following target attributes specified at a time: {2}, {3}, {4}, {5}, {6}, {7}, or {8}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5, attributeName6, attributeName7);
204 }
205
206 public static Message CustomActionSequencedInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
207 {
233 - return Message(sourceLineNumbers, Ids.CustomActionSequencedInModule, "The {0} table contains a custom action '{1}' that has a sequence number specified. The Sequence attribute is not allowed for custom actions in a merge module. Please remove the action or use the Before or After attributes to specify where this action should be sequenced relative to another action.", sequenceTableName, actionName);
208 + return Message(sourceLineNumbers, Ids.CustomActionSequencedInModule, "The {0} table contains a custom action '{1}' that has a sequence number specified. The Sequence attribute is not allowed for custom actions in a merge module. Please remove the action or use the Before or After attributes to specify where this action should be sequenced relative to another action.", sequenceTableName, actionName);
209 }
210
211 public static Message CustomTableIllegalColumnWidth(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value)
212 {
238 - return Message(sourceLineNumbers, Ids.CustomTableIllegalColumnWidth, "The {0}/@{1} attribute's value, '{2}', is not a valid column width. Valid column widths are 2 or 4.", elementName, attributeName, value);
213 + return Message(sourceLineNumbers, Ids.CustomTableIllegalColumnWidth, "The {0}/@{1} attribute's value, '{2}', is not a valid column width. Valid column widths are 2 or 4.", elementName, attributeName, value);
214 }
215
216 public static Message CustomTableMissingPrimaryKey(SourceLineNumber sourceLineNumbers)
217 {
243 - return Message(sourceLineNumbers, Ids.CustomTableMissingPrimaryKey, "The CustomTable is missing a Column element with the PrimaryKey attribute set to 'yes'. At least one column must be marked as the primary key.");
218 + return Message(sourceLineNumbers, Ids.CustomTableMissingPrimaryKey, "The CustomTable is missing a Column element with the PrimaryKey attribute set to 'yes'. At least one column must be marked as the primary key.");
219 }
220
221 public static Message CustomTableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
222 {
248 - return Message(sourceLineNumbers, Ids.CustomTableNameTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for a table name. It cannot be more than than 31 characters long.", elementName, attributeName, value);
223 + return Message(sourceLineNumbers, Ids.CustomTableNameTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for a table name. It cannot be more than than 31 characters long.", elementName, attributeName, value);
224 }
225
226 public static Message DatabaseSchemaMismatch(SourceLineNumber sourceLineNumbers, string tableName)
@@ -300,17 +275,17 @@ namespace WixToolset.Data
275
276 public static Message DuplicateExtensionPreprocessorType(string extension, string variablePrefix, string collidingExtension)
277 {
303 - return Message(null, Ids.DuplicateExtensionPreprocessorType, "The extension '{0}' uses the same preprocessor variable prefix, '{1}', as previously loaded extension '{2}'. Please remove one of the extensions or rename the prefix to avoid the collision.", extension, variablePrefix, collidingExtension);
278 + return Message(null, Ids.DuplicateExtensionPreprocessorType, "The extension '{0}' uses the same preprocessor variable prefix, '{1}', as previously loaded extension '{2}'. Please remove one of the extensions or rename the prefix to avoid the collision.", extension, variablePrefix, collidingExtension);
279 }
280
281 public static Message DuplicateExtensionTable(string extension, string tableName)
282 {
308 - return Message(null, Ids.DuplicateExtensionTable, "The extension '{0}' contains a definition for table '{1}' that collides with a previously loaded table definition. Please remove one of the conflicting extensions or rename one of the tables to avoid the collision.", extension, tableName);
283 + return Message(null, Ids.DuplicateExtensionTable, "The extension '{0}' contains a definition for table '{1}' that collides with a previously loaded table definition. Please remove one of the conflicting extensions or rename one of the tables to avoid the collision.", extension, tableName);
284 }
285
286 public static Message DuplicateExtensionXmlSchemaNamespace(string extension, string extensionXmlSchemaNamespace, string collidingExtension)
287 {
313 - return Message(null, Ids.DuplicateExtensionXmlSchemaNamespace, "The extension '{0}' uses the same xml schema namespace, '{1}', as previously loaded extension '{2}'. Please either remove one of the extensions or rename the xml schema namespace to avoid the collision.", extension, extensionXmlSchemaNamespace, collidingExtension);
288 + return Message(null, Ids.DuplicateExtensionXmlSchemaNamespace, "The extension '{0}' uses the same xml schema namespace, '{1}', as previously loaded extension '{2}'. Please either remove one of the extensions or rename the xml schema namespace to avoid the collision.", extension, extensionXmlSchemaNamespace, collidingExtension);
289 }
290
291 public static Message DuplicateFileId(string fileId)
@@ -320,22 +295,22 @@ namespace WixToolset.Data
295
296 public static Message DuplicateLocalizationIdentifier(SourceLineNumber sourceLineNumbers, string localizationId)
297 {
323 - return Message(sourceLineNumbers, Ids.DuplicateLocalizationIdentifier, "The localization identifier '{0}' has been duplicated in multiple locations. Please resolve the conflict.", localizationId);
298 + return Message(sourceLineNumbers, Ids.DuplicateLocalizationIdentifier, "The localization identifier '{0}' has been duplicated in multiple locations. Please resolve the conflict.", localizationId);
299 }
300
301 public static Message DuplicateModuleCaseInsensitiveFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId1, string fileId2)
302 {
328 - return Message(sourceLineNumbers, Ids.DuplicateModuleCaseInsensitiveFileIdentifier, "The merge module '{0}' contains 2 or more file identifiers that only differ by case: '{1}' and '{2}'. The WiX toolset extracts merge module files to the file system using these identifiers. Since most file systems are not case-sensitive a collision is likely. Please contact the owner of the merge module for a fix.", moduleId, fileId1, fileId2);
303 + return Message(sourceLineNumbers, Ids.DuplicateModuleCaseInsensitiveFileIdentifier, "The merge module '{0}' contains 2 or more file identifiers that only differ by case: '{1}' and '{2}'. The WiX toolset extracts merge module files to the file system using these identifiers. Since most file systems are not case-sensitive a collision is likely. Please contact the owner of the merge module for a fix.", moduleId, fileId1, fileId2);
304 }
305
306 public static Message DuplicateModuleFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId)
307 {
333 - return Message(sourceLineNumbers, Ids.DuplicateModuleFileIdentifier, "The merge module '{0}' contains a file identifier, '{1}', that is duplicated either in another merge module or in a File/@Id attribute. File identifiers must be unique. Please change one of the file identifiers to a different value.", moduleId, fileId);
308 + return Message(sourceLineNumbers, Ids.DuplicateModuleFileIdentifier, "The merge module '{0}' contains a file identifier, '{1}', that is duplicated either in another merge module or in a File/@Id attribute. File identifiers must be unique. Please change one of the file identifiers to a different value.", moduleId, fileId);
309 }
310
311 public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)
312 {
338 - return Message(sourceLineNumbers, Ids.DuplicatePrimaryKey, "The primary key '{0}' is duplicated in table '{1}'. Please remove one of the entries or rename a part of the primary key to avoid the collision.", primaryKey, tableName);
313 + return Message(sourceLineNumbers, Ids.DuplicatePrimaryKey, "The primary key '{0}' is duplicated in table '{1}'. Please remove one of the entries or rename a part of the primary key to avoid the collision.", primaryKey, tableName);
314 }
315
316 public static Message DuplicateProviderDependencyKey(string providerKey, string packageId)
@@ -345,7 +320,7 @@ namespace WixToolset.Data
320
321 public static Message DuplicateSourcesForOutput(string sourceList, string outputFile)
322 {
348 - return Message(null, Ids.DuplicateSourcesForOutput, "Multiple source files ({0}) have resulted in the same output file '{1}'. This is likely because the source files only differ in extension or path. Rename the source files to avoid this problem.", sourceList, outputFile);
323 + return Message(null, Ids.DuplicateSourcesForOutput, "Multiple source files ({0}) have resulted in the same output file '{1}'. This is likely because the source files only differ in extension or path. Rename the source files to avoid this problem.", sourceList, outputFile);
324 }
325
326 public static Message DuplicateSymbol(SourceLineNumber sourceLineNumbers, string symbolName)
@@ -375,7 +350,7 @@ namespace WixToolset.Data
350
351 public static Message ExampleGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
352 {
378 - return Message(sourceLineNumbers, Ids.ExampleGuid, "The {0}/@{1} attribute's value, '{2}', is not a legal Guid value. A Guid needs to be generated and put in place of '{2}' in the source file.", elementName, attributeName, value);
353 + return Message(sourceLineNumbers, Ids.ExampleGuid, "The {0}/@{1} attribute's value, '{2}', is not a legal Guid value. A Guid needs to be generated and put in place of '{2}' in the source file.", elementName, attributeName, value);
354 }
355
356 public static Message ExpectedArgument(string argument)
@@ -515,7 +490,7 @@ namespace WixToolset.Data
490
491 public static Message ExpectedBinaryCategory(SourceLineNumber sourceLineNumbers)
492 {
518 - return Message(sourceLineNumbers, Ids.ExpectedBinaryCategory, "The Column element specifies a binary column but does not have the correct Category specified. Windows Installer requires binary columns to specify their category as binary. Please set the Category attribute's value to 'Binary'.");
493 + return Message(sourceLineNumbers, Ids.ExpectedBinaryCategory, "The Column element specifies a binary column but does not have the correct Category specified. Windows Installer requires binary columns to specify their category as binary. Please set the Category attribute's value to 'Binary'.");
494 }
495
496 public static Message ExpectedClientPatchIdInWixMsp()
@@ -585,7 +560,7 @@ namespace WixToolset.Data
560
561 public static Message ExpectedMediaCabinet(SourceLineNumber sourceLineNumbers, string fileId, int diskId)
562 {
588 - return Message(sourceLineNumbers, Ids.ExpectedMediaCabinet, "The file '{0}' should be compressed but is not part of a compressed media. Files will be compressed if either the File/@Compressed or Package/@Compressed attributes are set to 'yes'. This can be fixed by setting the Media/@Cabinet attribute for media '{1}'.", fileId, diskId);
563 + return Message(sourceLineNumbers, Ids.ExpectedMediaCabinet, "The file '{0}' should be compressed but is not part of a compressed media. Files will be compressed if either the File/@Compressed or Package/@Compressed attributes are set to 'yes'. This can be fixed by setting the Media/@Cabinet attribute for media '{1}'.", fileId, diskId);
564 }
565
566 public static Message ExpectedMediaRowsInWixMsp()
@@ -605,12 +580,12 @@ namespace WixToolset.Data
580
581 public static Message ExpectedRowInPatchCreationPackage(string tableName)
582 {
608 - return Message(null, Ids.ExpectedRowInPatchCreationPackage, "Could not find a row in the '{0}' table for this patch creation package. Patch creation packages must contain at least one row in the '{0}' table.", tableName);
583 + return Message(null, Ids.ExpectedRowInPatchCreationPackage, "Could not find a row in the '{0}' table for this patch creation package. Patch creation packages must contain at least one row in the '{0}' table.", tableName);
584 }
585
586 public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers)
587 {
613 - return Message(sourceLineNumbers, Ids.ExpectedSignedCabinetName, "The Media/@Cabinet attribute was not found; it is required when this element contains a DigitalSignature child element. This is because Windows Installer can only verify the digital signatures of external cabinets. Please either remove the DigitalSignature element or specify a valid external cabinet name via the Cabinet attribute.");
588 + return Message(sourceLineNumbers, Ids.ExpectedSignedCabinetName, "The Media/@Cabinet attribute was not found; it is required when this element contains a DigitalSignature child element. This is because Windows Installer can only verify the digital signatures of external cabinets. Please either remove the DigitalSignature element or specify a valid external cabinet name via the Cabinet attribute.");
589 }
590
591 public static Message ExpectedTableInMergeModule(string identifier)
@@ -625,32 +600,32 @@ namespace WixToolset.Data
600
601 public static Message ExpectedWixVariableValue(string variableId)
602 {
628 - return Message(null, Ids.ExpectedWixVariableValue, "The WiX variable '{0}' was declared without a value. Please specify a value for the variable.", variableId);
603 + return Message(null, Ids.ExpectedWixVariableValue, "The WiX variable '{0}' was declared without a value. Please specify a value for the variable.", variableId);
604 }
605
606 public static Message FamilyNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length)
607 {
633 - return Message(sourceLineNumbers, Ids.FamilyNameTooLong, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. This is too long for a family name because the maximum allowed length is 8 characters long.", elementName, attributeName, value, length);
608 + return Message(sourceLineNumbers, Ids.FamilyNameTooLong, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. This is too long for a family name because the maximum allowed length is 8 characters long.", elementName, attributeName, value, length);
609 }
610
611 public static Message FeatureCannotFavorAndDisallowAdvertise(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue)
612 {
638 - return Message(sourceLineNumbers, Ids.FeatureCannotFavorAndDisallowAdvertise, "The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'. These options would ask the installer to disallow the advertised state for this feature while at the same time favoring it.", elementName, attributeName, value, otherAttributeName, otherValue);
613 + return Message(sourceLineNumbers, Ids.FeatureCannotFavorAndDisallowAdvertise, "The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'. These options would ask the installer to disallow the advertised state for this feature while at the same time favoring it.", elementName, attributeName, value, otherAttributeName, otherValue);
614 }
615
616 public static Message FeatureCannotFollowParentAndFavorLocalOrSource(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue)
617 {
643 - return Message(sourceLineNumbers, Ids.FeatureCannotFollowParentAndFavorLocalOrSource, "The {0}/@{1} attribute cannot be specified if the {2} attribute's value is '{3}'. These options would ask the installer to force this feature to follow the parent installation state and simultaneously favor a particular installation state just for this feature.", elementName, attributeName, otherAttributeName, otherValue);
618 + return Message(sourceLineNumbers, Ids.FeatureCannotFollowParentAndFavorLocalOrSource, "The {0}/@{1} attribute cannot be specified if the {2} attribute's value is '{3}'. These options would ask the installer to force this feature to follow the parent installation state and simultaneously favor a particular installation state just for this feature.", elementName, attributeName, otherAttributeName, otherValue);
619 }
620
621 public static Message FeatureConfigurableDirectoryNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
622 {
648 - return Message(sourceLineNumbers, Ids.FeatureConfigurableDirectoryNotUppercase, "The {0}/@{1} attribute's value, '{2}', contains lowercase characters. Since this directory is user-configurable, it needs to be a public property. This means the value must be completely uppercase.", elementName, attributeName, value);
623 + return Message(sourceLineNumbers, Ids.FeatureConfigurableDirectoryNotUppercase, "The {0}/@{1} attribute's value, '{2}', contains lowercase characters. Since this directory is user-configurable, it needs to be a public property. This means the value must be completely uppercase.", elementName, attributeName, value);
624 }
625
626 public static Message FeatureNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
627 {
653 - return Message(sourceLineNumbers, Ids.FeatureNameTooLong, "The {0}/@{1} attribute with value '{2}', is too long for a feature name. Due to limitations in the Windows Installer, feature names cannot be longer than 38 characters in length.", elementName, attributeName, attributeValue);
628 + return Message(sourceLineNumbers, Ids.FeatureNameTooLong, "The {0}/@{1} attribute with value '{2}', is too long for a feature name. Due to limitations in the Windows Installer, feature names cannot be longer than 38 characters in length.", elementName, attributeName, attributeValue);
629 }
630
631 public static Message FileIdentifierNotFound(SourceLineNumber sourceLineNumbers, string fileIdentifier)
@@ -681,12 +656,17 @@ namespace WixToolset.Data
656
657 public static Message FileOrDirectoryPathRequired(string parameter)
658 {
684 - return Message(null, Ids.FileOrDirectoryPathRequired, "The parameter '{0}' must be followed by a file or directory path. To specify a directory path the string must end with a backslash, for example: \"C:\\Path\\\".", parameter);
659 + return Message(null, Ids.FileOrDirectoryPathRequired, "The parameter '{0}' must be followed by a file or directory path. To specify a directory path the string must end with a backslash, for example: \"C:\\Path\\\".", parameter);
660 }
661
687 - public static Message FilePathRequired(string parameter)
662 + public static Message FilePathRequired(string filePurpose)
663 {
689 - return Message(null, Ids.FilePathRequired, "The parameter '{0}' must be followed by a file path.", parameter);
664 + return Message(null, Ids.FilePathRequired, "The path to {0} is required.", filePurpose);
665 + }
666 +
667 + public static Message FilePathRequired(string parameter, string filePurpose)
668 + {
669 + return Message(null, Ids.FilePathRequired, "The parameter '{0}' must be followed by a file path for {1}.", parameter, filePurpose);
670 }
671
672 public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName)
@@ -726,7 +706,7 @@ namespace WixToolset.Data
706
707 public static Message GuidContainsLowercaseLetters(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
708 {
729 - return Message(sourceLineNumbers, Ids.GuidContainsLowercaseLetters, "The {0}/@{1} attribute's value, '{2}', is a mixed-case guid. All letters in a guid value should be uppercase.", elementName, attributeName, value);
709 + return Message(sourceLineNumbers, Ids.GuidContainsLowercaseLetters, "The {0}/@{1} attribute's value, '{2}', is a mixed-case guid. All letters in a guid value should be uppercase.", elementName, attributeName, value);
710 }
711
712 public static Message HarvestSourceNotSpecified()
@@ -751,7 +731,7 @@ namespace WixToolset.Data
731
732 public static Message IdentifierTooLongError(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int maxLength)
733 {
754 - return Message(sourceLineNumbers, Ids.IdentifierTooLongError, "The {0}/@{1} attribute's value, '{2}', is too long. {0}/@{1} attribute's must be {3} characters long or less.", elementName, attributeName, value, maxLength);
734 + return Message(sourceLineNumbers, Ids.IdentifierTooLongError, "The {0}/@{1} attribute's value, '{2}', is too long. {0}/@{1} attribute's must be {3} characters long or less.", elementName, attributeName, value, maxLength);
735 }
736
737 public static Message IllegalAttributeExceptOnElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string expectedElementName)
@@ -901,12 +881,13 @@ namespace WixToolset.Data
881
882 public static Message IllegalColumnName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
883 {
904 - return Message(sourceLineNumbers, Ids.IllegalColumnName, "The {0}/@{1} attribute's value, '{2}', is not a legal column name. It will collide with the sentinel values used in the _TransformView table.", elementName, attributeName, value);
884 + return Message(sourceLineNumbers, Ids.IllegalColumnName, "The {0}/@{1} attribute's value, '{2}', is not a legal column name. It will collide with the sentinel values used in the _TransformView table.", elementName, attributeName, value);
885 }
886
907 - public static Message IllegalCommandlineArgumentCombination(string arg1, string arg2)
887 + public static Message IllegalCommandLineArgumentValue(string arg, string value, IEnumerable<string> validValues)
888 {
909 - return Message(null, Ids.IllegalCommandlineArgumentCombination, "'-{0}' cannot be specfied in combination with '-{1}'.", arg1, arg2);
889 + var combinedValidValues = String.Join(", ", validValues);
890 + return Message(null, Ids.IllegalCommandLineArgumentValue, "The argument {0} value '{1}' is invalid. Use one of the following values {2}", arg, value, combinedValidValues);
891 }
892
893 public static Message IllegalComponentWithAutoGeneratedGuid(SourceLineNumber sourceLineNumbers)
@@ -926,7 +907,7 @@ namespace WixToolset.Data
907
908 public static Message IllegalDefineStatement(SourceLineNumber sourceLineNumbers, string defineStatement)
909 {
929 - return Message(sourceLineNumbers, Ids.IllegalDefineStatement, "The define statement '<?define {0}?>' is not well-formed. Define statements should be in the form <?define variableName = \"variable value\"?>.", defineStatement);
910 + return Message(sourceLineNumbers, Ids.IllegalDefineStatement, "The define statement '<?define {0}?>' is not well-formed. Define statements should be in the form <?define variableName = \"variable value\"?>.", defineStatement);
911 }
912
913 public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
@@ -936,7 +917,7 @@ namespace WixToolset.Data
917
918 public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string defaultValue)
919 {
939 - return Message(sourceLineNumbers, Ids.IllegalEmptyAttributeValue, "The {0}/@{1} attribute's value cannot be an empty string. To use the default value \"{2}\", simply remove the entire attribute.", elementName, attributeName, defaultValue);
920 + return Message(sourceLineNumbers, Ids.IllegalEmptyAttributeValue, "The {0}/@{1} attribute's value cannot be an empty string. To use the default value \"{2}\", simply remove the entire attribute.", elementName, attributeName, defaultValue);
921 }
922
923 public static Message IllegalEnvironmentVariable(string environmentVariable, string value)
@@ -946,7 +927,7 @@ namespace WixToolset.Data
927
928 public static Message IllegalFamilyName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
929 {
949 - return Message(sourceLineNumbers, Ids.IllegalFamilyName, "The {0}/@{1} attribute's value, '{2}', contains illegal characters for a family name. Legal values include letters, numbers, and underscores.", elementName, attributeName, value);
930 + return Message(sourceLineNumbers, Ids.IllegalFamilyName, "The {0}/@{1} attribute's value, '{2}', contains illegal characters for a family name. Legal values include letters, numbers, and underscores.", elementName, attributeName, value);
931 }
932
933 public static Message IllegalFileCompressionAttributes(SourceLineNumber sourceLineNumbers)
@@ -956,7 +937,7 @@ namespace WixToolset.Data
937
938 public static Message IllegalForeach(SourceLineNumber sourceLineNumbers, string foreachStatement)
939 {
959 - return Message(sourceLineNumbers, Ids.IllegalForeach, "The foreach statement '{0}' is illegal. The proper format for foreach is <?foreach varName in valueList?>.", foreachStatement);
940 + return Message(sourceLineNumbers, Ids.IllegalForeach, "The foreach statement '{0}' is illegal. The proper format for foreach is <?foreach varName in valueList?>.", foreachStatement);
941 }
942
943 public static Message IllegalGeneratedGuidComponentUnversionedKeypath(SourceLineNumber sourceLineNumbers)
@@ -1001,7 +982,7 @@ namespace WixToolset.Data
982
983 public static Message IllegalInlineLocVariable(SourceLineNumber sourceLineNumbers, string variableName, string variableValue)
984 {
1004 - return Message(sourceLineNumbers, Ids.IllegalInlineLocVariable, "The localization variable '{0}' specifies an illegal inline default value of '{1}'. Localization variables cannot specify default values inline, instead the value should be specified in a WiX localization (.wxl) file.", variableName, variableValue);
985 + return Message(sourceLineNumbers, Ids.IllegalInlineLocVariable, "The localization variable '{0}' specifies an illegal inline default value of '{1}'. Localization variables cannot specify default values inline, instead the value should be specified in a WiX localization (.wxl) file.", variableName, variableValue);
986 }
987
988 public static Message IllegalIntegerInExpression(SourceLineNumber sourceLineNumbers, string expression)
@@ -1011,7 +992,7 @@ namespace WixToolset.Data
992
993 public static Message IllegalIntegerValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
994 {
1014 - return Message(sourceLineNumbers, Ids.IllegalIntegerValue, "The {0}/@{1} attribute's value, '{2}', is not a legal integer value. Legal integer values are from -2,147,483,648 to 2,147,483,647.", elementName, attributeName, value);
995 + return Message(sourceLineNumbers, Ids.IllegalIntegerValue, "The {0}/@{1} attribute's value, '{2}', is not a legal integer value. Legal integer values are from -2,147,483,648 to 2,147,483,647.", elementName, attributeName, value);
996 }
997
998 public static Message IllegalLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
@@ -1026,7 +1007,7 @@ namespace WixToolset.Data
1007
1008 public static Message IllegalLongValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1009 {
1029 - return Message(sourceLineNumbers, Ids.IllegalLongValue, "The {0}/@{1} attribute's value, '{2}', is not a legal long value. Legal long values are from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.", elementName, attributeName, value);
1010 + return Message(sourceLineNumbers, Ids.IllegalLongValue, "The {0}/@{1} attribute's value, '{2}', is not a legal long value. Legal long values are from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.", elementName, attributeName, value);
1011 }
1012
1013 public static Message IllegalModuleExclusionLanguageAttributes(SourceLineNumber sourceLineNumbers)
@@ -1041,7 +1022,7 @@ namespace WixToolset.Data
1022
1023 public static Message IllegalPathForGeneratedComponentGuid(SourceLineNumber sourceLineNumbers, string componentName, string keyFilePath)
1024 {
1044 - return Message(sourceLineNumbers, Ids.IllegalPathForGeneratedComponentGuid, "The component '{0}' has a key file with path '{1}'. Since this path is not rooted in one of the standard directories (like ProgramFilesFolder), this component does not fit the criteria for having an automatically generated guid. (This error may also occur if a path contains a likely standard directory such as nesting a directory with name \"Common Files\" under ProgramFilesFolder.)", componentName, keyFilePath);
1025 + return Message(sourceLineNumbers, Ids.IllegalPathForGeneratedComponentGuid, "The component '{0}' has a key file with path '{1}'. Since this path is not rooted in one of the standard directories (like ProgramFilesFolder), this component does not fit the criteria for having an automatically generated guid. (This error may also occur if a path contains a likely standard directory such as nesting a directory with name \"Common Files\" under ProgramFilesFolder.)", componentName, keyFilePath);
1026 }
1027
1028 public static Message IllegalPropertyCustomActionAttributes(SourceLineNumber sourceLineNumbers)
@@ -1051,12 +1032,12 @@ namespace WixToolset.Data
1032
1033 public static Message IllegalRelativeLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1034 {
1054 - return Message(sourceLineNumbers, Ids.IllegalRelativeLongFilename, "The {0}/@{1} attribute's value, '{2}', is not a valid relative long name because it contains illegal characters. Legal relative long names contain no more than 260 characters and must contain at least one non-period character. Any character except for the follow may be used: ? | > < : / * \".", elementName, attributeName, value);
1035 + return Message(sourceLineNumbers, Ids.IllegalRelativeLongFilename, "The {0}/@{1} attribute's value, '{2}', is not a valid relative long name because it contains illegal characters. Legal relative long names contain no more than 260 characters and must contain at least one non-period character. Any character except for the follow may be used: ? | > < : / * \".", elementName, attributeName, value);
1036 }
1037
1038 public static Message IllegalRootDirectory(SourceLineNumber sourceLineNumbers, string directoryId)
1039 {
1059 - return Message(sourceLineNumbers, Ids.IllegalRootDirectory, "The Directory with Id '{0}' is not a valid root directory. There may only be a single root directory per product or module and its Id attribute value must be 'TARGETDIR' and its Name attribute value must be 'SourceDir'.", directoryId);
1040 + return Message(sourceLineNumbers, Ids.IllegalRootDirectory, "The Directory with Id '{0}' is not a valid root directory. There may only be a single root directory per product or module and its Id attribute value must be 'TARGETDIR' and its Name attribute value must be 'SourceDir'.", directoryId);
1041 }
1042
1043 public static Message IllegalSearchIdForParentDepth(SourceLineNumber sourceLineNumbers, string id, string parentId)
@@ -1066,7 +1047,7 @@ namespace WixToolset.Data
1047
1048 public static Message IllegalShortFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1049 {
1069 - return Message(sourceLineNumbers, Ids.IllegalShortFilename, "The {0}/@{1} attribute's value, '{2}', is not a valid 8.3-compliant name. Legal names contain no more than 8 non-period characters followed by an optional period and extension of no more than 3 non-period characters. Any character except for the follow may be used: \\ ? | > < : / * \" + , ; = [ ] (space).", elementName, attributeName, value);
1050 + return Message(sourceLineNumbers, Ids.IllegalShortFilename, "The {0}/@{1} attribute's value, '{2}', is not a valid 8.3-compliant name. Legal names contain no more than 8 non-period characters followed by an optional period and extension of no more than 3 non-period characters. Any character except for the follow may be used: \\ ? | > < : / * \" + , ; = [ ] (space).", elementName, attributeName, value);
1051 }
1052
1053 public static Message IllegalSuppressWarningId(string suppressedId)
@@ -1076,7 +1057,7 @@ namespace WixToolset.Data
1057
1058 public static Message IllegalTargetDirDefaultDir(SourceLineNumber sourceLineNumbers, string defaultDir)
1059 {
1079 - return Message(sourceLineNumbers, Ids.IllegalTargetDirDefaultDir, "The 'TARGETDIR' directory has an illegal DefaultDir value of '{0}'. The DefaultDir value is created from the *Name attributes of the Directory element. The TARGETDIR directory is a special directory which must have its Name attribute set to 'SourceDir'.", defaultDir);
1060 + return Message(sourceLineNumbers, Ids.IllegalTargetDirDefaultDir, "The 'TARGETDIR' directory has an illegal DefaultDir value of '{0}'. The DefaultDir value is created from the *Name attributes of the Directory element. The TARGETDIR directory is a special directory which must have its Name attribute set to 'SourceDir'.", defaultDir);
1061 }
1062
1063 public static Message IllegalTerminalServerCustomActionAttributes(SourceLineNumber sourceLineNumbers)
@@ -1101,27 +1082,27 @@ namespace WixToolset.Data
1082
1083 public static Message IllegalWixVariablePrefix(SourceLineNumber sourceLineNumbers, string variableId)
1084 {
1104 - return Message(sourceLineNumbers, Ids.IllegalWixVariablePrefix, "The WiX variable $(wix.{0}) uses an illegal prefix '$'. Please use the '!' prefix instead.", variableId);
1085 + return Message(sourceLineNumbers, Ids.IllegalWixVariablePrefix, "The WiX variable $(wix.{0}) uses an illegal prefix '$'. Please use the '!' prefix instead.", variableId);
1086 }
1087
1088 public static Message IllegalYesNoAlwaysValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1089 {
1109 - return Message(sourceLineNumbers, Ids.IllegalYesNoAlwaysValue, "The {0}/@{1} attribute's value, '{2}', is not a legal yes/no/always value. The only legal values are 'always', 'no' or 'yes'.", elementName, attributeName, value);
1090 + return Message(sourceLineNumbers, Ids.IllegalYesNoAlwaysValue, "The {0}/@{1} attribute's value, '{2}', is not a legal yes/no/always value. The only legal values are 'always', 'no' or 'yes'.", elementName, attributeName, value);
1091 }
1092
1093 public static Message IllegalYesNoDefaultValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1094 {
1114 - return Message(sourceLineNumbers, Ids.IllegalYesNoDefaultValue, "The {0}/@{1} attribute's value, '{2}', is not a legal yes/no/default value. The only legal values are 'default', 'no' or 'yes'.", elementName, attributeName, value);
1095 + return Message(sourceLineNumbers, Ids.IllegalYesNoDefaultValue, "The {0}/@{1} attribute's value, '{2}', is not a legal yes/no/default value. The only legal values are 'default', 'no' or 'yes'.", elementName, attributeName, value);
1096 }
1097
1098 public static Message IllegalYesNoValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1099 {
1119 - return Message(sourceLineNumbers, Ids.IllegalYesNoValue, "The {0}/@{1} attribute's value, '{2}', is not a legal yes/no value. The only legal values are 'no' and 'yes'.", elementName, attributeName, value);
1100 + return Message(sourceLineNumbers, Ids.IllegalYesNoValue, "The {0}/@{1} attribute's value, '{2}', is not a legal yes/no value. The only legal values are 'no' and 'yes'.", elementName, attributeName, value);
1101 }
1102
1103 public static Message ImplicitComponentKeyPath(SourceLineNumber sourceLineNumbers, string componentId)
1104 {
1124 - return Message(sourceLineNumbers, Ids.ImplicitComponentKeyPath, "The component '{0}' does not have an explicit key path specified. If the ordering of the elements under the Component element changes, the key path will also change. To prevent accidental changes, the key path should be set to 'yes' in one of the following locations: Component/@KeyPath, File/@KeyPath, ODBCDataSource/@KeyPath, or Registry/@KeyPath.", componentId);
1105 + return Message(sourceLineNumbers, Ids.ImplicitComponentKeyPath, "The component '{0}' does not have an explicit key path specified. If the ordering of the elements under the Component element changes, the key path will also change. To prevent accidental changes, the key path should be set to 'yes' in one of the following locations: Component/@KeyPath, File/@KeyPath, ODBCDataSource/@KeyPath, or Registry/@KeyPath.", componentId);
1106 }
1107
1108 public static Message InlineDirectorySyntaxRequiresPath(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string identifier)
@@ -1156,12 +1137,12 @@ namespace WixToolset.Data
1137
1138 public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value, int minimum, int maximum)
1139 {
1159 - return Message(sourceLineNumbers, Ids.IntegralValueOutOfRange, "The {0}/@{1} attribute's value, '{2}', is not in the range of legal values. Legal values for this attribute are from {3} to {4}.", elementName, attributeName, value, minimum, maximum);
1140 + return Message(sourceLineNumbers, Ids.IntegralValueOutOfRange, "The {0}/@{1} attribute's value, '{2}', is not in the range of legal values. Legal values for this attribute are from {3} to {4}.", elementName, attributeName, value, minimum, maximum);
1141 }
1142
1143 public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, long value, long minimum, long maximum)
1144 {
1164 - return Message(sourceLineNumbers, Ids.IntegralValueOutOfRange, "The {0}/@{1} attribute's value, '{2}', is not in the range of legal values. Legal values for this attribute are from {3} to {4}.", elementName, attributeName, value, minimum, maximum);
1145 + return Message(sourceLineNumbers, Ids.IntegralValueOutOfRange, "The {0}/@{1} attribute's value, '{2}', is not in the range of legal values. Legal values for this attribute are from {3} to {4}.", elementName, attributeName, value, minimum, maximum);
1146 }
1147
1148 public static Message IntegralValueSentinelCollision(SourceLineNumber sourceLineNumbers, int value)
@@ -1181,7 +1162,7 @@ namespace WixToolset.Data
1162
1163 public static Message InvalidAssemblyFile(SourceLineNumber sourceLineNumbers, string assemblyFile, string moreInformation)
1164 {
1184 - return Message(sourceLineNumbers, Ids.InvalidAssemblyFile, "The assembly file '{0}' appears to be invalid. Please ensure this is a valid assembly file and that the user has the appropriate access rights to this file. More information: {1}", assemblyFile, moreInformation);
1165 + return Message(sourceLineNumbers, Ids.InvalidAssemblyFile, "The assembly file '{0}' appears to be invalid. Please ensure this is a valid assembly file and that the user has the appropriate access rights to this file. More information: {1}", assemblyFile, moreInformation);
1166 }
1167
1168 public static Message InvalidBundle(string bundleExecutable)
@@ -1191,7 +1172,7 @@ namespace WixToolset.Data
1172
1173 public static Message InvalidCabinetTemplate(SourceLineNumber sourceLineNumbers, string cabinetTemplate)
1174 {
1194 - return Message(sourceLineNumbers, Ids.InvalidCabinetTemplate, "CabinetTemplate attribute's value '{0}' must contain '{{0}}' and should contain no more than 8 characters followed by an optional extension of no more than 3 characters. Any character except for the follow 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).", cabinetTemplate);
1175 + return Message(sourceLineNumbers, Ids.InvalidCabinetTemplate, "CabinetTemplate attribute's value '{0}' must contain '{{0}}' and should contain no more than 8 characters followed by an optional extension of no more than 3 characters. Any character except for the follow 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).", cabinetTemplate);
1176 }
1177
1178 public static Message InvalidCommandLineFileName(string fileName, string error)
@@ -1211,7 +1192,7 @@ namespace WixToolset.Data
1192
1193 public static Message InvalidDocumentElement(SourceLineNumber sourceLineNumbers, string elementName, string fileType, string expectedElementName)
1194 {
1214 - return Message(sourceLineNumbers, Ids.InvalidDocumentElement, "The document element name '{0}' is invalid. A WiX {1} file must use '{2}' as the document element name.", elementName, fileType, expectedElementName);
1195 + return Message(sourceLineNumbers, Ids.InvalidDocumentElement, "The document element name '{0}' is invalid. A WiX {1} file must use '{2}' as the document element name.", elementName, fileType, expectedElementName);
1196 }
1197
1198 public static Message InvalidEmbeddedUIFileName(SourceLineNumber sourceLineNumbers, string codepage)
@@ -1236,12 +1217,12 @@ namespace WixToolset.Data
1217
1218 public static Message InvalidExtension(string extension, string extensionType, string expectedType)
1219 {
1239 - return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}'.", extension, extensionType, expectedType);
1220 + return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}'.", extension, extensionType, expectedType);
1221 }
1222
1223 public static Message InvalidExtension(string extension, string extensionType, string expectedType1, string expectedType2)
1224 {
1244 - return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}' or '{3}'.", extension, extensionType, expectedType1, expectedType2);
1225 + return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}' or '{3}'.", extension, extensionType, expectedType1, expectedType2);
1226 }
1227
1228 public static Message InvalidExtensionType(string extension, string attributeType)
@@ -1276,7 +1257,7 @@ namespace WixToolset.Data
1257
1258 public static Message InvalidKeyColumn(string tableName, string columnName, string foreignTableName, int foreignColumnNumber)
1259 {
1279 - return Message(null, Ids.InvalidKeyColumn, "The definition for the '{0}' table's '{1}' column is an invalid foreign key relationship to the {2} table's column number {3}. It is not a valid foreign key table column number because it is too small (less than 1) or greater than the count of columns in the foreign table's definition.", tableName, columnName, foreignTableName, foreignColumnNumber);
1260 + return Message(null, Ids.InvalidKeyColumn, "The definition for the '{0}' table's '{1}' column is an invalid foreign key relationship to the {2} table's column number {3}. It is not a valid foreign key table column number because it is too small (less than 1) or greater than the count of columns in the foreign table's definition.", tableName, columnName, foreignTableName, foreignColumnNumber);
1261 }
1262
1263 public static Message InvalidKeypathChange(SourceLineNumber sourceLineNumbers, string component, string transformPath)
@@ -1291,7 +1272,7 @@ namespace WixToolset.Data
1272
1273 public static Message InvalidMergeLanguage(SourceLineNumber sourceLineNumbers, string mergeId, string mergeLanguage)
1274 {
1294 - return Message(sourceLineNumbers, Ids.InvalidMergeLanguage, "The Merge element '{0}' specified an invalid language '{1}'. Verify that localization tokens are being properly resolved to a numeric LCID.", mergeId, mergeLanguage);
1275 + return Message(sourceLineNumbers, Ids.InvalidMergeLanguage, "The Merge element '{0}' specified an invalid language '{1}'. Verify that localization tokens are being properly resolved to a numeric LCID.", mergeId, mergeLanguage);
1276 }
1277
1278 public static Message InvalidFourPartVersion(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string version)
@@ -1301,12 +1282,12 @@ namespace WixToolset.Data
1282
1283 public static Message InvalidPlatformValue(SourceLineNumber sourceLineNumbers, string value)
1284 {
1304 - return Message(sourceLineNumbers, Ids.InvalidPlatformValue, "The Platform attribute has an invalid value {0}. Possible values are x86, x64, or arm64.", value);
1285 + return Message(sourceLineNumbers, Ids.InvalidPlatformValue, "The Platform attribute has an invalid value {0}. Possible values are x86, x64, or arm64.", value);
1286 }
1287
1288 public static Message InvalidPreprocessorFunction(SourceLineNumber sourceLineNumbers, string variable)
1289 {
1309 - return Message(sourceLineNumbers, Ids.InvalidPreprocessorFunction, "Ill-formed preprocessor function '${0}'. Functions must have a prefix (like 'fun.'), a name at least 1 character long, and matching opening and closing parentheses.", variable);
1290 + return Message(sourceLineNumbers, Ids.InvalidPreprocessorFunction, "Ill-formed preprocessor function '${0}'. Functions must have a prefix (like 'fun.'), a name at least 1 character long, and matching opening and closing parentheses.", variable);
1291 }
1292
1293 public static Message InvalidPreprocessorFunctionAutoVersion(SourceLineNumber sourceLineNumbers)
@@ -1321,7 +1302,7 @@ namespace WixToolset.Data
1302
1303 public static Message InvalidPreprocessorVariable(SourceLineNumber sourceLineNumbers, string variable)
1304 {
1324 - return Message(sourceLineNumbers, Ids.InvalidPreprocessorVariable, "Ill-formed preprocessor variable '$({0})'. Variables must have a prefix (like 'var.', 'env.', or 'sys.') and a name at least 1 character long. If the literal string '$({0})' is desired, use '$$({0})'.", variable);
1305 + return Message(sourceLineNumbers, Ids.InvalidPreprocessorVariable, "Ill-formed preprocessor variable '$({0})'. Variables must have a prefix (like 'var.', 'env.', or 'sys.') and a name at least 1 character long. If the literal string '$({0})' is desired, use '$$({0})'.", variable);
1306 }
1307
1308 public static Message InvalidProductVersion(SourceLineNumber sourceLineNumbers, string version)
@@ -1366,7 +1347,7 @@ namespace WixToolset.Data
1347
1348 public static Message InvalidVariableDefinition(string variableDefinition)
1349 {
1369 - return Message(null, Ids.InvalidVariableDefinition, "The variable definition '{0}' is not valid. Variable definitions should be in the form -dname=value where the value is optional.", variableDefinition);
1350 + return Message(null, Ids.InvalidVariableDefinition, "The variable definition '{0}' is not valid. Variable definitions should be in the form -dname=value where the value is optional.", variableDefinition);
1351 }
1352
1353 public static Message InvalidWixTransform(string fileName)
@@ -1376,12 +1357,12 @@ namespace WixToolset.Data
1357
1358 public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string wixNamespace)
1359 {
1379 - return Message(sourceLineNumbers, Ids.InvalidWixXmlNamespace, "The {0} element has no namespace. Please make the {0} element look like the following: <{0} xmlns=\"{1}\">.", wixElementName, wixNamespace);
1360 + return Message(sourceLineNumbers, Ids.InvalidWixXmlNamespace, "The {0} element has no namespace. Please make the {0} element look like the following: <{0} xmlns=\"{1}\">.", wixElementName, wixNamespace);
1361 }
1362
1363 public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string elementNamespace, string wixNamespace)
1364 {
1384 - return Message(sourceLineNumbers, Ids.InvalidWixXmlNamespace, "The {0} element has an incorrect namespace of '{1}'. Please make the {0} element look like the following: <{0} xmlns=\"{2}\">.", wixElementName, elementNamespace, wixNamespace);
1365 + return Message(sourceLineNumbers, Ids.InvalidWixXmlNamespace, "The {0} element has an incorrect namespace of '{1}'. Please make the {0} element look like the following: <{0} xmlns=\"{2}\">.", wixElementName, elementNamespace, wixNamespace);
1366 }
1367
1368 public static Message InvalidXml(SourceLineNumber sourceLineNumbers, string fileType, string detail)
@@ -1391,7 +1372,7 @@ namespace WixToolset.Data
1372
1373 public static Message LocalizationVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId)
1374 {
1394 - return Message(sourceLineNumbers, Ids.LocalizationVariableUnknown, "The localization variable !(loc.{0}) is unknown. Please ensure the variable is defined.", variableId);
1375 + return Message(sourceLineNumbers, Ids.LocalizationVariableUnknown, "The localization variable !(loc.{0}) is unknown. Please ensure the variable is defined.", variableId);
1376 }
1377
1378 public static Message MaximumCabinetSizeForLargeFileSplittingTooLarge(SourceLineNumber sourceLineNumbers, int maximumCabinetSizeForLargeFileSplitting, int maxValueOfMaxCabSizeForLargeFileSplitting)
@@ -1406,7 +1387,7 @@ namespace WixToolset.Data
1387
1388 public static Message MediaEmbeddedCabinetNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length)
1389 {
1409 - return Message(sourceLineNumbers, Ids.MediaEmbeddedCabinetNameTooLong, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. The name is too long for an embedded cabinet. It cannot be more than than 62 characters long.", elementName, attributeName, value, length);
1390 + return Message(sourceLineNumbers, Ids.MediaEmbeddedCabinetNameTooLong, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. The name is too long for an embedded cabinet. It cannot be more than than 62 characters long.", elementName, attributeName, value, length);
1391 }
1392
1393 public static Message MediaTableCollision(SourceLineNumber sourceLineNumbers)
@@ -1421,7 +1402,7 @@ namespace WixToolset.Data
1402
1403 public static Message MergeFeatureRequired(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile, string mergeId)
1404 {
1424 - return Message(sourceLineNumbers, Ids.MergeFeatureRequired, "The {0} table contains a row with primary key(s) '{1}' which requires a feature to properly merge from the merge module '{2}'. Nest a MergeRef element with an Id attribute set to the value '{3}' under a Feature element to fix this error.", tableName, primaryKeys, mergeModuleFile, mergeId);
1405 + return Message(sourceLineNumbers, Ids.MergeFeatureRequired, "The {0} table contains a row with primary key(s) '{1}' which requires a feature to properly merge from the merge module '{2}'. Nest a MergeRef element with an Id attribute set to the value '{3}' under a Feature element to fix this error.", tableName, primaryKeys, mergeModuleFile, mergeId);
1406 }
1407
1408 public static Message MergeLanguageFailed(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile)
@@ -1431,12 +1412,12 @@ namespace WixToolset.Data
1412
1413 public static Message MergeLanguageUnsupported(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile)
1414 {
1434 - return Message(sourceLineNumbers, Ids.MergeLanguageUnsupported, "Could not locate language '{0}' (or a transform for this language) in the merge module '{1}'. This is likely due to an incorrectly authored Merge/@Language attribute.", language, mergeModuleFile);
1415 + return Message(sourceLineNumbers, Ids.MergeLanguageUnsupported, "Could not locate language '{0}' (or a transform for this language) in the merge module '{1}'. This is likely due to an incorrectly authored Merge/@Language attribute.", language, mergeModuleFile);
1416 }
1417
1418 public static Message MergeModuleExpectedFeature(SourceLineNumber sourceLineNumbers, string mergeId)
1419 {
1439 - return Message(sourceLineNumbers, Ids.MergeModuleExpectedFeature, "The merge module '{0}' is not assigned to a feature. All merge modules must be assigned to at least one feature.", mergeId);
1420 + return Message(sourceLineNumbers, Ids.MergeModuleExpectedFeature, "The merge module '{0}' is not assigned to a feature. All merge modules must be assigned to at least one feature.", mergeId);
1421 }
1422
1423 public static Message MergePlatformMismatch(SourceLineNumber sourceLineNumbers, string mergeModuleFile)
@@ -1491,7 +1472,7 @@ namespace WixToolset.Data
1472
1473 public static Message MissingTableDefinition(string tableName)
1474 {
1494 - return Message(null, Ids.MissingTableDefinition, "Cannot find the table definitions for the '{0}' table. This is likely due to a typing error or missing extension. Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.", tableName);
1475 + return Message(null, Ids.MissingTableDefinition, "Cannot find the table definitions for the '{0}' table. This is likely due to a typing error or missing extension. Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.", tableName);
1476 }
1477
1478 public static Message MissingTypeLibFile(SourceLineNumber sourceLineNumbers, string elementName, string fileElementName)
@@ -1526,7 +1507,7 @@ namespace WixToolset.Data
1507
1508 public static Message MultipleEntrySections(SourceLineNumber sourceLineNumbers, string sectionName1, string sectionName2)
1509 {
1529 - return Message(sourceLineNumbers, Ids.MultipleEntrySections, "Multiple entry sections '{0}' and '{1}' found. Only one entry section may be present in a single target.", sectionName1, sectionName2);
1510 + return Message(sourceLineNumbers, Ids.MultipleEntrySections, "Multiple entry sections '{0}' and '{1}' found. Only one entry section may be present in a single target.", sectionName1, sectionName2);
1511 }
1512
1513 public static Message MultipleEntrySections2(SourceLineNumber sourceLineNumbers)
@@ -1536,12 +1517,12 @@ namespace WixToolset.Data
1517
1518 public static Message MultipleFilesMatchedWithOutputSpecification(string sourceSpecification, string sourceList)
1519 {
1539 - return Message(null, Ids.MultipleFilesMatchedWithOutputSpecification, "A per-source file output specification has been provided ('{0}'), but multiple source files match the source specification ({1}). Specifying a unique output requires that only a single source file match.", sourceSpecification, sourceList);
1520 + return Message(null, Ids.MultipleFilesMatchedWithOutputSpecification, "A per-source file output specification has been provided ('{0}'), but multiple source files match the source specification ({1}). Specifying a unique output requires that only a single source file match.", sourceSpecification, sourceList);
1521 }
1522
1523 public static Message MultipleIdentifiersFound(SourceLineNumber sourceLineNumbers, string elementName, string identifier, string mismatchIdentifier)
1524 {
1544 - return Message(sourceLineNumbers, Ids.MultipleIdentifiersFound, "Under a '{0}' element, multiple identifiers were found: '{1}' and '{2}'. All search elements under this element must have the same id.", elementName, identifier, mismatchIdentifier);
1525 + return Message(sourceLineNumbers, Ids.MultipleIdentifiersFound, "Under a '{0}' element, multiple identifiers were found: '{1}' and '{2}'. All search elements under this element must have the same id.", elementName, identifier, mismatchIdentifier);
1526 }
1527
1528 public static Message MultiplePackagePayloads(SourceLineNumber sourceLineNumbers, string packageId, string packagePayloadId1, string packagePayloadId2)
@@ -1581,7 +1562,7 @@ namespace WixToolset.Data
1562
1563 public static Message NoDataForColumn(SourceLineNumber sourceLineNumbers, string columnName, string tableName)
1564 {
1584 - return Message(sourceLineNumbers, Ids.NoDataForColumn, "There is no data for column '{0}' in a contained row of custom table '{1}'. A non-null value must be supplied for this column.", columnName, tableName);
1565 + return Message(sourceLineNumbers, Ids.NoDataForColumn, "There is no data for column '{0}' in a contained row of custom table '{1}'. A non-null value must be supplied for this column.", columnName, tableName);
1566 }
1567
1568 public static Message NoDifferencesInTransform(SourceLineNumber sourceLineNumbers)
@@ -1601,7 +1582,7 @@ namespace WixToolset.Data
1582
1583 public static Message NoUniqueActionSequenceNumber(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
1584 {
1604 - return Message(sourceLineNumbers, Ids.NoUniqueActionSequenceNumber, "The {0} table contains an action '{1}' which cannot have a unique sequence number because it is scheduled before or after action '{2}'. There is not enough room before or after this action to assign a unique sequence number. Please schedule one of the actions differently so that it will be in a position with more sequence numbers available. Please note that sequence numbers must be an integer in the range 1 - 32767 (inclusive).", sequenceTableName, actionName1, actionName2);
1585 + return Message(sourceLineNumbers, Ids.NoUniqueActionSequenceNumber, "The {0} table contains an action '{1}' which cannot have a unique sequence number because it is scheduled before or after action '{2}'. There is not enough room before or after this action to assign a unique sequence number. Please schedule one of the actions differently so that it will be in a position with more sequence numbers available. Please note that sequence numbers must be an integer in the range 1 - 32767 (inclusive).", sequenceTableName, actionName1, actionName2);
1586 }
1587
1588 public static Message NoUniqueActionSequenceNumber2(SourceLineNumber sourceLineNumbers)
@@ -1611,7 +1592,7 @@ namespace WixToolset.Data
1592
1593 public static Message OpenDatabaseFailed(string databaseFile)
1594 {
1614 - return Message(null, Ids.OpenDatabaseFailed, "Failed to open database '{0}'. Ensure it is a valid database, and it is not open by another process.", databaseFile);
1595 + return Message(null, Ids.OpenDatabaseFailed, "Failed to open database '{0}'. Ensure it is a valid database, and it is not open by another process.", databaseFile);
1596 }
1597
1598 public static Message OrderingReferenceLoopDetected(SourceLineNumber sourceLineNumbers, string loopList)
@@ -1621,12 +1602,12 @@ namespace WixToolset.Data
1602
1603 public static Message OrphanedComponent(SourceLineNumber sourceLineNumbers, string componentName)
1604 {
1624 - return Message(sourceLineNumbers, Ids.OrphanedComponent, "Found orphaned Component '{0}'. If this is a Package, every Component must have at least one parent Feature. To include a Component in a Module, you must include it directly as a Component element of the Module element or indirectly via ComponentRef, ComponentGroup, or ComponentGroupRef elements.", componentName);
1605 + return Message(sourceLineNumbers, Ids.OrphanedComponent, "Found orphaned Component '{0}'. If this is a Package, every Component must have at least one parent Feature. To include a Component in a Module, you must include it directly as a Component element of the Module element or indirectly via ComponentRef, ComponentGroup, or ComponentGroupRef elements.", componentName);
1606 }
1607
1608 public static Message OutputCodepageMismatch(SourceLineNumber sourceLineNumbers, int beforeCodepage, int afterCodepage)
1609 {
1629 - return Message(sourceLineNumbers, Ids.OutputCodepageMismatch, "The code pages of the outputs do not match. One output's code page is '{0}' while the other is '{1}'.", beforeCodepage, afterCodepage);
1610 + return Message(sourceLineNumbers, Ids.OutputCodepageMismatch, "The code pages of the outputs do not match. One output's code page is '{0}' while the other is '{1}'.", beforeCodepage, afterCodepage);
1611 }
1612
1613 public static Message OutputCodepageMismatch2(SourceLineNumber sourceLineNumbers)
@@ -1641,12 +1622,12 @@ namespace WixToolset.Data
1622
1623 public static Message OutputTypeMismatch(SourceLineNumber sourceLineNumbers, string beforeOutputType, string afterOutputType)
1624 {
1644 - return Message(sourceLineNumbers, Ids.OutputTypeMismatch, "The types of the outputs do not match. One output's type is '{0}' while the other is '{1}'.", beforeOutputType, afterOutputType);
1625 + return Message(sourceLineNumbers, Ids.OutputTypeMismatch, "The types of the outputs do not match. One output's type is '{0}' while the other is '{1}'.", beforeOutputType, afterOutputType);
1626 }
1627
1628 public static Message OverridableActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
1629 {
1649 - return Message(sourceLineNumbers, Ids.OverridableActionCollision, "The {0} table contains an action '{1}' that is declared overridable in two different locations. Please remove one of the actions or the Overridable='yes' attribute from one of the actions.", sequenceTableName, actionName);
1630 + return Message(sourceLineNumbers, Ids.OverridableActionCollision, "The {0} table contains an action '{1}' that is declared overridable in two different locations. Please remove one of the actions or the Overridable='yes' attribute from one of the actions.", sequenceTableName, actionName);
1631 }
1632
1633 public static Message OverridableActionCollision2(SourceLineNumber sourceLineNumbers)
@@ -1716,7 +1697,7 @@ namespace WixToolset.Data
1697
1698 public static Message PreprocessorExtensionForParameterMissing(SourceLineNumber sourceLineNumbers, string parameterName, string parameterPrefix)
1699 {
1719 - return Message(sourceLineNumbers, Ids.PreprocessorExtensionForParameterMissing, "Could not find the preprocessor extension for parameter '{0}'. A preprocessor extension is expected because the parameter prefix, '{1}', is not one of the standard types: 'env', 'res', 'sys', or 'var'.", parameterName, parameterPrefix);
1700 + return Message(sourceLineNumbers, Ids.PreprocessorExtensionForParameterMissing, "Could not find the preprocessor extension for parameter '{0}'. A preprocessor extension is expected because the parameter prefix, '{1}', is not one of the standard types: 'env', 'res', 'sys', or 'var'.", parameterName, parameterPrefix);
1701 }
1702
1703 public static Message PreprocessorExtensionGetVariableValueFailed(SourceLineNumber sourceLineNumbers, string prefix, string variable, string message)
@@ -1751,7 +1732,7 @@ namespace WixToolset.Data
1732
1733 public static Message RadioButtonBitmapAndIconDisallowed(SourceLineNumber sourceLineNumbers)
1734 {
1754 - return Message(sourceLineNumbers, Ids.RadioButtonBitmapAndIconDisallowed, "RadioButtonGroup elements that contain RadioButton elements with Bitmap or Icon attributes set to \"yes\" can only be specified under a Control element. Move your RadioButtonGroup element as a child of the appropriate Control element.");
1735 + return Message(sourceLineNumbers, Ids.RadioButtonBitmapAndIconDisallowed, "RadioButtonGroup elements that contain RadioButton elements with Bitmap or Icon attributes set to \"yes\" can only be specified under a Control element. Move your RadioButtonGroup element as a child of the appropriate Control element.");
1736 }
1737
1738 public static Message RadioButtonTypeInconsistent(SourceLineNumber sourceLineNumbers)
@@ -1766,7 +1747,7 @@ namespace WixToolset.Data
1747
1748 public static Message RealTableMissingPrimaryKeyColumn(SourceLineNumber sourceLineNumbers, string tableName)
1749 {
1769 - return Message(sourceLineNumbers, Ids.RealTableMissingPrimaryKeyColumn, "The table '{0}' does not contain any primary key columns. At least one column must be marked as the primary key to ensure this table can be patched.", tableName);
1750 + return Message(sourceLineNumbers, Ids.RealTableMissingPrimaryKeyColumn, "The table '{0}' does not contain any primary key columns. At least one column must be marked as the primary key to ensure this table can be patched.", tableName);
1751 }
1752
1753 public static Message RecursiveAction(string action, string tableName)
@@ -1781,17 +1762,17 @@ namespace WixToolset.Data
1762
1763 public static Message RegistryMultipleValuesWithoutMultiString(SourceLineNumber sourceLineNumbers, string registryElementName, string valueAttributeName, string registryValueElementName, string typeAttributeName)
1764 {
1784 - return Message(sourceLineNumbers, Ids.RegistryMultipleValuesWithoutMultiString, "The {0}/@{1} attribute and a {0}/{2} element cannot both be specified. Only one may be specified if the {3} attribute's value is not 'multiString'.", registryElementName, valueAttributeName, registryValueElementName, typeAttributeName);
1765 + return Message(sourceLineNumbers, Ids.RegistryMultipleValuesWithoutMultiString, "The {0}/@{1} attribute and a {0}/{2} element cannot both be specified. Only one may be specified if the {3} attribute's value is not 'multiString'.", registryElementName, valueAttributeName, registryValueElementName, typeAttributeName);
1766 }
1767
1768 public static Message RegistryNameValueIncorrect(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1769 {
1789 - return Message(sourceLineNumbers, Ids.RegistryNameValueIncorrect, "The {0}/@{1} attribute's value, '{2}', is incorrect. It should not contain values of '+', '-', or '*' when the {0}/@Value attribute is empty. Instead, use the proper element and attributes: for Name='+' use RegistryKey/@Action='createKey', for Name='-' use RemoveRegistryKey/@Action='removeOnUninstall', for Name='*' use RegistryKey/@Action='createAndRemoveOnUninstall'.", elementName, attributeName, value);
1770 + return Message(sourceLineNumbers, Ids.RegistryNameValueIncorrect, "The {0}/@{1} attribute's value, '{2}', is incorrect. It should not contain values of '+', '-', or '*' when the {0}/@Value attribute is empty. Instead, use the proper element and attributes: for Name='+' use RegistryKey/@Action='createKey', for Name='-' use RemoveRegistryKey/@Action='removeOnUninstall', for Name='*' use RegistryKey/@Action='createAndRemoveOnUninstall'.", elementName, attributeName, value);
1771 }
1772
1773 public static Message RegistryRootInvalid(SourceLineNumber sourceLineNumbers)
1774 {
1794 - return Message(sourceLineNumbers, Ids.RegistryRootInvalid, "Registry/@Root attribute is invalid on a nested Registry element. Either remove the Root attribute or move the Registry element so it is not nested under another Registry element.");
1775 + return Message(sourceLineNumbers, Ids.RegistryRootInvalid, "Registry/@Root attribute is invalid on a nested Registry element. Either remove the Root attribute or move the Registry element so it is not nested under another Registry element.");
1776 }
1777
1778 public static Message RegistrySubElementCannotBeRemoved(SourceLineNumber sourceLineNumbers, string registryElementName, string registryValueElementName, string actionAttributeName, string removeValue, string removeKeyOnInstallValue)
@@ -1816,7 +1797,7 @@ namespace WixToolset.Data
1797
1798 public static Message RootFeatureCannotFollowParent(SourceLineNumber sourceLineNumbers)
1799 {
1819 - return Message(sourceLineNumbers, Ids.RootFeatureCannotFollowParent, "The Feature element specifies a root feature with an illegal InstallDefault value of 'followParent'. Root features cannot follow their parent feature's install state because they don't have a parent feature. Please remove or change the value of the InstallDefault attribute.");
1800 + return Message(sourceLineNumbers, Ids.RootFeatureCannotFollowParent, "The Feature element specifies a root feature with an illegal InstallDefault value of 'followParent'. Root features cannot follow their parent feature's install state because they don't have a parent feature. Please remove or change the value of the InstallDefault attribute.");
1801 }
1802
1803 public static Message SameFileIdDifferentSource(SourceLineNumber sourceLineNumbers, string fileId, string sourcePath1, string sourcePath2)
@@ -1846,17 +1827,17 @@ namespace WixToolset.Data
1827
1828 public static Message SearchPropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1829 {
1849 - return Message(sourceLineNumbers, Ids.SearchPropertyNotUppercase, "The {0}/@{1} attribute's value, '{2}', cannot contain lowercase characters. Since this is a search property, it must also be a public property. This means the Property/@Id value must be completely uppercase.", elementName, attributeName, value);
1830 + return Message(sourceLineNumbers, Ids.SearchPropertyNotUppercase, "The {0}/@{1} attribute's value, '{2}', cannot contain lowercase characters. Since this is a search property, it must also be a public property. This means the Property/@Id value must be completely uppercase.", elementName, attributeName, value);
1831 }
1832
1833 public static Message SecurePropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string propertyId)
1834 {
1854 - return Message(sourceLineNumbers, Ids.SecurePropertyNotUppercase, "The {0}/@{1} attribute's value, '{2}', cannot contain lowercase characters. Since this is a secure property, it must also be a public property. This means the Property/@Id value must be completely uppercase.", elementName, attributeName, propertyId);
1835 + return Message(sourceLineNumbers, Ids.SecurePropertyNotUppercase, "The {0}/@{1} attribute's value, '{2}', cannot contain lowercase characters. Since this is a secure property, it must also be a public property. This means the Property/@Id value must be completely uppercase.", elementName, attributeName, propertyId);
1836 }
1837
1838 public static Message SignedEmbeddedCabinet(SourceLineNumber sourceLineNumbers)
1839 {
1859 - return Message(sourceLineNumbers, Ids.SignedEmbeddedCabinet, "The DigitalSignature element cannot be nested under a Media element which specifies EmbedCab='yes'. This is because Windows Installer can only verify the digital signatures of external cabinets. Please either remove the DigitalSignature element or change the value of the Media/@EmbedCab attribute to 'no'.");
1840 + return Message(sourceLineNumbers, Ids.SignedEmbeddedCabinet, "The DigitalSignature element cannot be nested under a Media element which specifies EmbedCab='yes'. This is because Windows Installer can only verify the digital signatures of external cabinets. Please either remove the DigitalSignature element or change the value of the Media/@EmbedCab attribute to 'no'.");
1841 }
1842
1843 public static Message SingleExtensionSupported()
@@ -1864,21 +1845,6 @@ namespace WixToolset.Data
1845 return Message(null, Ids.SingleExtensionSupported, "Multiple extensions were specified on the command line, only a single extension is supported.");
1846 }
1847
1867 - public static Message SmokeMalformedPath()
1868 - {
1869 - return Message(null, Ids.SmokeMalformedPath, "Path contains one or more invalid characters.");
1870 - }
1871 -
1872 - public static Message SmokeUnknownFileExtension()
1873 - {
1874 - return Message(null, Ids.SmokeUnknownFileExtension, "Unknown input file format - expected a .msi or .msm file.");
1875 - }
1876 -
1877 - public static Message SmokeUnsupportedFileExtension()
1878 - {
1879 - return Message(null, Ids.SmokeUnsupportedFileExtension, "Files with an extension of .msp are not currently supported.");
1880 - }
1881 -
1848 public static Message SpecifiedBinderNotFound(string binderClass)
1849 {
1850 return Message(null, Ids.SpecifiedBinderNotFound, "The specified binder class '{0}' was not found in any extensions.", binderClass);
@@ -1889,11 +1855,6 @@ namespace WixToolset.Data
1855 return Message(null, Ids.SplitCabinetCopyRegistrationFailed, "Failed to register the copy command for cabinet '{0}' formed by splitting cabinet '{1}'.", newCabName, firstCabName);
1856 }
1857
1892 - public static Message SplitCabinetInsertionFailed(string newCabName, string firstCabName, string lastCabinetOfThisSequence)
1893 - {
1894 - return Message(null, Ids.SplitCabinetInsertionFailed, "Could not find the last split cabinet '{2}' in the Media Table. So failed to add new cabinet '{0}' formed by splitting cabinet '{1}' to the installer package.", newCabName, firstCabName, lastCabinetOfThisSequence);
1895 - }
1896 -
1858 public static Message SplitCabinetNameCollision(string newCabName, string firstCabName)
1859 {
1860 return Message(null, Ids.SplitCabinetNameCollision, "The cabinet name '{0}' collides with the new cabinet formed by splitting cabinet '{1}', consider renaming cabinet '{0}'.", newCabName, firstCabName);
@@ -1901,17 +1862,17 @@ namespace WixToolset.Data
1862
1863 public static Message StandardActionRelativelyScheduledInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
1864 {
1904 - return Message(sourceLineNumbers, Ids.StandardActionRelativelyScheduledInModule, "The {0} table contains a standard action '{1}' that does not have a sequence number specified. The Sequence attribute is required for standard actions in a merge module. Please remove the action or use the Sequence attribute.", sequenceTableName, actionName);
1865 + return Message(sourceLineNumbers, Ids.StandardActionRelativelyScheduledInModule, "The {0} table contains a standard action '{1}' that does not have a sequence number specified. The Sequence attribute is required for standard actions in a merge module. Please remove the action or use the Sequence attribute.", sequenceTableName, actionName);
1866 }
1867
1868 public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length, int maximumLength)
1869 {
1909 - return Message(sourceLineNumbers, Ids.StreamNameTooLong, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. This is too long because it will be used to create a stream name. It cannot be more than than {4} characters long.", elementName, attributeName, value, length, maximumLength);
1870 + return Message(sourceLineNumbers, Ids.StreamNameTooLong, "The {0}/@{1} attribute's value, '{2}', is {3} characters long. This is too long because it will be used to create a stream name. It cannot be more than than {4} characters long.", elementName, attributeName, value, length, maximumLength);
1871 }
1872
1873 public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string tableName, string streamName, int streamLength)
1874 {
1914 - return Message(sourceLineNumbers, Ids.StreamNameTooLong, "The binary value in table '{0}' will be stored with a stream name, '{1}', that is {2} characters long. This is too long because the maximum allowed length for a stream name is 62 characters long. Since the stream name is created by concatenating the table name and values of the primary key for a row (delimited by periods), this error can be resolved by shortening a value that is part of the primary key.", tableName, streamName, streamLength);
1875 + return Message(sourceLineNumbers, Ids.StreamNameTooLong, "The binary value in table '{0}' will be stored with a stream name, '{1}', that is {2} characters long. This is too long because the maximum allowed length for a stream name is 62 characters long. Since the stream name is created by concatenating the table name and values of the primary key for a row (delimited by periods), this error can be resolved by shortening a value that is part of the primary key.", tableName, streamName, streamLength);
1876 }
1877
1878 public static Message StubMissingWixburnSection(string filename)
@@ -1926,7 +1887,7 @@ namespace WixToolset.Data
1887
1888 public static Message SuppressNonoverridableAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
1889 {
1929 - return Message(sourceLineNumbers, Ids.SuppressNonoverridableAction, "The {0} table contains an action '{1}' that cannot be suppressed because it is not declared overridable in the base definition. Please stop suppressing the action or make it overridable in its base declaration.", sequenceTableName, actionName);
1890 + return Message(sourceLineNumbers, Ids.SuppressNonoverridableAction, "The {0} table contains an action '{1}' that cannot be suppressed because it is not declared overridable in the base definition. Please stop suppressing the action or make it overridable in its base declaration.", sequenceTableName, actionName);
1891 }
1892
1893 public static Message SuppressNonoverridableAction2(SourceLineNumber sourceLineNumbers)
@@ -1946,7 +1907,7 @@ namespace WixToolset.Data
1907
1908 public static Message TableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1909 {
1949 - return Message(sourceLineNumbers, Ids.TableNameTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for a table name. It cannot be more than than 31 characters long.", elementName, attributeName, value);
1910 + return Message(sourceLineNumbers, Ids.TableNameTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for a table name. It cannot be more than than 31 characters long.", elementName, attributeName, value);
1911 }
1912
1913 public static Message TooDeeplyIncluded(SourceLineNumber sourceLineNumbers, int depth)
@@ -1956,17 +1917,17 @@ namespace WixToolset.Data
1917
1918 public static Message TooManyChildren(SourceLineNumber sourceLineNumbers, string elementName, string childElementName)
1919 {
1959 - return Message(sourceLineNumbers, Ids.TooManyChildren, "The {0} element contains multiple {1} child elements. There can only be one {1} child element per {0} element.", elementName, childElementName);
1920 + return Message(sourceLineNumbers, Ids.TooManyChildren, "The {0} element contains multiple {1} child elements. There can only be one {1} child element per {0} element.", elementName, childElementName);
1921 }
1922
1923 public static Message TooManyColumnsInRealTable(string tableName, int columnCount, int supportedColumnCount)
1924 {
1964 - return Message(null, Ids.TooManyColumnsInRealTable, "The table '{0}' contains {1} columns which is not supported by Windows Installer. Windows Installer supports a maximum of {2} columns.", tableName, columnCount, supportedColumnCount);
1925 + return Message(null, Ids.TooManyColumnsInRealTable, "The table '{0}' contains {1} columns which is not supported by Windows Installer. Windows Installer supports a maximum of {2} columns.", tableName, columnCount, supportedColumnCount);
1926 }
1927
1928 public static Message TooManyElements(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, int expectedInstances)
1929 {
1969 - return Message(sourceLineNumbers, Ids.TooManyElements, "The {0} element contains an unexpected child element '{1}'. The '{1}' element may only occur {2} time(s) under the {0} element.", elementName, childElementName, expectedInstances);
1930 + return Message(sourceLineNumbers, Ids.TooManyElements, "The {0} element contains an unexpected child element '{1}'. The '{1}' element may only occur {2} time(s) under the {0} element.", elementName, childElementName, expectedInstances);
1931 }
1932
1933 public static Message TooManySearchElements(SourceLineNumber sourceLineNumbers, string elementName)
@@ -1981,17 +1942,17 @@ namespace WixToolset.Data
1942
1943 public static Message TypeSpecificationForExtensionRequired(string parameter)
1944 {
1984 - return Message(null, Ids.TypeSpecificationForExtensionRequired, "The parameter '{0}' must be followed by the extension's type specification. The type specification should be a fully qualified class and assembly identity, for example: \"MyNamespace.MyClass,myextension.dll\".", parameter);
1945 + return Message(null, Ids.TypeSpecificationForExtensionRequired, "The parameter '{0}' must be followed by the extension's type specification. The type specification should be a fully qualified class and assembly identity, for example: \"MyNamespace.MyClass,myextension.dll\".", parameter);
1946 }
1947
1948 public static Message UnableToGetAuthenticodeCertOfFile(string filePath, string moreInformation)
1949 {
1989 - return Message(null, Ids.UnableToGetAuthenticodeCertOfFile, "Unable to get the authenticode certificate of '{0}'. More information: {1}", filePath, moreInformation);
1950 + return Message(null, Ids.UnableToGetAuthenticodeCertOfFile, "Unable to get the authenticode certificate of '{0}'. More information: {1}", filePath, moreInformation);
1951 }
1952
1953 public static Message UnableToGetAuthenticodeCertOfFileDownlevelOS(string filePath, string moreInformation)
1954 {
1994 - return Message(null, Ids.UnableToGetAuthenticodeCertOfFileDownlevelOS, "Unable to get the authenticode certificate of '{0}'. The cryptography API has limitations on Windows XP and Windows Server 2003. More information: {1}", filePath, moreInformation);
1955 + return Message(null, Ids.UnableToGetAuthenticodeCertOfFileDownlevelOS, "Unable to get the authenticode certificate of '{0}'. The cryptography API has limitations on Windows XP and Windows Server 2003. More information: {1}", filePath, moreInformation);
1956 }
1957
1958 public static Message UnableToConvertFieldToNumber(string value)
@@ -2121,27 +2082,27 @@ namespace WixToolset.Data
2082
2083 public static Message UnexpectedTableInMergeModule(SourceLineNumber sourceLineNumbers, string tableName)
2084 {
2124 - return Message(sourceLineNumbers, Ids.UnexpectedTableInMergeModule, "An unexpected row in the '{0}' table was found in this merge module. Merge modules cannot contain the '{0}' table.", tableName);
2085 + return Message(sourceLineNumbers, Ids.UnexpectedTableInMergeModule, "An unexpected row in the '{0}' table was found in this merge module. Merge modules cannot contain the '{0}' table.", tableName);
2086 }
2087
2088 public static Message UnexpectedTableInPatch(SourceLineNumber sourceLineNumbers, string tableName)
2089 {
2129 - return Message(sourceLineNumbers, Ids.UnexpectedTableInPatch, "An unexpected row in the '{0}' table was found in this patch. Patches cannot contain the '{0}' table.", tableName);
2090 + return Message(sourceLineNumbers, Ids.UnexpectedTableInPatch, "An unexpected row in the '{0}' table was found in this patch. Patches cannot contain the '{0}' table.", tableName);
2091 }
2092
2093 public static Message UnexpectedTableInPatchCreationPackage(SourceLineNumber sourceLineNumbers, string tableName)
2094 {
2134 - return Message(sourceLineNumbers, Ids.UnexpectedTableInPatchCreationPackage, "An unexpected row in the '{0}' table was found in this patch creation package. Patch creation packages cannot contain the '{0}' table.", tableName);
2095 + return Message(sourceLineNumbers, Ids.UnexpectedTableInPatchCreationPackage, "An unexpected row in the '{0}' table was found in this patch creation package. Patch creation packages cannot contain the '{0}' table.", tableName);
2096 }
2097
2098 public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace)
2099 {
2139 - return Message(sourceLineNumbers, Ids.UnhandledExtensionAttribute, "The {0} element contains an unhandled extension attribute '{1}'. Please ensure that the extension for attributes in the '{2}' namespace has been provided.", elementName, extensionAttributeName, extensionNamespace);
2100 + return Message(sourceLineNumbers, Ids.UnhandledExtensionAttribute, "The {0} element contains an unhandled extension attribute '{1}'. Please ensure that the extension for attributes in the '{2}' namespace has been provided.", elementName, extensionAttributeName, extensionNamespace);
2101 }
2102
2103 public static Message UnhandledExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName, string extensionNamespace)
2104 {
2144 - return Message(sourceLineNumbers, Ids.UnhandledExtensionElement, "The {0} element contains an unhandled extension element '{1}'. Please ensure that the extension for elements in the '{2}' namespace has been provided.", elementName, extensionElementName, extensionNamespace);
2105 + return Message(sourceLineNumbers, Ids.UnhandledExtensionElement, "The {0} element contains an unhandled extension element '{1}'. Please ensure that the extension for elements in the '{2}' namespace has been provided.", elementName, extensionElementName, extensionNamespace);
2106 }
2107
2108 public static Message UniqueFileSearchIdRequired(SourceLineNumber sourceLineNumbers, string id, string elementName)
@@ -2191,12 +2152,12 @@ namespace WixToolset.Data
2152
2153 public static Message UnsupportedExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName)
2154 {
2194 - return Message(sourceLineNumbers, Ids.UnsupportedExtensionAttribute, "The {0} element contains an unsupported extension attribute '{1}'. The {0} element does not currently support extension attributes. Is the {1} attribute using the correct XML namespace?", elementName, extensionElementName);
2155 + return Message(sourceLineNumbers, Ids.UnsupportedExtensionAttribute, "The {0} element contains an unsupported extension attribute '{1}'. The {0} element does not currently support extension attributes. Is the {1} attribute using the correct XML namespace?", elementName, extensionElementName);
2156 }
2157
2158 public static Message UnsupportedExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName)
2159 {
2199 - return Message(sourceLineNumbers, Ids.UnsupportedExtensionElement, "The {0} element contains an unsupported extension element '{1}'. The {0} element does not currently support extension elements. Is the {1} element using the correct XML namespace?", elementName, extensionElementName);
2160 + return Message(sourceLineNumbers, Ids.UnsupportedExtensionElement, "The {0} element contains an unsupported extension element '{1}'. The {0} element does not currently support extension elements. Is the {1} element using the correct XML namespace?", elementName, extensionElementName);
2161 }
2162
2163 public static Message UnsupportedPlatformForElement(SourceLineNumber sourceLineNumbers, string platform, string elementName)
@@ -2246,7 +2207,7 @@ namespace WixToolset.Data
2207
2208 public static Message VersionIndependentProgIdsCannotHaveIcons(SourceLineNumber sourceLineNumbers)
2209 {
2249 - return Message(sourceLineNumbers, Ids.VersionIndependentProgIdsCannotHaveIcons, "Version independent ProgIds cannot have Icons. Remove the Icon and/or IconIndex attributes from your ProgId element.");
2210 + return Message(sourceLineNumbers, Ids.VersionIndependentProgIdsCannotHaveIcons, "Version independent ProgIds cannot have Icons. Remove the Icon and/or IconIndex attributes from your ProgId element.");
2211 }
2212
2213 public static Message VersionMismatch(SourceLineNumber sourceLineNumbers, string fileType, string version, string expectedVersion)
@@ -2271,17 +2232,12 @@ namespace WixToolset.Data
2232
2233 public static Message WixVariableCollision(SourceLineNumber sourceLineNumbers, string variableId)
2234 {
2274 - return Message(sourceLineNumbers, Ids.WixVariableCollision, "The WiX variable '{0}' is declared in more than one location. Please remove one of the declarations.", variableId);
2235 + return Message(sourceLineNumbers, Ids.WixVariableCollision, "The WiX variable '{0}' is declared in more than one location. Please remove one of the declarations.", variableId);
2236 }
2237
2238 public static Message WixVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId)
2239 {
2279 - return Message(sourceLineNumbers, Ids.WixVariableUnknown, "The WiX variable !(wix.{0}) is unknown. Please ensure the variable is declared on the command line for light.exe, via a WixVariable element, or inline using the syntax !(wix.{0}=some value which doesn't contain parenthesis).", variableId);
2280 - }
2281 -
2282 - public static Message WrongFileExtensionForNumberOfInputs(string inputExtension, string input)
2283 - {
2284 - return Message(null, Ids.WrongFileExtensionForNumberOfInputs, "The extension '{0}' on the input specified '{1}' does not match the number of inputs required to handle an input with this extension. Check if you are missing an input or have too many.", inputExtension, input);
2240 + return Message(sourceLineNumbers, Ids.WixVariableUnknown, "The WiX variable !(wix.{0}) is unknown. Please ensure the variable is declared on the command line for light.exe, via a WixVariable element, or inline using the syntax !(wix.{0}=some value which doesn't contain parenthesis).", variableId);
2241 }
2242
2243 public static Message NoSourceFiles()
@@ -2341,7 +2297,7 @@ namespace WixToolset.Data
2297 StreamNameTooLong = 13,
2298 IllegalIdentifier = 14,
2299 IllegalYesNoValue = 15,
2344 - CabCreationFailed = 16,
2300 + CommandLineCommandRequired = 16,
2301 CabExtractionFailed = 17,
2302 AppIdIncompatibleAdvertiseState = 18,
2303 IllegalAttributeWhenAdvertised = 19,
@@ -2349,7 +2305,6 @@ namespace WixToolset.Data
2305 IllegalAttributeValue = 21,
2306 CustomActionMultipleSources = 22,
2307 CustomActionMultipleTargets = 23,
2352 - CustomActionIllegalInnerText = 24,
2308 IllegalShortFilename = 26,
2309 IllegalLongFilename = 27,
2310 TableNameTooLong = 28,
@@ -2367,7 +2322,6 @@ namespace WixToolset.Data
2322 ExampleGuid = 40,
2323 TooManyChildren = 41,
2324 ComponentMultipleKeyPaths = 42,
2370 - CabClosureFailed = 43,
2325 ExpectedAttributes = 44,
2326 ExpectedAttributesWithOtherAttribute = 45,
2327 ExpectedAttributesWithoutOtherAttribute = 46,
@@ -2586,7 +2540,7 @@ namespace WixToolset.Data
2540 InvalidPlatformValue = 265,
2541 IllegalValidationArguments = 266,
2542 OrphanedComponent = 267,
2589 - IllegalCommandlineArgumentCombination = 268,
2543 + IllegalCommandLineArgumentValue = 268,
2544 ProductCodeInvalidForTransform = 269,
2545 InsertInvalidSequenceActionOrder = 270,
2546 InsertSequenceNoSpace = 271,
@@ -2641,8 +2595,6 @@ namespace WixToolset.Data
2595 BothUpgradeCodesRequired = 322,
2596 IllegalBinderClassName = 323,
2597 SpecifiedBinderNotFound = 324,
2644 - CannotLoadBinderFileManager = 325,
2645 - CannotLoadLinkerExtension = 326,
2598 UnableToGetAuthenticodeCertOfFile = 327,
2599 UnableToGetAuthenticodeCertOfFileDownlevelOS = 328,
2600 ReadOnlyOutputFile = 329,
@@ -2650,9 +2602,6 @@ namespace WixToolset.Data
2602 ParentElementAttributeRequired = 331,
2603 PreprocessorExtensionPragmaFailed = 333,
2604 InvalidPreprocessorPragma = 334,
2653 - SmokeUnknownFileExtension = 335,
2654 - SmokeUnsupportedFileExtension = 336,
2655 - SmokeMalformedPath = 337,
2605 InvalidStubExe = 338,
2606 StubMissingWixburnSection = 339,
2607 StubWixburnSectionTooSmall = 340,
@@ -2671,7 +2620,6 @@ namespace WixToolset.Data
2620 MultipleFilesMatchedWithOutputSpecification = 353,
2621 InvalidBundle = 354,
2622 BundleTooNew = 355,
2674 - WrongFileExtensionForNumberOfInputs = 356,
2623 MediaTableCollision = 357,
2624 InvalidCabinetTemplate = 358,
2625 MaximumUncompressedMediaSizeTooLarge = 359,
@@ -2691,7 +2639,6 @@ namespace WixToolset.Data
2639 MaximumCabinetSizeForLargeFileSplittingTooLarge = 375,
2640 SplitCabinetCopyRegistrationFailed = 376,
2641 SplitCabinetNameCollision = 377,
2694 - SplitCabinetInsertionFailed = 378,
2642 InvalidPreprocessorFunctionAutoVersion = 379,
2643 InvalidFourPartVersion = 380,
2644 UnsupportedPlatformForElement = 381,
src/api/wix/WixToolset.Extensibility/Services/ICommandLineParser.cs
+2 -1
@@ -73,8 +73,9 @@ namespace WixToolset.Extensibility.Services
73 /// Gets the next argument as a file or displays an error.
74 /// </summary>
75 /// <param name="argument">Current argument used in the error message if necessary.</param>
76 + /// <param name="filePurpose">Purpose of the required file.</param>
77 /// <returns>The fully expanded path if the argument is a file path, otherwise null.</returns>
77 - string GetNextArgumentAsFilePathOrError(string argument);
78 + string GetNextArgumentAsFilePathOrError(string argument, string filePurpose);
79
80 /// <summary>
81 /// Adds the next argument as a file to the list or displays an error.
src/tools/heat/HeatCommand.cs
+1 -1
@@ -75,7 +75,7 @@ namespace WixToolset.Harvesters
75 }
76 else if ("o" == parameter || "out" == parameter)
77 {
78 - this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg);
78 + this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg, "output source file");
79
80 if (String.IsNullOrEmpty(this.OutputFile))
81 {
src/wix/WixToolset.Core.Burn/CommandLine/BurnCommand.cs
+6 -2
@@ -5,6 +5,7 @@ namespace WixToolset.Core.Burn.CommandLine
5 using System;
6 using System.Threading;
7 using System.Threading.Tasks;
8 + using WixToolset.Data;
9 using WixToolset.Extensibility;
10 using WixToolset.Extensibility.Data;
11 using WixToolset.Extensibility.Services;
@@ -17,10 +18,13 @@ namespace WixToolset.Core.Burn.CommandLine
18 public BurnCommand(IServiceProvider serviceProvider)
19 {
20 this.ServiceProvider = serviceProvider;
21 + this.Messaging = this.ServiceProvider.GetService<IMessaging>();
22 }
23
24 private IServiceProvider ServiceProvider { get; }
25
26 + private IMessaging Messaging { get; }
27 +
28 private BurnSubcommandBase Subcommand { get; set; }
29
30 public override CommandLineHelp GetCommandLineHelp()
@@ -41,8 +45,8 @@ namespace WixToolset.Core.Burn.CommandLine
45 {
46 if (this.Subcommand is null)
47 {
44 - Console.Error.WriteLine("A subcommand is required for the \"burn\" command. Add -h to for help.");
45 - return Task.FromResult(1);
48 + this.Messaging.Write(ErrorMessages.CommandLineCommandRequired("burn"));
49 + return Task.FromResult(this.Messaging.LastErrorNumber);
50 }
51
52 return this.Subcommand.ExecuteAsync(cancellationToken);
src/wix/WixToolset.Core.Burn/CommandLine/DetachSubcommand.cs
+13 -13
@@ -7,6 +7,7 @@ namespace WixToolset.Core.Burn.CommandLine
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core.Burn.Inscribe;
10 + using WixToolset.Data;
11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
13
@@ -41,23 +42,22 @@ namespace WixToolset.Core.Burn.CommandLine
42 {
43 if (String.IsNullOrEmpty(this.InputPath))
44 {
44 - Console.Error.WriteLine("Path to input bundle is required");
45 - return Task.FromResult(-1);
45 + this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle"));
46 }
47 -
48 - if (String.IsNullOrEmpty(this.EngineOutputPath))
47 + else if (String.IsNullOrEmpty(this.EngineOutputPath))
48 {
50 - Console.Error.WriteLine("Path to output the bundle engine is required");
51 - return Task.FromResult(-1);
49 + this.Messaging.Write(ErrorMessages.FilePathRequired("output the bundle engine"));
50 }
53 -
54 - if (String.IsNullOrEmpty(this.IntermediateFolder))
51 + else
52 {
56 - this.IntermediateFolder = Path.GetTempPath();
57 - }
53 + if (String.IsNullOrEmpty(this.IntermediateFolder))
54 + {
55 + this.IntermediateFolder = Path.GetTempPath();
56 + }
57
59 - var command = new InscribeBundleEngineCommand(this.ServiceProvider, this.InputPath, this.EngineOutputPath, this.IntermediateFolder);
60 - command.Execute();
58 + var command = new InscribeBundleEngineCommand(this.ServiceProvider, this.InputPath, this.EngineOutputPath, this.IntermediateFolder);
59 + command.Execute();
60 + }
61
62 return Task.FromResult(this.Messaging.LastErrorNumber);
63 }
@@ -74,7 +74,7 @@ namespace WixToolset.Core.Burn.CommandLine
74 return true;
75
76 case "engine":
77 - this.EngineOutputPath = parser.GetNextArgumentAsFilePathOrError(argument);
77 + this.EngineOutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output the bundle engine");
78 return true;
79 }
80 }
src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs
+21 -21
@@ -7,6 +7,7 @@ namespace WixToolset.Core.Burn.CommandLine
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core.Burn.Bundles;
10 + using WixToolset.Data;
11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
13
@@ -41,34 +42,33 @@ namespace WixToolset.Core.Burn.CommandLine
42 {
43 if (String.IsNullOrEmpty(this.InputPath))
44 {
44 - Console.Error.WriteLine("Path to input bundle is required");
45 - return Task.FromResult(-1);
45 + this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle"));
46 }
47 -
48 - if (String.IsNullOrEmpty(this.ExtractPath))
47 + else if (String.IsNullOrEmpty(this.ExtractPath))
48 {
50 - Console.Error.WriteLine("Path to output the extracted bundle is required");
51 - return Task.FromResult(-1);
49 + this.Messaging.Write(ErrorMessages.FilePathRequired("output the extracted bundle"));
50 }
53 -
54 - if (String.IsNullOrEmpty(this.IntermediateFolder))
51 + else
52 {
56 - this.IntermediateFolder = Path.GetTempPath();
57 - }
58 -
59 - var uxExtractPath = Path.Combine(this.ExtractPath, "BA");
60 -
61 - using (var reader = BurnReader.Open(this.Messaging, this.FileSystem, this.InputPath))
62 - {
63 - reader.ExtractUXContainer(uxExtractPath, this.IntermediateFolder);
64 -
65 - try
53 + if (String.IsNullOrEmpty(this.IntermediateFolder))
54 {
67 - reader.ExtractAttachedContainers(this.ExtractPath, this.IntermediateFolder);
55 + this.IntermediateFolder = Path.GetTempPath();
56 }
69 - catch
57 +
58 + var uxExtractPath = Path.Combine(this.ExtractPath, "BA");
59 +
60 + using (var reader = BurnReader.Open(this.Messaging, this.FileSystem, this.InputPath))
61 {
71 - this.Messaging.Write(BurnBackendWarnings.FailedToExtractAttachedContainers(new Data.SourceLineNumber(this.ExtractPath)));
62 + reader.ExtractUXContainer(uxExtractPath, this.IntermediateFolder);
63 +
64 + try
65 + {
66 + reader.ExtractAttachedContainers(this.ExtractPath, this.IntermediateFolder);
67 + }
68 + catch
69 + {
70 + this.Messaging.Write(BurnBackendWarnings.FailedToExtractAttachedContainers(new Data.SourceLineNumber(this.ExtractPath)));
71 + }
72 }
73 }
74
src/wix/WixToolset.Core.Burn/CommandLine/ReattachSubcommand.cs
+27 -26
@@ -7,6 +7,7 @@ namespace WixToolset.Core.Burn.CommandLine
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core.Burn.Inscribe;
10 + using WixToolset.Data;
11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
13
@@ -32,7 +33,7 @@ namespace WixToolset.Core.Burn.CommandLine
33
34 public override CommandLineHelp GetCommandLineHelp()
35 {
35 - return new CommandLineHelp("Reattaches a signed burn engine to a bundle.", "burn reattach [options] original.exe signed.exe -o final.exe", new[]
36 + return new CommandLineHelp("Reattaches a signed burn engine to a bundle.", "burn reattach [options] original.exe -engine signed.exe -o final.exe", new[]
37 {
38 new CommandLineHelpSwitch("-intermediateFolder", "Optional working folder. If not specified %TMP% will be used."),
39 new CommandLineHelpSwitch("-out", "-o", "Output bundle with signed engine attached."),
@@ -43,39 +44,39 @@ namespace WixToolset.Core.Burn.CommandLine
44 {
45 if (String.IsNullOrEmpty(this.InputPath))
46 {
46 - Console.Error.WriteLine("Path to input bundle is required");
47 - return Task.FromResult(-1);
47 + this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle"));
48 }
49 -
50 - if (String.IsNullOrEmpty(this.SignedEnginePath))
49 + else if (String.IsNullOrEmpty(this.SignedEnginePath))
50 {
52 - Console.Error.WriteLine("Path to detached signed bundle engine is required");
53 - return Task.FromResult(-1);
51 + this.Messaging.Write(ErrorMessages.FilePathRequired("detached signed bundle bundle"));
52 }
55 -
56 - if (String.IsNullOrEmpty(this.IntermediateFolder))
53 + else
54 {
58 - this.IntermediateFolder = Path.GetTempPath();
59 - }
55 + if (String.IsNullOrEmpty(this.IntermediateFolder))
56 + {
57 + this.IntermediateFolder = Path.GetTempPath();
58 + }
59
61 - if (String.IsNullOrEmpty(this.OutputPath))
62 - {
63 - this.OutputPath = this.InputPath;
64 - }
60 + if (String.IsNullOrEmpty(this.OutputPath))
61 + {
62 + this.OutputPath = this.InputPath;
63 + }
64
66 - var command = new InscribeBundleCommand(this.ServiceProvider, this.InputPath, this.SignedEnginePath, this.OutputPath, this.IntermediateFolder);
67 - var didWork = command.Execute();
65 + var command = new InscribeBundleCommand(this.ServiceProvider, this.InputPath, this.SignedEnginePath, this.OutputPath, this.IntermediateFolder);
66 + var didWork = command.Execute();
67
69 - // If the detach subcommand did not encounter an error but did no work
70 - // then return the special exit code that indicates no work was done (-1000).
71 - var exitCode = this.Messaging.LastErrorNumber;
68 + // If the detach subcommand did not encounter an error but did no work
69 + // then return the special exit code that indicates no work was done (-1000).
70 + var exitCode = this.Messaging.LastErrorNumber;
71
73 - if (!didWork && exitCode == 0)
74 - {
75 - exitCode = -1000;
72 + if (!didWork && exitCode == 0)
73 + {
74 + exitCode = -1000;
75 + return Task.FromResult(exitCode);
76 + }
77 }
78
78 - return Task.FromResult(exitCode);
79 + return Task.FromResult(this.Messaging.LastErrorNumber);
80 }
81
82 public override bool TryParseArgument(ICommandLineParser parser, string argument)
@@ -86,7 +87,7 @@ namespace WixToolset.Core.Burn.CommandLine
87 switch (parameter.ToLowerInvariant())
88 {
89 case "engine":
89 - this.SignedEnginePath = parser.GetNextArgumentAsFilePathOrError(argument);
90 + this.SignedEnginePath = parser.GetNextArgumentAsFilePathOrError(argument, "detached signed bundle bundle");
91 return true;
92
93 case "intermediatefolder":
@@ -95,7 +96,7 @@ namespace WixToolset.Core.Burn.CommandLine
96
97 case "o":
98 case "out":
98 - this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument);
99 + this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output bundle");
100 return true;
101 }
102 }
src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs
+37 -28
@@ -102,33 +102,34 @@ namespace WixToolset.Core.Burn.CommandLine
102 var inputPaths = this.ExpandInputPaths();
103 if (inputPaths.Count == 0)
104 {
105 - Console.Error.WriteLine("Path to a remote payload is required");
106 - return Task.FromResult(-1);
105 + this.Messaging.Write(ErrorMessages.FilePathRequired("a remote payload"));
106 }
108 -
109 - // Reverse sort to ensure longest paths are matched first.
110 - this.BasePaths.Sort();
111 - this.BasePaths.Reverse();
112 -
113 - if (String.IsNullOrEmpty(this.IntermediateFolder))
107 + else
108 {
115 - this.IntermediateFolder = Path.GetTempPath();
116 - }
109 + // Reverse sort to ensure longest paths are matched first.
110 + this.BasePaths.Sort();
111 + this.BasePaths.Reverse();
112
118 - var element = this.HarvestPackageElement(inputPaths);
119 -
120 - if (!this.Messaging.EncounteredError)
121 - {
122 - if (!String.IsNullOrEmpty(this.OutputPath))
113 + if (String.IsNullOrEmpty(this.IntermediateFolder))
114 {
124 - var outputFolder = Path.GetDirectoryName(this.OutputPath);
125 - Directory.CreateDirectory(outputFolder);
126 -
127 - File.WriteAllText(this.OutputPath, element.ToString());
115 + this.IntermediateFolder = Path.GetTempPath();
116 }
129 - else
117 +
118 + var element = this.HarvestPackageElement(inputPaths);
119 +
120 + if (!this.Messaging.EncounteredError)
121 {
131 - Console.WriteLine(element.ToString());
122 + if (!String.IsNullOrEmpty(this.OutputPath))
123 + {
124 + var outputFolder = Path.GetDirectoryName(this.OutputPath);
125 + Directory.CreateDirectory(outputFolder);
126 +
127 + File.WriteAllText(this.OutputPath, element.ToString());
128 + }
129 + else
130 + {
131 + Console.WriteLine(element.ToString());
132 + }
133 }
134 }
135
@@ -149,12 +150,16 @@ namespace WixToolset.Core.Burn.CommandLine
150
151 case "bundlepayloadgeneration":
152 var bundlePayloadGenerationValue = parser.GetNextArgumentOrError(argument);
152 - if (Enum.TryParse<BundlePackagePayloadGenerationType>(bundlePayloadGenerationValue, ignoreCase: true, out var bundlePayloadGeneration))
153 + if (Enum.TryParse(bundlePayloadGenerationValue, ignoreCase: true, out BundlePackagePayloadGenerationType bundlePayloadGeneration))
154 {
155 this.BundlePayloadGeneration = bundlePayloadGeneration;
155 - return true;
156 }
157 - break;
157 + else if (!String.IsNullOrEmpty(bundlePayloadGenerationValue))
158 + {
159 + parser.ReportErrorArgument(argument, ErrorMessages.IllegalCommandLineArgumentValue(argument, bundlePayloadGenerationValue, Enum.GetNames(typeof(BundlePackagePayloadGenerationType)).Select(s => s.ToLowerInvariant())));
160 + }
161 +
162 + return true;
163
164 case "du":
165 case "downloadurl":
@@ -167,16 +172,20 @@ namespace WixToolset.Core.Burn.CommandLine
172
173 case "packagetype":
174 var packageTypeValue = parser.GetNextArgumentOrError(argument);
170 - if (Enum.TryParse<WixBundlePackageType>(packageTypeValue, ignoreCase: true, out var packageType))
175 + if (Enum.TryParse(packageTypeValue, ignoreCase: true, out WixBundlePackageType packageType))
176 {
177 this.PackageType = packageType;
173 - return true;
178 }
175 - break;
179 + else if (!String.IsNullOrEmpty(packageTypeValue))
180 + {
181 + parser.ReportErrorArgument(argument, ErrorMessages.IllegalCommandLineArgumentValue(argument, packageTypeValue, Enum.GetNames(typeof(WixBundlePackageType)).Select(s => s.ToLowerInvariant())));
182 + }
183 +
184 + return true;
185
186 case "o":
187 case "out":
179 - this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument);
188 + this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file");
189 return true;
190
191 case "r":
src/wix/WixToolset.Core.ExtensionCache/ExtensionCacheManagerCommand.cs
+3 -2
@@ -7,6 +7,7 @@ namespace WixToolset.Core.ExtensionCache
7 using System.Linq;
8 using System.Threading;
9 using System.Threading.Tasks;
10 + using WixToolset.Data;
11 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Data;
13 using WixToolset.Extensibility.Services;
@@ -62,8 +63,8 @@ namespace WixToolset.Core.ExtensionCache
63 {
64 if (!this.Subcommand.HasValue)
65 {
65 - Console.Error.WriteLine("A subcommand is required for the \"extension\" command. Use -h to for help.");
66 - return -1;
66 + this.Messaging.Write(ErrorMessages.CommandLineCommandRequired("extension"));
67 + return this.Messaging.LastErrorNumber;
68 }
69
70 var success = false;
src/wix/WixToolset.Core.WindowsInstaller/CommandLine/DecompilerSubcommand.cs
+44 -45
@@ -62,58 +62,57 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
62 {
63 if (String.IsNullOrEmpty(this.InputPath))
64 {
65 - Console.Error.WriteLine("Input MSI or MSM database is required");
66 - return Task.FromResult(-1);
65 + this.Messaging.Write(ErrorMessages.FilePathRequired("input MSI or MSM database"));
66 }
68 -
69 - if (!this.TryCalculateDecompileType(out var decompileType))
70 - {
71 - Console.Error.WriteLine("Unknown output type '{0}' from input: {1}", decompileType, this.InputPath);
72 - return Task.FromResult(-1);
73 - }
74 -
75 - if (String.IsNullOrEmpty(this.IntermediateFolder))
67 + else if (!this.TryCalculateDecompileType(out var decompileType))
68 {
77 - this.IntermediateFolder = Path.GetTempPath();
69 + this.Messaging.Write(WindowsInstallerBackendErrors.UnknownDecompileType(this.DecompileType, this.InputPath));
70 }
79 -
80 - if (String.IsNullOrEmpty(this.OutputPath))
71 + else
72 {
82 - this.OutputPath = Path.ChangeExtension(this.InputPath, ".wxs");
83 - }
73 + if (String.IsNullOrEmpty(this.IntermediateFolder))
74 + {
75 + this.IntermediateFolder = Path.GetTempPath();
76 + }
77
85 - var extensionManager = this.ServiceProvider.GetService<IExtensionManager>();
86 - var creator = this.ServiceProvider.GetService<ISymbolDefinitionCreator>();
87 -
88 - var context = this.ServiceProvider.GetService<IWindowsInstallerDecompileContext>();
89 - context.Extensions = extensionManager.GetServices<IWindowsInstallerDecompilerExtension>();
90 - context.ExtensionData = extensionManager.GetServices<IExtensionData>();
91 - context.DecompilePath = this.InputPath;
92 - context.DecompileType = decompileType;
93 - context.IntermediateFolder = this.IntermediateFolder;
94 - context.SymbolDefinitionCreator = creator;
95 - context.OutputPath = this.OutputPath;
96 -
97 - context.ExtractFolder = this.ExportBasePath ?? this.IntermediateFolder;
98 - context.SuppressCustomTables = this.SuppressCustomTables;
99 - context.SuppressDroppingEmptyTables = this.SuppressDroppingEmptyTables;
100 - context.SuppressRelativeActionSequencing = this.SuppressRelativeActionSequencing;
101 - context.SuppressUI = this.SuppressUI;
102 -
103 - try
104 - {
105 - var decompiler = this.ServiceProvider.GetService<IWindowsInstallerDecompiler>();
106 - var result = decompiler.Decompile(context);
78 + if (String.IsNullOrEmpty(this.OutputPath))
79 + {
80 + this.OutputPath = Path.ChangeExtension(this.InputPath, ".wxs");
81 + }
82
108 - if (!this.Messaging.EncounteredError)
83 + var extensionManager = this.ServiceProvider.GetService<IExtensionManager>();
84 + var creator = this.ServiceProvider.GetService<ISymbolDefinitionCreator>();
85 +
86 + var context = this.ServiceProvider.GetService<IWindowsInstallerDecompileContext>();
87 + context.Extensions = extensionManager.GetServices<IWindowsInstallerDecompilerExtension>();
88 + context.ExtensionData = extensionManager.GetServices<IExtensionData>();
89 + context.DecompilePath = this.InputPath;
90 + context.DecompileType = decompileType;
91 + context.IntermediateFolder = this.IntermediateFolder;
92 + context.SymbolDefinitionCreator = creator;
93 + context.OutputPath = this.OutputPath;
94 +
95 + context.ExtractFolder = this.ExportBasePath ?? this.IntermediateFolder;
96 + context.SuppressCustomTables = this.SuppressCustomTables;
97 + context.SuppressDroppingEmptyTables = this.SuppressDroppingEmptyTables;
98 + context.SuppressRelativeActionSequencing = this.SuppressRelativeActionSequencing;
99 + context.SuppressUI = this.SuppressUI;
100 +
101 + try
102 {
110 - Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(context.OutputPath)));
111 - result.Document.Save(context.OutputPath, SaveOptions.OmitDuplicateNamespaces);
103 + var decompiler = this.ServiceProvider.GetService<IWindowsInstallerDecompiler>();
104 + var result = decompiler.Decompile(context);
105 +
106 + if (!this.Messaging.EncounteredError)
107 + {
108 + Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(context.OutputPath)));
109 + result.Document.Save(context.OutputPath, SaveOptions.OmitDuplicateNamespaces);
110 + }
111 + }
112 + catch (WixException e)
113 + {
114 + this.Messaging.Write(e.Error);
115 }
113 - }
114 - catch (WixException e)
115 - {
116 - this.Messaging.Write(e.Error);
116 }
117
118 return Task.FromResult(this.Messaging.LastErrorNumber);
@@ -132,7 +131,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
131
132 case "o":
133 case "out":
135 - this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument);
134 + this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file");
135 return true;
136
137 case "sct":
src/wix/WixToolset.Core.WindowsInstaller/CommandLine/InscribeSubcommand.cs
+15 -13
@@ -7,6 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core.WindowsInstaller.Inscribe;
10 + using WixToolset.Data;
11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
13
@@ -41,22 +42,23 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
42 {
43 if (String.IsNullOrEmpty(this.InputPath))
44 {
44 - Console.Error.WriteLine("Input MSI database is required");
45 - return Task.FromResult(-1);
45 + this.Messaging.Write(ErrorMessages.FilePathRequired("input MSI database"));
46 }
47 -
48 - if (String.IsNullOrEmpty(this.IntermediateFolder))
47 + else
48 {
50 - this.IntermediateFolder = Path.GetTempPath();
51 - }
49 + if (String.IsNullOrEmpty(this.IntermediateFolder))
50 + {
51 + this.IntermediateFolder = Path.GetTempPath();
52 + }
53
53 - if (String.IsNullOrEmpty(this.OutputPath))
54 - {
55 - this.OutputPath = this.InputPath;
56 - }
54 + if (String.IsNullOrEmpty(this.OutputPath))
55 + {
56 + this.OutputPath = this.InputPath;
57 + }
58
58 - var command = new InscribeMsiPackageCommand(this.ServiceProvider, this.InputPath, this.IntermediateFolder, this.OutputPath);
59 - command.Execute();
59 + var command = new InscribeMsiPackageCommand(this.ServiceProvider, this.InputPath, this.IntermediateFolder, this.OutputPath);
60 + command.Execute();
61 + }
62
63 return Task.FromResult(this.Messaging.LastErrorNumber);
64 }
@@ -74,7 +76,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
76
77 case "o":
78 case "out":
77 - this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument);
79 + this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file");
80 return true;
81 }
82 }
src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs
+25 -18
@@ -102,29 +102,28 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
102 {
103 if (String.IsNullOrEmpty(this.TargetPath))
104 {
105 - Console.Error.WriteLine("Input file required");
106 - return Task.FromResult(-1);
105 + this.Messaging.Write(ErrorMessages.FilePathRequired("input file"));
106 }
108 -
109 - if (String.IsNullOrEmpty(this.OutputPath))
107 + else if (String.IsNullOrEmpty(this.OutputPath))
108 {
111 - Console.Error.WriteLine("Output file required");
112 - return Task.FromResult(-1);
109 + this.Messaging.Write(ErrorMessages.FilePathRequired("output file"));
110 }
114 -
115 - if (String.IsNullOrEmpty(this.IntermediateFolder))
111 + else
112 {
117 - this.IntermediateFolder = Path.GetTempPath();
118 - }
113 + if (String.IsNullOrEmpty(this.IntermediateFolder))
114 + {
115 + this.IntermediateFolder = Path.GetTempPath();
116 + }
117
120 - var transform = this.LoadTransform();
118 + var transform = this.LoadTransform();
119
122 - if (!this.Messaging.EncounteredError)
123 - {
124 - this.SaveTransform(transform);
120 + if (!this.Messaging.EncounteredError)
121 + {
122 + this.SaveTransform(transform);
123 + }
124 }
125
127 - return Task.FromResult(this.Messaging.EncounteredError ? 1 : 0);
126 + return Task.FromResult(this.Messaging.LastErrorNumber);
127 }
128
129 public override bool TryParseArgument(ICommandLineParser parser, string argument)
@@ -144,7 +143,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
143
144 case "o":
145 case "out":
147 - this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument);
146 + this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file");
147 return true;
148
149 case "p":
@@ -158,6 +157,10 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
157 case "serr":
158 {
159 var serr = parser.GetNextArgumentOrError(argument);
160 + if (String.IsNullOrEmpty(serr))
161 + {
162 + return true;
163 + }
164
165 switch (serr.ToLowerInvariant())
166 {
@@ -186,7 +189,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
189 return true;
190
191 default:
189 - this.Messaging.Write(ErrorMessages.ExpectedArgument(serr));
192 + parser.ReportErrorArgument(argument, ErrorMessages.IllegalCommandLineArgumentValue(argument, serr, new[] { "a", "b", "c", "d", "e", "f" }));
193 return true;
194 }
195 }
@@ -194,6 +197,10 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
197 case "val":
198 {
199 var val = parser.GetNextArgumentOrError(argument);
200 + if (String.IsNullOrEmpty(val))
201 + {
202 + return true;
203 + }
204
205 switch (val.ToLowerInvariant())
206 {
@@ -254,7 +261,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
261 return true;
262
263 default:
257 - this.Messaging.Write(ErrorMessages.ExpectedArgument(val));
264 + parser.ReportErrorArgument(argument, ErrorMessages.IllegalCommandLineArgumentValue(argument, val, new[] { "language", "instance", "patch", "g", "l", "r", "s", "t", "u", "v", "w", "x", "y", "z" }));
265 return true;
266 }
267 }
src/wix/WixToolset.Core.WindowsInstaller/CommandLine/ValidateSubcommand.cs
+26 -33
@@ -8,6 +8,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
8 using System.Threading;
9 using System.Threading.Tasks;
10 using WixToolset.Core.WindowsInstaller.Validate;
11 + using WixToolset.Data;
12 using WixToolset.Data.WindowsInstaller;
13 using WixToolset.Extensibility.Data;
14 using WixToolset.Extensibility.Services;
@@ -54,11 +55,9 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
55
56 if (String.IsNullOrEmpty(this.DatabasePath))
57 {
57 - Console.Error.WriteLine("Input MSI or MSM database is required");
58 - return Task.FromResult(-1);
58 + this.Messaging.Write(ErrorMessages.FilePathRequired("input MSI or MSM database"));
59 }
60 -
61 - if (this.CubeFiles.Count == 0)
60 + else if (this.CubeFiles.Count == 0)
61 {
62 var ext = Path.GetExtension(this.DatabasePath);
63 switch (ext.ToLowerInvariant())
@@ -72,30 +71,33 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
71 break;
72
73 default:
75 - Console.Error.WriteLine("Unknown extension: {0}. Use the -cub switch to specify the path to the ICE CUBe file", ext);
76 - return Task.FromResult(-1);
74 + this.Messaging.Write(WindowsInstallerBackendErrors.UnknownValidationTargetFileExtension(ext));
75 + break;
76 }
77 }
78
80 - if (String.IsNullOrEmpty(this.WixpdbPath))
79 + if (!this.Messaging.EncounteredError)
80 {
82 - this.WixpdbPath = Path.ChangeExtension(this.DatabasePath, ".wixpdb");
83 - }
81 + if (String.IsNullOrEmpty(this.WixpdbPath))
82 + {
83 + this.WixpdbPath = Path.ChangeExtension(this.DatabasePath, ".wixpdb");
84 + }
85
85 - if (String.IsNullOrEmpty(this.IntermediateFolder))
86 - {
87 - this.IntermediateFolder = Path.GetTempPath();
88 - }
86 + if (String.IsNullOrEmpty(this.IntermediateFolder))
87 + {
88 + this.IntermediateFolder = Path.GetTempPath();
89 + }
90
90 - if (File.Exists(this.WixpdbPath))
91 - {
92 - data = WindowsInstallerData.Load(this.WixpdbPath);
93 - }
91 + if (File.Exists(this.WixpdbPath))
92 + {
93 + data = WindowsInstallerData.Load(this.WixpdbPath);
94 + }
95
95 - var command = new ValidateDatabaseCommand(this.Messaging, this.FileSystem, this.IntermediateFolder, this.DatabasePath, data, this.CubeFiles, this.Ices, this.SuppressIces);
96 - command.Execute();
96 + var command = new ValidateDatabaseCommand(this.Messaging, this.FileSystem, this.IntermediateFolder, this.DatabasePath, data, this.CubeFiles, this.Ices, this.SuppressIces);
97 + command.Execute();
98 + }
99
98 - return Task.FromResult(this.Messaging.EncounteredError ? 1 : 0);
100 + return Task.FromResult(this.Messaging.LastErrorNumber);
101 }
102
103 public override bool TryParseArgument(ICommandLineParser parser, string argument)
@@ -106,33 +108,24 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
108 switch (parameter.ToLowerInvariant())
109 {
110 case "cub":
109 - {
110 - var value = parser.GetNextArgumentOrError(argument);
111 - this.CubeFiles.Add(value);
111 + parser.GetNextArgumentOrError(argument, this.CubeFiles);
112 return true;
113 - }
113
114 case "ice":
116 - {
117 - var value = parser.GetNextArgumentOrError(argument);
118 - this.Ices.Add(value);
115 + parser.GetNextArgumentOrError(argument, this.Ices);
116 return true;
120 - }
117
118 case "intermediatefolder":
119 this.IntermediateFolder = parser.GetNextArgumentAsDirectoryOrError(argument);
120 return true;
121
122 case "pdb":
127 - this.WixpdbPath = parser.GetNextArgumentAsFilePathOrError(argument);
123 + this.WixpdbPath = parser.GetNextArgumentAsFilePathOrError(argument, "wixpdb path");
124 return true;
125
126 case "sice":
131 - {
132 - var value = parser.GetNextArgumentOrError(argument);
133 - this.SuppressIces.Add(value);
127 + parser.GetNextArgumentOrError(argument, this.SuppressIces);
128 return true;
135 - }
129 }
130 }
131 else if (String.IsNullOrEmpty(this.DatabasePath))
src/wix/WixToolset.Core.WindowsInstaller/CommandLine/WindowsInstallerCommand.cs
+6 -2
@@ -5,6 +5,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
5 using System;
6 using System.Threading;
7 using System.Threading.Tasks;
8 + using WixToolset.Data;
9 using WixToolset.Extensibility;
10 using WixToolset.Extensibility.Data;
11 using WixToolset.Extensibility.Services;
@@ -17,10 +18,13 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
18 public WindowsInstallerCommand(IServiceProvider serviceProvider)
19 {
20 this.ServiceProvider = serviceProvider;
21 + this.Messaging = this.ServiceProvider.GetService<IMessaging>();
22 }
23
24 private IServiceProvider ServiceProvider { get; }
25
26 + private IMessaging Messaging { get; }
27 +
28 private WindowsInstallerSubcommandBase Subcommand { get; set; }
29
30 public override CommandLineHelp GetCommandLineHelp()
@@ -41,8 +45,8 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
45 {
46 if (this.Subcommand is null)
47 {
44 - Console.Error.WriteLine("A subcommand is required for the \"msi\" command. Add -h to for help.");
45 - return Task.FromResult(1);
48 + this.Messaging.Write(ErrorMessages.CommandLineCommandRequired("msi"));
49 + return Task.FromResult(this.Messaging.LastErrorNumber);
50 }
51
52 return this.Subcommand.ExecuteAsync(cancellationToken);
src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs
+12
@@ -29,6 +29,16 @@ namespace WixToolset.Core.WindowsInstaller
29 return Message(originalLineNumber, Ids.InvalidModuleVersion, "The Module/@Version was not be able to be used as a four-part version. A valid four-part version has a max value of \"65535.65535.65535.65535\" and must be all numeric.", version);
30 }
31
32 + public static Message UnknownDecompileType(string decompileType, string filePath)
33 + {
34 + return Message(null, Ids.UnknownDecompileType, "Unknown decompile type '{0}' from input: {1}", decompileType, filePath);
35 + }
36 +
37 + public static Message UnknownValidationTargetFileExtension(string fileExtension)
38 + {
39 + return Message(null, Ids.UnknownValidationTargetFileExtension, "Unknown file extension: {0}. Use the -cub switch to specify the path to the ICE CUBe file", fileExtension);
40 + }
41 +
42 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
43 {
44 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
@@ -40,6 +50,8 @@ namespace WixToolset.Core.WindowsInstaller
50 InvalidModuleVersion = 7501,
51 ExceededMaximumAllowedComponentsInMsi = 7502,
52 ExceededMaximumAllowedFeatureDepthInMsi = 7503,
53 + UnknownDecompileType = 7504,
54 + UnknownValidationTargetFileExtension = 7505,
55 } // last available is 7999. 8000 is BurnBackendErrors.
56 }
57 }
src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
+22 -11
@@ -520,9 +520,13 @@ namespace WixToolset.Core.CommandLine
520 if (Enum.TryParse(value, true, out Platform platform))
521 {
522 this.Platform = platform;
523 - return true;
523 }
525 - break;
524 + else if (!String.IsNullOrEmpty(value))
525 + {
526 + parser.ReportErrorArgument(arg, ErrorMessages.IllegalCommandLineArgumentValue(arg, value, Enum.GetNames(typeof(Platform)).Select(s => s.ToLowerInvariant())));
527 + }
528 +
529 + return true;
530 }
531
532 case "bf":
@@ -536,9 +540,8 @@ namespace WixToolset.Core.CommandLine
540 if (value != null && this.TryParseBindPath(value, out var bindPath))
541 {
542 this.BindPaths.Add(bindPath);
539 - return true;
543 }
541 - return false;
544 + return true;
545 }
546
547 case "cc":
@@ -551,7 +554,7 @@ namespace WixToolset.Core.CommandLine
554 return true;
555
556 case "trackingfile":
554 - this.TrackingFile = parser.GetNextArgumentAsFilePathOrError(arg);
557 + this.TrackingFile = parser.GetNextArgumentAsFilePathOrError(arg, "tracking file");
558 return true;
559
560 case "d":
@@ -566,9 +569,13 @@ namespace WixToolset.Core.CommandLine
569 if (Enum.TryParse(value, true, out CompressionLevel compressionLevel))
570 {
571 this.DefaultCompressionLevel = compressionLevel;
569 - return true;
572 }
571 - return false;
573 + else if (!String.IsNullOrEmpty(value))
574 + {
575 + parser.ReportErrorArgument(arg, ErrorMessages.IllegalCommandLineArgumentValue(arg, value, Enum.GetNames(typeof(CompressionLevel)).Select(s => s.ToLowerInvariant())));
576 + }
577 +
578 + return true;
579 }
580
581 case "i":
@@ -594,7 +601,7 @@ namespace WixToolset.Core.CommandLine
601
602 case "o":
603 case "out":
597 - this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg);
604 + this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg, "output file");
605 return true;
606
607 case "outputtype":
@@ -602,7 +609,7 @@ namespace WixToolset.Core.CommandLine
609 return true;
610
611 case "pdb":
605 - this.PdbFile = parser.GetNextArgumentAsFilePathOrError(arg);
612 + this.PdbFile = parser.GetNextArgumentAsFilePathOrError(arg, "wixpdb file");
613 return true;
614
615 case "pdbtype":
@@ -611,9 +618,13 @@ namespace WixToolset.Core.CommandLine
618 if (Enum.TryParse(value, true, out PdbType pdbType))
619 {
620 this.PdbType = pdbType;
614 - return true;
621 }
616 - return false;
622 + else if (!String.IsNullOrEmpty(value))
623 + {
624 + parser.ReportErrorArgument(arg, ErrorMessages.IllegalCommandLineArgumentValue(arg, value, Enum.GetNames(typeof(PdbType)).Select(s => s.ToLowerInvariant())));
625 + }
626 +
627 + return true;
628 }
629
630 case "resetacls":
src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs
+8 -8
@@ -31,20 +31,20 @@ namespace WixToolset.Core.CommandLine
31 return !String.IsNullOrEmpty(arg) && '-' == arg[0];
32 }
33
34 - public string GetArgumentAsFilePathOrError(string argument, string fileType)
34 + public string GetArgumentAsFilePathOrError(string argument, string filePurpose)
35 {
36 if (!File.Exists(argument))
37 {
38 - this.Messaging.Write(ErrorMessages.FileNotFound(null, argument, fileType));
38 + this.Messaging.Write(ErrorMessages.FileNotFound(null, argument, filePurpose));
39 return null;
40 }
41
42 return argument;
43 }
44
45 - public bool GetArgumentAsFilePathOrError(string argument, string fileType, IList<string> paths)
45 + public bool GetArgumentAsFilePathOrError(string argument, string filePurpose, IList<string> paths)
46 {
47 - var files = this.GetFiles(argument, fileType);
47 + var files = this.GetFiles(argument, filePurpose);
48
49 foreach (var path in files)
50 {
@@ -100,9 +100,9 @@ namespace WixToolset.Core.CommandLine
100 return false;
101 }
102
103 - public string GetNextArgumentAsFilePathOrError(string commandLineSwitch)
103 + public string GetNextArgumentAsFilePathOrError(string commandLineSwitch, string filePurpose)
104 {
105 - if (this.TryGetNextNonSwitchArgumentOrError(out var arg) && this.TryGetFile(commandLineSwitch, arg, out var path))
105 + if (this.TryGetNextNonSwitchArgumentOrError(out var arg) && this.TryGetFile(commandLineSwitch, arg, filePurpose, out var path))
106 {
107 return path;
108 }
@@ -189,13 +189,13 @@ namespace WixToolset.Core.CommandLine
189 return directory != null;
190 }
191
192 - private bool TryGetFile(string commandlineSwitch, string arg, out string path)
192 + private bool TryGetFile(string commandlineSwitch, string arg, string purpose, out string path)
193 {
194 path = null;
195
196 if (String.IsNullOrEmpty(arg) || '-' == arg[0])
197 {
198 - this.Messaging.Write(ErrorMessages.FilePathRequired(commandlineSwitch));
198 + this.Messaging.Write(ErrorMessages.FilePathRequired(commandlineSwitch, purpose));
199 }
200 else if (Directory.Exists(arg))
201 {
src/wix/test/WixToolsetTest.CoreIntegration/CommandLineFixture.cs
+16 -1
@@ -22,7 +22,22 @@ namespace WixToolsetTest.CoreIntegration
22 WixAssert.CompareLineByLine(new[]
23 {
24 "-bindpath is expected to be followed by a value. See -? for additional detail.",
25 - "Additional argument '-bindpath' was unexpected. Remove the argument and add the '-?' switch for more information."
25 + }, result.Messages.Select(m => m.ToString()).ToArray());
26 + Assert.Equal(1, result.ExitCode);
27 + }
28 +
29 + [Fact]
30 + public void CannotBuildWithInvalidPlatform()
31 + {
32 + var result = WixRunner.Execute(new[]
33 + {
34 + "build",
35 + "-platform", "foo",
36 + });
37 +
38 + WixAssert.CompareLineByLine(new[]
39 + {
40 + "The argument -platform value 'foo' is invalid. Use one of the following values x86, x64, arm64"
41 }, result.Messages.Select(m => m.ToString()).ToArray());
42 Assert.Equal(1, result.ExitCode);
43 }
src/wix/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs
+2 -2
@@ -33,7 +33,7 @@ namespace WixToolsetTest.CoreIntegration
33 });
34
35 Assert.Equal(176, result.ExitCode);
36 - WixAssert.StringEqual("The InstallExecuteSequence table contains an action 'Action1' that is scheduled to come before or after action 'Action3', which is also scheduled to come before or after action 'Action1'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", result.Messages[0].ToString());
36 + WixAssert.StringEqual("The InstallExecuteSequence table contains an action 'Action1' that is scheduled to come before or after action 'Action3', which is also scheduled to come before or after action 'Action1'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", result.Messages[0].ToString());
37 }
38 }
39
@@ -60,7 +60,7 @@ namespace WixToolsetTest.CoreIntegration
60 });
61
62 Assert.Equal(176, result.ExitCode);
63 - WixAssert.StringEqual("The InstallExecuteSequence table contains an action 'Action2' that is scheduled to come before or after action 'Action4', which is also scheduled to come before or after action 'Action2'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", result.Messages[0].ToString());
63 + WixAssert.StringEqual("The InstallExecuteSequence table contains an action 'Action2' that is scheduled to come before or after action 'Action4', which is also scheduled to come before or after action 'Action2'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", result.Messages[0].ToString());
64 }
65 }
66
src/wix/test/WixToolsetTest.CoreIntegration/FeatureFixture.cs
+1 -1
@@ -37,7 +37,7 @@ namespace WixToolsetTest.CoreIntegration
37
38 WixAssert.CompareLineByLine(new[]
39 {
40 - "Found orphaned Component 'filit6MyH46zIGKsPPPXDZDfeNrfVY'. If this is a Package, every Component must have at least one parent Feature. To include a Component in a Module, you must include it directly as a Component element of the Module element or indirectly via ComponentRef, ComponentGroup, or ComponentGroupRef elements.",
40 + "Found orphaned Component 'filit6MyH46zIGKsPPPXDZDfeNrfVY'. If this is a Package, every Component must have at least one parent Feature. To include a Component in a Module, you must include it directly as a Component element of the Module element or indirectly via ComponentRef, ComponentGroup, or ComponentGroupRef elements.",
41 }, messages.ToArray());
42
43 Assert.Equal(267, result.ExitCode);
src/wix/test/WixToolsetTest.CoreIntegration/MsiFixture.cs
+1 -1
@@ -753,7 +753,7 @@ namespace WixToolsetTest.CoreIntegration
753 first =>
754 {
755 Assert.Equal(MessageLevel.Error, first.Level);
756 - WixAssert.StringEqual("Cannot find the table definitions for the 'TableDefinitionNotExposedByExtension' table. This is likely due to a typing error or missing extension. Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.", first.ToString());
756 + WixAssert.StringEqual("Cannot find the table definitions for the 'TableDefinitionNotExposedByExtension' table. This is likely due to a typing error or missing extension. Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.", first.ToString());
757 });
758
759 Assert.False(File.Exists(msiPath));