diff options
21 files changed, 432 insertions, 426 deletions
diff --git a/src/api/wix/WixToolset.Data/ErrorMessages.cs b/src/api/wix/WixToolset.Data/ErrorMessages.cs index 4826e7c9..bb0bdaab 100644 --- a/src/api/wix/WixToolset.Data/ErrorMessages.cs +++ b/src/api/wix/WixToolset.Data/ErrorMessages.cs | |||
@@ -10,12 +10,12 @@ namespace WixToolset.Data | |||
10 | { | 10 | { |
11 | public static Message ActionCircularDependency(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2) | 11 | public static Message ActionCircularDependency(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2) |
12 | { | 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 | } | 14 | } |
15 | 15 | ||
16 | public static Message ActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) | 16 | public static Message ActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) |
17 | { | 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 | } | 19 | } |
20 | 20 | ||
21 | public static Message ActionCollision2(SourceLineNumber sourceLineNumbers) | 21 | public static Message ActionCollision2(SourceLineNumber sourceLineNumbers) |
@@ -25,12 +25,12 @@ namespace WixToolset.Data | |||
25 | 25 | ||
26 | public static Message ActionScheduledRelativeToItself(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue) | 26 | public static Message ActionScheduledRelativeToItself(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue) |
27 | { | 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 | } | 29 | } |
30 | 30 | ||
31 | public static Message ActionScheduledRelativeToTerminationAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2) | 31 | public static Message ActionScheduledRelativeToTerminationAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2) |
32 | { | 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 | } | 34 | } |
35 | 35 | ||
36 | public static Message ActionScheduledRelativeToTerminationAction2(SourceLineNumber sourceLineNumbers) | 36 | public static Message ActionScheduledRelativeToTerminationAction2(SourceLineNumber sourceLineNumbers) |
@@ -40,7 +40,7 @@ namespace WixToolset.Data | |||
40 | 40 | ||
41 | public static Message AdditionalArgumentUnexpected(string argument) | 41 | public static Message AdditionalArgumentUnexpected(string argument) |
42 | { | 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 | } | 44 | } |
45 | 45 | ||
46 | public static Message AdminImageRequired(string productCode) | 46 | public static Message AdminImageRequired(string productCode) |
@@ -55,7 +55,7 @@ namespace WixToolset.Data | |||
55 | 55 | ||
56 | public static Message AppIdIncompatibleAdvertiseState(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string parentValue) | 56 | public static Message AppIdIncompatibleAdvertiseState(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string parentValue) |
57 | { | 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 | } | 59 | } |
60 | 60 | ||
61 | public static Message BaselineRequired() | 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); | 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 | } | 79 | } |
80 | 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 | |||
101 | public static Message CabExtractionFailed(string cabName, string directoryName) | 81 | public static Message CabExtractionFailed(string cabName, string directoryName) |
102 | { | 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); |
104 | } | 84 | } |
105 | 85 | ||
106 | public static Message CabExtractionFailed(string cabName, string mergeModulePath, string directoryName) | 86 | public static Message CabExtractionFailed(string cabName, string mergeModulePath, string directoryName) |
107 | { | 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); |
109 | } | 89 | } |
110 | 90 | ||
111 | public static Message CabFileDoesNotExist(string cabName, string mergeModulePath, string directoryName) | 91 | public static Message CabFileDoesNotExist(string cabName, string mergeModulePath, string directoryName) |
@@ -115,7 +95,7 @@ namespace WixToolset.Data | |||
115 | 95 | ||
116 | public static Message CannotAuthorSpecialProperties(SourceLineNumber sourceLineNumbers, string propertyName) | 96 | public static Message CannotAuthorSpecialProperties(SourceLineNumber sourceLineNumbers, string propertyName) |
117 | { | 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); |
119 | } | 99 | } |
120 | 100 | ||
121 | public static Message CannotDefaultComponentId(SourceLineNumber sourceLineNumbers) | 101 | public static Message CannotDefaultComponentId(SourceLineNumber sourceLineNumbers) |
@@ -125,7 +105,7 @@ namespace WixToolset.Data | |||
125 | 105 | ||
126 | public static Message CannotDefaultMismatchedAdvertiseStates(SourceLineNumber sourceLineNumbers) | 106 | public static Message CannotDefaultMismatchedAdvertiseStates(SourceLineNumber sourceLineNumbers) |
127 | { | 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."); |
129 | } | 109 | } |
130 | 110 | ||
131 | public static Message CannotFindFile(SourceLineNumber sourceLineNumbers, string fileId, string fileName, string filePath) | 111 | public static Message CannotFindFile(SourceLineNumber sourceLineNumbers, string fileId, string fileName, string filePath) |
@@ -138,16 +118,6 @@ namespace WixToolset.Data | |||
138 | 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); | 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); |
139 | } | 119 | } |
140 | 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 | |||
151 | public static Message CannotOpenMergeModule(SourceLineNumber sourceLineNumbers, string mergeModuleIdentifier, string mergeModuleFile) | 121 | public static Message CannotOpenMergeModule(SourceLineNumber sourceLineNumbers, string mergeModuleIdentifier, string mergeModuleFile) |
152 | { | 122 | { |
153 | return Message(sourceLineNumbers, Ids.CannotOpenMergeModule, "Cannot open the merge module '{0}' from file '{1}'.", mergeModuleIdentifier, mergeModuleFile); | 123 | return Message(sourceLineNumbers, Ids.CannotOpenMergeModule, "Cannot open the merge module '{0}' from file '{1}'.", mergeModuleIdentifier, mergeModuleFile); |
@@ -168,14 +138,24 @@ namespace WixToolset.Data | |||
168 | 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); | 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); |
169 | } | 139 | } |
170 | 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 | |||
171 | public static Message ComponentExpectedFeature(SourceLineNumber sourceLineNumbers, string component, string type, string target) | 151 | public static Message ComponentExpectedFeature(SourceLineNumber sourceLineNumbers, string component, string type, string target) |
172 | { | 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); |
174 | } | 154 | } |
175 | 155 | ||
176 | public static Message ComponentMultipleKeyPaths(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string fileElementName, string registryElementName, string odbcDataSourceElementName) | 156 | public static Message ComponentMultipleKeyPaths(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string fileElementName, string registryElementName, string odbcDataSourceElementName) |
177 | { | 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); |
179 | } | 159 | } |
180 | 160 | ||
181 | public static Message ComponentReferencedTwice(SourceLineNumber sourceLineNumbers, string crefChildId) | 161 | public static Message ComponentReferencedTwice(SourceLineNumber sourceLineNumbers, string crefChildId) |
@@ -185,7 +165,7 @@ namespace WixToolset.Data | |||
185 | 165 | ||
186 | public static Message ConditionExpected(SourceLineNumber sourceLineNumbers, string elementName) | 166 | public static Message ConditionExpected(SourceLineNumber sourceLineNumbers, string elementName) |
187 | { | 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); |
189 | } | 169 | } |
190 | 170 | ||
191 | public static Message CorruptFileFormat(string path, string format) | 171 | public static Message CorruptFileFormat(string path, string format) |
@@ -210,42 +190,37 @@ namespace WixToolset.Data | |||
210 | 190 | ||
211 | public static Message CubeFileNotFound(string cubeFile) | 191 | public static Message CubeFileNotFound(string cubeFile) |
212 | { | 192 | { |
213 | return Message(null, Ids.CubeFileNotFound, "The cube file '{0}' cannot be found. This file is required for MSI validation.", cubeFile); | 193 | 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); | ||
219 | } | 194 | } |
220 | 195 | ||
221 | public static Message CustomActionMultipleSources(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5) | 196 | public static Message CustomActionMultipleSources(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5) |
222 | { | 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); |
224 | } | 199 | } |
225 | 200 | ||
226 | public static Message CustomActionMultipleTargets(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5, string attributeName6, string attributeName7) | 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) |
227 | { | 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); |
229 | } | 204 | } |
230 | 205 | ||
231 | public static Message CustomActionSequencedInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) | 206 | public static Message CustomActionSequencedInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) |
232 | { | 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); |
234 | } | 209 | } |
235 | 210 | ||
236 | public static Message CustomTableIllegalColumnWidth(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value) | 211 | public static Message CustomTableIllegalColumnWidth(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value) |
237 | { | 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); |
239 | } | 214 | } |
240 | 215 | ||
241 | public static Message CustomTableMissingPrimaryKey(SourceLineNumber sourceLineNumbers) | 216 | public static Message CustomTableMissingPrimaryKey(SourceLineNumber sourceLineNumbers) |
242 | { | 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."); |
244 | } | 219 | } |
245 | 220 | ||
246 | public static Message CustomTableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 221 | public static Message CustomTableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
247 | { | 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); |
249 | } | 224 | } |
250 | 225 | ||
251 | public static Message DatabaseSchemaMismatch(SourceLineNumber sourceLineNumbers, string tableName) | 226 | public static Message DatabaseSchemaMismatch(SourceLineNumber sourceLineNumbers, string tableName) |
@@ -300,17 +275,17 @@ namespace WixToolset.Data | |||
300 | 275 | ||
301 | public static Message DuplicateExtensionPreprocessorType(string extension, string variablePrefix, string collidingExtension) | 276 | public static Message DuplicateExtensionPreprocessorType(string extension, string variablePrefix, string collidingExtension) |
302 | { | 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); |
304 | } | 279 | } |
305 | 280 | ||
306 | public static Message DuplicateExtensionTable(string extension, string tableName) | 281 | public static Message DuplicateExtensionTable(string extension, string tableName) |
307 | { | 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); |
309 | } | 284 | } |
310 | 285 | ||
311 | public static Message DuplicateExtensionXmlSchemaNamespace(string extension, string extensionXmlSchemaNamespace, string collidingExtension) | 286 | public static Message DuplicateExtensionXmlSchemaNamespace(string extension, string extensionXmlSchemaNamespace, string collidingExtension) |
312 | { | 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); |
314 | } | 289 | } |
315 | 290 | ||
316 | public static Message DuplicateFileId(string fileId) | 291 | public static Message DuplicateFileId(string fileId) |
@@ -320,22 +295,22 @@ namespace WixToolset.Data | |||
320 | 295 | ||
321 | public static Message DuplicateLocalizationIdentifier(SourceLineNumber sourceLineNumbers, string localizationId) | 296 | public static Message DuplicateLocalizationIdentifier(SourceLineNumber sourceLineNumbers, string localizationId) |
322 | { | 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); |
324 | } | 299 | } |
325 | 300 | ||
326 | public static Message DuplicateModuleCaseInsensitiveFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId1, string fileId2) | 301 | public static Message DuplicateModuleCaseInsensitiveFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId1, string fileId2) |
327 | { | 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); |
329 | } | 304 | } |
330 | 305 | ||
331 | public static Message DuplicateModuleFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId) | 306 | public static Message DuplicateModuleFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId) |
332 | { | 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); |
334 | } | 309 | } |
335 | 310 | ||
336 | public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName) | 311 | public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName) |
337 | { | 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); |
339 | } | 314 | } |
340 | 315 | ||
341 | public static Message DuplicateProviderDependencyKey(string providerKey, string packageId) | 316 | public static Message DuplicateProviderDependencyKey(string providerKey, string packageId) |
@@ -345,7 +320,7 @@ namespace WixToolset.Data | |||
345 | 320 | ||
346 | public static Message DuplicateSourcesForOutput(string sourceList, string outputFile) | 321 | public static Message DuplicateSourcesForOutput(string sourceList, string outputFile) |
347 | { | 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); |
349 | } | 324 | } |
350 | 325 | ||
351 | public static Message DuplicateSymbol(SourceLineNumber sourceLineNumbers, string symbolName) | 326 | public static Message DuplicateSymbol(SourceLineNumber sourceLineNumbers, string symbolName) |
@@ -375,7 +350,7 @@ namespace WixToolset.Data | |||
375 | 350 | ||
376 | public static Message ExampleGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 351 | public static Message ExampleGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
377 | { | 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); |
379 | } | 354 | } |
380 | 355 | ||
381 | public static Message ExpectedArgument(string argument) | 356 | public static Message ExpectedArgument(string argument) |
@@ -515,7 +490,7 @@ namespace WixToolset.Data | |||
515 | 490 | ||
516 | public static Message ExpectedBinaryCategory(SourceLineNumber sourceLineNumbers) | 491 | public static Message ExpectedBinaryCategory(SourceLineNumber sourceLineNumbers) |
517 | { | 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'."); |
519 | } | 494 | } |
520 | 495 | ||
521 | public static Message ExpectedClientPatchIdInWixMsp() | 496 | public static Message ExpectedClientPatchIdInWixMsp() |
@@ -585,7 +560,7 @@ namespace WixToolset.Data | |||
585 | 560 | ||
586 | public static Message ExpectedMediaCabinet(SourceLineNumber sourceLineNumbers, string fileId, int diskId) | 561 | public static Message ExpectedMediaCabinet(SourceLineNumber sourceLineNumbers, string fileId, int diskId) |
587 | { | 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); |
589 | } | 564 | } |
590 | 565 | ||
591 | public static Message ExpectedMediaRowsInWixMsp() | 566 | public static Message ExpectedMediaRowsInWixMsp() |
@@ -605,12 +580,12 @@ namespace WixToolset.Data | |||
605 | 580 | ||
606 | public static Message ExpectedRowInPatchCreationPackage(string tableName) | 581 | public static Message ExpectedRowInPatchCreationPackage(string tableName) |
607 | { | 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); |
609 | } | 584 | } |
610 | 585 | ||
611 | public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers) | 586 | public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers) |
612 | { | 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."); |
614 | } | 589 | } |
615 | 590 | ||
616 | public static Message ExpectedTableInMergeModule(string identifier) | 591 | public static Message ExpectedTableInMergeModule(string identifier) |
@@ -625,32 +600,32 @@ namespace WixToolset.Data | |||
625 | 600 | ||
626 | public static Message ExpectedWixVariableValue(string variableId) | 601 | public static Message ExpectedWixVariableValue(string variableId) |
627 | { | 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); |
629 | } | 604 | } |
630 | 605 | ||
631 | public static Message FamilyNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length) | 606 | public static Message FamilyNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length) |
632 | { | 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); |
634 | } | 609 | } |
635 | 610 | ||
636 | public static Message FeatureCannotFavorAndDisallowAdvertise(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue) | 611 | public static Message FeatureCannotFavorAndDisallowAdvertise(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue) |
637 | { | 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); |
639 | } | 614 | } |
640 | 615 | ||
641 | public static Message FeatureCannotFollowParentAndFavorLocalOrSource(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue) | 616 | public static Message FeatureCannotFollowParentAndFavorLocalOrSource(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue) |
642 | { | 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); |
644 | } | 619 | } |
645 | 620 | ||
646 | public static Message FeatureConfigurableDirectoryNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 621 | public static Message FeatureConfigurableDirectoryNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
647 | { | 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); |
649 | } | 624 | } |
650 | 625 | ||
651 | public static Message FeatureNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue) | 626 | public static Message FeatureNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue) |
652 | { | 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); |
654 | } | 629 | } |
655 | 630 | ||
656 | public static Message FileIdentifierNotFound(SourceLineNumber sourceLineNumbers, string fileIdentifier) | 631 | public static Message FileIdentifierNotFound(SourceLineNumber sourceLineNumbers, string fileIdentifier) |
@@ -681,12 +656,17 @@ namespace WixToolset.Data | |||
681 | 656 | ||
682 | public static Message FileOrDirectoryPathRequired(string parameter) | 657 | public static Message FileOrDirectoryPathRequired(string parameter) |
683 | { | 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); |
685 | } | 660 | } |
686 | 661 | ||
687 | public static Message FilePathRequired(string parameter) | 662 | public static Message FilePathRequired(string filePurpose) |
688 | { | 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); | ||
690 | } | 670 | } |
691 | 671 | ||
692 | public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName) | 672 | public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName) |
@@ -726,7 +706,7 @@ namespace WixToolset.Data | |||
726 | 706 | ||
727 | public static Message GuidContainsLowercaseLetters(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 707 | public static Message GuidContainsLowercaseLetters(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
728 | { | 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); |
730 | } | 710 | } |
731 | 711 | ||
732 | public static Message HarvestSourceNotSpecified() | 712 | public static Message HarvestSourceNotSpecified() |
@@ -751,7 +731,7 @@ namespace WixToolset.Data | |||
751 | 731 | ||
752 | public static Message IdentifierTooLongError(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int maxLength) | 732 | public static Message IdentifierTooLongError(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int maxLength) |
753 | { | 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); |
755 | } | 735 | } |
756 | 736 | ||
757 | public static Message IllegalAttributeExceptOnElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string expectedElementName) | 737 | public static Message IllegalAttributeExceptOnElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string expectedElementName) |
@@ -901,12 +881,13 @@ namespace WixToolset.Data | |||
901 | 881 | ||
902 | public static Message IllegalColumnName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 882 | public static Message IllegalColumnName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
903 | { | 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); |
905 | } | 885 | } |
906 | 886 | ||
907 | public static Message IllegalCommandlineArgumentCombination(string arg1, string arg2) | 887 | public static Message IllegalCommandLineArgumentValue(string arg, string value, IEnumerable<string> validValues) |
908 | { | 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); | ||
910 | } | 891 | } |
911 | 892 | ||
912 | public static Message IllegalComponentWithAutoGeneratedGuid(SourceLineNumber sourceLineNumbers) | 893 | public static Message IllegalComponentWithAutoGeneratedGuid(SourceLineNumber sourceLineNumbers) |
@@ -926,7 +907,7 @@ namespace WixToolset.Data | |||
926 | 907 | ||
927 | public static Message IllegalDefineStatement(SourceLineNumber sourceLineNumbers, string defineStatement) | 908 | public static Message IllegalDefineStatement(SourceLineNumber sourceLineNumbers, string defineStatement) |
928 | { | 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); |
930 | } | 911 | } |
931 | 912 | ||
932 | public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | 913 | public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) |
@@ -936,7 +917,7 @@ namespace WixToolset.Data | |||
936 | 917 | ||
937 | public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string defaultValue) | 918 | public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string defaultValue) |
938 | { | 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); |
940 | } | 921 | } |
941 | 922 | ||
942 | public static Message IllegalEnvironmentVariable(string environmentVariable, string value) | 923 | public static Message IllegalEnvironmentVariable(string environmentVariable, string value) |
@@ -946,7 +927,7 @@ namespace WixToolset.Data | |||
946 | 927 | ||
947 | public static Message IllegalFamilyName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 928 | public static Message IllegalFamilyName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
948 | { | 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); |
950 | } | 931 | } |
951 | 932 | ||
952 | public static Message IllegalFileCompressionAttributes(SourceLineNumber sourceLineNumbers) | 933 | public static Message IllegalFileCompressionAttributes(SourceLineNumber sourceLineNumbers) |
@@ -956,7 +937,7 @@ namespace WixToolset.Data | |||
956 | 937 | ||
957 | public static Message IllegalForeach(SourceLineNumber sourceLineNumbers, string foreachStatement) | 938 | public static Message IllegalForeach(SourceLineNumber sourceLineNumbers, string foreachStatement) |
958 | { | 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); |
960 | } | 941 | } |
961 | 942 | ||
962 | public static Message IllegalGeneratedGuidComponentUnversionedKeypath(SourceLineNumber sourceLineNumbers) | 943 | public static Message IllegalGeneratedGuidComponentUnversionedKeypath(SourceLineNumber sourceLineNumbers) |
@@ -1001,7 +982,7 @@ namespace WixToolset.Data | |||
1001 | 982 | ||
1002 | public static Message IllegalInlineLocVariable(SourceLineNumber sourceLineNumbers, string variableName, string variableValue) | 983 | public static Message IllegalInlineLocVariable(SourceLineNumber sourceLineNumbers, string variableName, string variableValue) |
1003 | { | 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); |
1005 | } | 986 | } |
1006 | 987 | ||
1007 | public static Message IllegalIntegerInExpression(SourceLineNumber sourceLineNumbers, string expression) | 988 | public static Message IllegalIntegerInExpression(SourceLineNumber sourceLineNumbers, string expression) |
@@ -1011,7 +992,7 @@ namespace WixToolset.Data | |||
1011 | 992 | ||
1012 | public static Message IllegalIntegerValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 993 | public static Message IllegalIntegerValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1013 | { | 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); |
1015 | } | 996 | } |
1016 | 997 | ||
1017 | public static Message IllegalLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 998 | public static Message IllegalLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
@@ -1026,7 +1007,7 @@ namespace WixToolset.Data | |||
1026 | 1007 | ||
1027 | public static Message IllegalLongValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1008 | public static Message IllegalLongValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1028 | { | 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); |
1030 | } | 1011 | } |
1031 | 1012 | ||
1032 | public static Message IllegalModuleExclusionLanguageAttributes(SourceLineNumber sourceLineNumbers) | 1013 | public static Message IllegalModuleExclusionLanguageAttributes(SourceLineNumber sourceLineNumbers) |
@@ -1041,7 +1022,7 @@ namespace WixToolset.Data | |||
1041 | 1022 | ||
1042 | public static Message IllegalPathForGeneratedComponentGuid(SourceLineNumber sourceLineNumbers, string componentName, string keyFilePath) | 1023 | public static Message IllegalPathForGeneratedComponentGuid(SourceLineNumber sourceLineNumbers, string componentName, string keyFilePath) |
1043 | { | 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); |
1045 | } | 1026 | } |
1046 | 1027 | ||
1047 | public static Message IllegalPropertyCustomActionAttributes(SourceLineNumber sourceLineNumbers) | 1028 | public static Message IllegalPropertyCustomActionAttributes(SourceLineNumber sourceLineNumbers) |
@@ -1051,12 +1032,12 @@ namespace WixToolset.Data | |||
1051 | 1032 | ||
1052 | public static Message IllegalRelativeLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1033 | public static Message IllegalRelativeLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1053 | { | 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); |
1055 | } | 1036 | } |
1056 | 1037 | ||
1057 | public static Message IllegalRootDirectory(SourceLineNumber sourceLineNumbers, string directoryId) | 1038 | public static Message IllegalRootDirectory(SourceLineNumber sourceLineNumbers, string directoryId) |
1058 | { | 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); |
1060 | } | 1041 | } |
1061 | 1042 | ||
1062 | public static Message IllegalSearchIdForParentDepth(SourceLineNumber sourceLineNumbers, string id, string parentId) | 1043 | public static Message IllegalSearchIdForParentDepth(SourceLineNumber sourceLineNumbers, string id, string parentId) |
@@ -1066,7 +1047,7 @@ namespace WixToolset.Data | |||
1066 | 1047 | ||
1067 | public static Message IllegalShortFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1048 | public static Message IllegalShortFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1068 | { | 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); |
1070 | } | 1051 | } |
1071 | 1052 | ||
1072 | public static Message IllegalSuppressWarningId(string suppressedId) | 1053 | public static Message IllegalSuppressWarningId(string suppressedId) |
@@ -1076,7 +1057,7 @@ namespace WixToolset.Data | |||
1076 | 1057 | ||
1077 | public static Message IllegalTargetDirDefaultDir(SourceLineNumber sourceLineNumbers, string defaultDir) | 1058 | public static Message IllegalTargetDirDefaultDir(SourceLineNumber sourceLineNumbers, string defaultDir) |
1078 | { | 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); |
1080 | } | 1061 | } |
1081 | 1062 | ||
1082 | public static Message IllegalTerminalServerCustomActionAttributes(SourceLineNumber sourceLineNumbers) | 1063 | public static Message IllegalTerminalServerCustomActionAttributes(SourceLineNumber sourceLineNumbers) |
@@ -1101,27 +1082,27 @@ namespace WixToolset.Data | |||
1101 | 1082 | ||
1102 | public static Message IllegalWixVariablePrefix(SourceLineNumber sourceLineNumbers, string variableId) | 1083 | public static Message IllegalWixVariablePrefix(SourceLineNumber sourceLineNumbers, string variableId) |
1103 | { | 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); |
1105 | } | 1086 | } |
1106 | 1087 | ||
1107 | public static Message IllegalYesNoAlwaysValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1088 | public static Message IllegalYesNoAlwaysValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1108 | { | 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); |
1110 | } | 1091 | } |
1111 | 1092 | ||
1112 | public static Message IllegalYesNoDefaultValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1093 | public static Message IllegalYesNoDefaultValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1113 | { | 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); |
1115 | } | 1096 | } |
1116 | 1097 | ||
1117 | public static Message IllegalYesNoValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1098 | public static Message IllegalYesNoValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1118 | { | 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); |
1120 | } | 1101 | } |
1121 | 1102 | ||
1122 | public static Message ImplicitComponentKeyPath(SourceLineNumber sourceLineNumbers, string componentId) | 1103 | public static Message ImplicitComponentKeyPath(SourceLineNumber sourceLineNumbers, string componentId) |
1123 | { | 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); |
1125 | } | 1106 | } |
1126 | 1107 | ||
1127 | public static Message InlineDirectorySyntaxRequiresPath(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string identifier) | 1108 | public static Message InlineDirectorySyntaxRequiresPath(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string identifier) |
@@ -1156,12 +1137,12 @@ namespace WixToolset.Data | |||
1156 | 1137 | ||
1157 | public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value, int minimum, int maximum) | 1138 | public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value, int minimum, int maximum) |
1158 | { | 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); |
1160 | } | 1141 | } |
1161 | 1142 | ||
1162 | public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, long value, long minimum, long maximum) | 1143 | public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, long value, long minimum, long maximum) |
1163 | { | 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); |
1165 | } | 1146 | } |
1166 | 1147 | ||
1167 | public static Message IntegralValueSentinelCollision(SourceLineNumber sourceLineNumbers, int value) | 1148 | public static Message IntegralValueSentinelCollision(SourceLineNumber sourceLineNumbers, int value) |
@@ -1181,7 +1162,7 @@ namespace WixToolset.Data | |||
1181 | 1162 | ||
1182 | public static Message InvalidAssemblyFile(SourceLineNumber sourceLineNumbers, string assemblyFile, string moreInformation) | 1163 | public static Message InvalidAssemblyFile(SourceLineNumber sourceLineNumbers, string assemblyFile, string moreInformation) |
1183 | { | 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); |
1185 | } | 1166 | } |
1186 | 1167 | ||
1187 | public static Message InvalidBundle(string bundleExecutable) | 1168 | public static Message InvalidBundle(string bundleExecutable) |
@@ -1191,7 +1172,7 @@ namespace WixToolset.Data | |||
1191 | 1172 | ||
1192 | public static Message InvalidCabinetTemplate(SourceLineNumber sourceLineNumbers, string cabinetTemplate) | 1173 | public static Message InvalidCabinetTemplate(SourceLineNumber sourceLineNumbers, string cabinetTemplate) |
1193 | { | 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); |
1195 | } | 1176 | } |
1196 | 1177 | ||
1197 | public static Message InvalidCommandLineFileName(string fileName, string error) | 1178 | public static Message InvalidCommandLineFileName(string fileName, string error) |
@@ -1211,7 +1192,7 @@ namespace WixToolset.Data | |||
1211 | 1192 | ||
1212 | public static Message InvalidDocumentElement(SourceLineNumber sourceLineNumbers, string elementName, string fileType, string expectedElementName) | 1193 | public static Message InvalidDocumentElement(SourceLineNumber sourceLineNumbers, string elementName, string fileType, string expectedElementName) |
1213 | { | 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); |
1215 | } | 1196 | } |
1216 | 1197 | ||
1217 | public static Message InvalidEmbeddedUIFileName(SourceLineNumber sourceLineNumbers, string codepage) | 1198 | public static Message InvalidEmbeddedUIFileName(SourceLineNumber sourceLineNumbers, string codepage) |
@@ -1236,12 +1217,12 @@ namespace WixToolset.Data | |||
1236 | 1217 | ||
1237 | public static Message InvalidExtension(string extension, string extensionType, string expectedType) | 1218 | public static Message InvalidExtension(string extension, string extensionType, string expectedType) |
1238 | { | 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); |
1240 | } | 1221 | } |
1241 | 1222 | ||
1242 | public static Message InvalidExtension(string extension, string extensionType, string expectedType1, string expectedType2) | 1223 | public static Message InvalidExtension(string extension, string extensionType, string expectedType1, string expectedType2) |
1243 | { | 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); |
1245 | } | 1226 | } |
1246 | 1227 | ||
1247 | public static Message InvalidExtensionType(string extension, string attributeType) | 1228 | public static Message InvalidExtensionType(string extension, string attributeType) |
@@ -1276,7 +1257,7 @@ namespace WixToolset.Data | |||
1276 | 1257 | ||
1277 | public static Message InvalidKeyColumn(string tableName, string columnName, string foreignTableName, int foreignColumnNumber) | 1258 | public static Message InvalidKeyColumn(string tableName, string columnName, string foreignTableName, int foreignColumnNumber) |
1278 | { | 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); |
1280 | } | 1261 | } |
1281 | 1262 | ||
1282 | public static Message InvalidKeypathChange(SourceLineNumber sourceLineNumbers, string component, string transformPath) | 1263 | public static Message InvalidKeypathChange(SourceLineNumber sourceLineNumbers, string component, string transformPath) |
@@ -1291,7 +1272,7 @@ namespace WixToolset.Data | |||
1291 | 1272 | ||
1292 | public static Message InvalidMergeLanguage(SourceLineNumber sourceLineNumbers, string mergeId, string mergeLanguage) | 1273 | public static Message InvalidMergeLanguage(SourceLineNumber sourceLineNumbers, string mergeId, string mergeLanguage) |
1293 | { | 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); |
1295 | } | 1276 | } |
1296 | 1277 | ||
1297 | public static Message InvalidFourPartVersion(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string version) | 1278 | public static Message InvalidFourPartVersion(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string version) |
@@ -1301,12 +1282,12 @@ namespace WixToolset.Data | |||
1301 | 1282 | ||
1302 | public static Message InvalidPlatformValue(SourceLineNumber sourceLineNumbers, string value) | 1283 | public static Message InvalidPlatformValue(SourceLineNumber sourceLineNumbers, string value) |
1303 | { | 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); |
1305 | } | 1286 | } |
1306 | 1287 | ||
1307 | public static Message InvalidPreprocessorFunction(SourceLineNumber sourceLineNumbers, string variable) | 1288 | public static Message InvalidPreprocessorFunction(SourceLineNumber sourceLineNumbers, string variable) |
1308 | { | 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); |
1310 | } | 1291 | } |
1311 | 1292 | ||
1312 | public static Message InvalidPreprocessorFunctionAutoVersion(SourceLineNumber sourceLineNumbers) | 1293 | public static Message InvalidPreprocessorFunctionAutoVersion(SourceLineNumber sourceLineNumbers) |
@@ -1321,7 +1302,7 @@ namespace WixToolset.Data | |||
1321 | 1302 | ||
1322 | public static Message InvalidPreprocessorVariable(SourceLineNumber sourceLineNumbers, string variable) | 1303 | public static Message InvalidPreprocessorVariable(SourceLineNumber sourceLineNumbers, string variable) |
1323 | { | 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); |
1325 | } | 1306 | } |
1326 | 1307 | ||
1327 | public static Message InvalidProductVersion(SourceLineNumber sourceLineNumbers, string version) | 1308 | public static Message InvalidProductVersion(SourceLineNumber sourceLineNumbers, string version) |
@@ -1366,7 +1347,7 @@ namespace WixToolset.Data | |||
1366 | 1347 | ||
1367 | public static Message InvalidVariableDefinition(string variableDefinition) | 1348 | public static Message InvalidVariableDefinition(string variableDefinition) |
1368 | { | 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); |
1370 | } | 1351 | } |
1371 | 1352 | ||
1372 | public static Message InvalidWixTransform(string fileName) | 1353 | public static Message InvalidWixTransform(string fileName) |
@@ -1376,12 +1357,12 @@ namespace WixToolset.Data | |||
1376 | 1357 | ||
1377 | public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string wixNamespace) | 1358 | public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string wixNamespace) |
1378 | { | 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); |
1380 | } | 1361 | } |
1381 | 1362 | ||
1382 | public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string elementNamespace, string wixNamespace) | 1363 | public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string elementNamespace, string wixNamespace) |
1383 | { | 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); |
1385 | } | 1366 | } |
1386 | 1367 | ||
1387 | public static Message InvalidXml(SourceLineNumber sourceLineNumbers, string fileType, string detail) | 1368 | public static Message InvalidXml(SourceLineNumber sourceLineNumbers, string fileType, string detail) |
@@ -1391,7 +1372,7 @@ namespace WixToolset.Data | |||
1391 | 1372 | ||
1392 | public static Message LocalizationVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId) | 1373 | public static Message LocalizationVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId) |
1393 | { | 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); |
1395 | } | 1376 | } |
1396 | 1377 | ||
1397 | public static Message MaximumCabinetSizeForLargeFileSplittingTooLarge(SourceLineNumber sourceLineNumbers, int maximumCabinetSizeForLargeFileSplitting, int maxValueOfMaxCabSizeForLargeFileSplitting) | 1378 | public static Message MaximumCabinetSizeForLargeFileSplittingTooLarge(SourceLineNumber sourceLineNumbers, int maximumCabinetSizeForLargeFileSplitting, int maxValueOfMaxCabSizeForLargeFileSplitting) |
@@ -1406,7 +1387,7 @@ namespace WixToolset.Data | |||
1406 | 1387 | ||
1407 | public static Message MediaEmbeddedCabinetNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length) | 1388 | public static Message MediaEmbeddedCabinetNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length) |
1408 | { | 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); |
1410 | } | 1391 | } |
1411 | 1392 | ||
1412 | public static Message MediaTableCollision(SourceLineNumber sourceLineNumbers) | 1393 | public static Message MediaTableCollision(SourceLineNumber sourceLineNumbers) |
@@ -1421,7 +1402,7 @@ namespace WixToolset.Data | |||
1421 | 1402 | ||
1422 | public static Message MergeFeatureRequired(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile, string mergeId) | 1403 | public static Message MergeFeatureRequired(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile, string mergeId) |
1423 | { | 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); |
1425 | } | 1406 | } |
1426 | 1407 | ||
1427 | public static Message MergeLanguageFailed(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile) | 1408 | public static Message MergeLanguageFailed(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile) |
@@ -1431,12 +1412,12 @@ namespace WixToolset.Data | |||
1431 | 1412 | ||
1432 | public static Message MergeLanguageUnsupported(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile) | 1413 | public static Message MergeLanguageUnsupported(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile) |
1433 | { | 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); |
1435 | } | 1416 | } |
1436 | 1417 | ||
1437 | public static Message MergeModuleExpectedFeature(SourceLineNumber sourceLineNumbers, string mergeId) | 1418 | public static Message MergeModuleExpectedFeature(SourceLineNumber sourceLineNumbers, string mergeId) |
1438 | { | 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); |
1440 | } | 1421 | } |
1441 | 1422 | ||
1442 | public static Message MergePlatformMismatch(SourceLineNumber sourceLineNumbers, string mergeModuleFile) | 1423 | public static Message MergePlatformMismatch(SourceLineNumber sourceLineNumbers, string mergeModuleFile) |
@@ -1491,7 +1472,7 @@ namespace WixToolset.Data | |||
1491 | 1472 | ||
1492 | public static Message MissingTableDefinition(string tableName) | 1473 | public static Message MissingTableDefinition(string tableName) |
1493 | { | 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); |
1495 | } | 1476 | } |
1496 | 1477 | ||
1497 | public static Message MissingTypeLibFile(SourceLineNumber sourceLineNumbers, string elementName, string fileElementName) | 1478 | public static Message MissingTypeLibFile(SourceLineNumber sourceLineNumbers, string elementName, string fileElementName) |
@@ -1526,7 +1507,7 @@ namespace WixToolset.Data | |||
1526 | 1507 | ||
1527 | public static Message MultipleEntrySections(SourceLineNumber sourceLineNumbers, string sectionName1, string sectionName2) | 1508 | public static Message MultipleEntrySections(SourceLineNumber sourceLineNumbers, string sectionName1, string sectionName2) |
1528 | { | 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); |
1530 | } | 1511 | } |
1531 | 1512 | ||
1532 | public static Message MultipleEntrySections2(SourceLineNumber sourceLineNumbers) | 1513 | public static Message MultipleEntrySections2(SourceLineNumber sourceLineNumbers) |
@@ -1536,12 +1517,12 @@ namespace WixToolset.Data | |||
1536 | 1517 | ||
1537 | public static Message MultipleFilesMatchedWithOutputSpecification(string sourceSpecification, string sourceList) | 1518 | public static Message MultipleFilesMatchedWithOutputSpecification(string sourceSpecification, string sourceList) |
1538 | { | 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); |
1540 | } | 1521 | } |
1541 | 1522 | ||
1542 | public static Message MultipleIdentifiersFound(SourceLineNumber sourceLineNumbers, string elementName, string identifier, string mismatchIdentifier) | 1523 | public static Message MultipleIdentifiersFound(SourceLineNumber sourceLineNumbers, string elementName, string identifier, string mismatchIdentifier) |
1543 | { | 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); |
1545 | } | 1526 | } |
1546 | 1527 | ||
1547 | public static Message MultiplePackagePayloads(SourceLineNumber sourceLineNumbers, string packageId, string packagePayloadId1, string packagePayloadId2) | 1528 | public static Message MultiplePackagePayloads(SourceLineNumber sourceLineNumbers, string packageId, string packagePayloadId1, string packagePayloadId2) |
@@ -1581,7 +1562,7 @@ namespace WixToolset.Data | |||
1581 | 1562 | ||
1582 | public static Message NoDataForColumn(SourceLineNumber sourceLineNumbers, string columnName, string tableName) | 1563 | public static Message NoDataForColumn(SourceLineNumber sourceLineNumbers, string columnName, string tableName) |
1583 | { | 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); |
1585 | } | 1566 | } |
1586 | 1567 | ||
1587 | public static Message NoDifferencesInTransform(SourceLineNumber sourceLineNumbers) | 1568 | public static Message NoDifferencesInTransform(SourceLineNumber sourceLineNumbers) |
@@ -1601,7 +1582,7 @@ namespace WixToolset.Data | |||
1601 | 1582 | ||
1602 | public static Message NoUniqueActionSequenceNumber(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2) | 1583 | public static Message NoUniqueActionSequenceNumber(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2) |
1603 | { | 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); |
1605 | } | 1586 | } |
1606 | 1587 | ||
1607 | public static Message NoUniqueActionSequenceNumber2(SourceLineNumber sourceLineNumbers) | 1588 | public static Message NoUniqueActionSequenceNumber2(SourceLineNumber sourceLineNumbers) |
@@ -1611,7 +1592,7 @@ namespace WixToolset.Data | |||
1611 | 1592 | ||
1612 | public static Message OpenDatabaseFailed(string databaseFile) | 1593 | public static Message OpenDatabaseFailed(string databaseFile) |
1613 | { | 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); |
1615 | } | 1596 | } |
1616 | 1597 | ||
1617 | public static Message OrderingReferenceLoopDetected(SourceLineNumber sourceLineNumbers, string loopList) | 1598 | public static Message OrderingReferenceLoopDetected(SourceLineNumber sourceLineNumbers, string loopList) |
@@ -1621,12 +1602,12 @@ namespace WixToolset.Data | |||
1621 | 1602 | ||
1622 | public static Message OrphanedComponent(SourceLineNumber sourceLineNumbers, string componentName) | 1603 | public static Message OrphanedComponent(SourceLineNumber sourceLineNumbers, string componentName) |
1623 | { | 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); |
1625 | } | 1606 | } |
1626 | 1607 | ||
1627 | public static Message OutputCodepageMismatch(SourceLineNumber sourceLineNumbers, int beforeCodepage, int afterCodepage) | 1608 | public static Message OutputCodepageMismatch(SourceLineNumber sourceLineNumbers, int beforeCodepage, int afterCodepage) |
1628 | { | 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); |
1630 | } | 1611 | } |
1631 | 1612 | ||
1632 | public static Message OutputCodepageMismatch2(SourceLineNumber sourceLineNumbers) | 1613 | public static Message OutputCodepageMismatch2(SourceLineNumber sourceLineNumbers) |
@@ -1641,12 +1622,12 @@ namespace WixToolset.Data | |||
1641 | 1622 | ||
1642 | public static Message OutputTypeMismatch(SourceLineNumber sourceLineNumbers, string beforeOutputType, string afterOutputType) | 1623 | public static Message OutputTypeMismatch(SourceLineNumber sourceLineNumbers, string beforeOutputType, string afterOutputType) |
1643 | { | 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); |
1645 | } | 1626 | } |
1646 | 1627 | ||
1647 | public static Message OverridableActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) | 1628 | public static Message OverridableActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) |
1648 | { | 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); |
1650 | } | 1631 | } |
1651 | 1632 | ||
1652 | public static Message OverridableActionCollision2(SourceLineNumber sourceLineNumbers) | 1633 | public static Message OverridableActionCollision2(SourceLineNumber sourceLineNumbers) |
@@ -1716,7 +1697,7 @@ namespace WixToolset.Data | |||
1716 | 1697 | ||
1717 | public static Message PreprocessorExtensionForParameterMissing(SourceLineNumber sourceLineNumbers, string parameterName, string parameterPrefix) | 1698 | public static Message PreprocessorExtensionForParameterMissing(SourceLineNumber sourceLineNumbers, string parameterName, string parameterPrefix) |
1718 | { | 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); |
1720 | } | 1701 | } |
1721 | 1702 | ||
1722 | public static Message PreprocessorExtensionGetVariableValueFailed(SourceLineNumber sourceLineNumbers, string prefix, string variable, string message) | 1703 | public static Message PreprocessorExtensionGetVariableValueFailed(SourceLineNumber sourceLineNumbers, string prefix, string variable, string message) |
@@ -1751,7 +1732,7 @@ namespace WixToolset.Data | |||
1751 | 1732 | ||
1752 | public static Message RadioButtonBitmapAndIconDisallowed(SourceLineNumber sourceLineNumbers) | 1733 | public static Message RadioButtonBitmapAndIconDisallowed(SourceLineNumber sourceLineNumbers) |
1753 | { | 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."); |
1755 | } | 1736 | } |
1756 | 1737 | ||
1757 | public static Message RadioButtonTypeInconsistent(SourceLineNumber sourceLineNumbers) | 1738 | public static Message RadioButtonTypeInconsistent(SourceLineNumber sourceLineNumbers) |
@@ -1766,7 +1747,7 @@ namespace WixToolset.Data | |||
1766 | 1747 | ||
1767 | public static Message RealTableMissingPrimaryKeyColumn(SourceLineNumber sourceLineNumbers, string tableName) | 1748 | public static Message RealTableMissingPrimaryKeyColumn(SourceLineNumber sourceLineNumbers, string tableName) |
1768 | { | 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); |
1770 | } | 1751 | } |
1771 | 1752 | ||
1772 | public static Message RecursiveAction(string action, string tableName) | 1753 | public static Message RecursiveAction(string action, string tableName) |
@@ -1781,17 +1762,17 @@ namespace WixToolset.Data | |||
1781 | 1762 | ||
1782 | public static Message RegistryMultipleValuesWithoutMultiString(SourceLineNumber sourceLineNumbers, string registryElementName, string valueAttributeName, string registryValueElementName, string typeAttributeName) | 1763 | public static Message RegistryMultipleValuesWithoutMultiString(SourceLineNumber sourceLineNumbers, string registryElementName, string valueAttributeName, string registryValueElementName, string typeAttributeName) |
1783 | { | 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); |
1785 | } | 1766 | } |
1786 | 1767 | ||
1787 | public static Message RegistryNameValueIncorrect(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1768 | public static Message RegistryNameValueIncorrect(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1788 | { | 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); |
1790 | } | 1771 | } |
1791 | 1772 | ||
1792 | public static Message RegistryRootInvalid(SourceLineNumber sourceLineNumbers) | 1773 | public static Message RegistryRootInvalid(SourceLineNumber sourceLineNumbers) |
1793 | { | 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."); |
1795 | } | 1776 | } |
1796 | 1777 | ||
1797 | public static Message RegistrySubElementCannotBeRemoved(SourceLineNumber sourceLineNumbers, string registryElementName, string registryValueElementName, string actionAttributeName, string removeValue, string removeKeyOnInstallValue) | 1778 | public static Message RegistrySubElementCannotBeRemoved(SourceLineNumber sourceLineNumbers, string registryElementName, string registryValueElementName, string actionAttributeName, string removeValue, string removeKeyOnInstallValue) |
@@ -1816,7 +1797,7 @@ namespace WixToolset.Data | |||
1816 | 1797 | ||
1817 | public static Message RootFeatureCannotFollowParent(SourceLineNumber sourceLineNumbers) | 1798 | public static Message RootFeatureCannotFollowParent(SourceLineNumber sourceLineNumbers) |
1818 | { | 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."); |
1820 | } | 1801 | } |
1821 | 1802 | ||
1822 | public static Message SameFileIdDifferentSource(SourceLineNumber sourceLineNumbers, string fileId, string sourcePath1, string sourcePath2) | 1803 | public static Message SameFileIdDifferentSource(SourceLineNumber sourceLineNumbers, string fileId, string sourcePath1, string sourcePath2) |
@@ -1846,17 +1827,17 @@ namespace WixToolset.Data | |||
1846 | 1827 | ||
1847 | public static Message SearchPropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1828 | public static Message SearchPropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1848 | { | 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); |
1850 | } | 1831 | } |
1851 | 1832 | ||
1852 | public static Message SecurePropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string propertyId) | 1833 | public static Message SecurePropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string propertyId) |
1853 | { | 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); |
1855 | } | 1836 | } |
1856 | 1837 | ||
1857 | public static Message SignedEmbeddedCabinet(SourceLineNumber sourceLineNumbers) | 1838 | public static Message SignedEmbeddedCabinet(SourceLineNumber sourceLineNumbers) |
1858 | { | 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'."); |
1860 | } | 1841 | } |
1861 | 1842 | ||
1862 | public static Message SingleExtensionSupported() | 1843 | public static Message SingleExtensionSupported() |
@@ -1864,21 +1845,6 @@ namespace WixToolset.Data | |||
1864 | return Message(null, Ids.SingleExtensionSupported, "Multiple extensions were specified on the command line, only a single extension is supported."); | 1845 | return Message(null, Ids.SingleExtensionSupported, "Multiple extensions were specified on the command line, only a single extension is supported."); |
1865 | } | 1846 | } |
1866 | 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 | |||
1882 | public static Message SpecifiedBinderNotFound(string binderClass) | 1848 | public static Message SpecifiedBinderNotFound(string binderClass) |
1883 | { | 1849 | { |
1884 | return Message(null, Ids.SpecifiedBinderNotFound, "The specified binder class '{0}' was not found in any extensions.", binderClass); | 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 | |||
1889 | return Message(null, Ids.SplitCabinetCopyRegistrationFailed, "Failed to register the copy command for cabinet '{0}' formed by splitting cabinet '{1}'.", newCabName, firstCabName); | 1855 | return Message(null, Ids.SplitCabinetCopyRegistrationFailed, "Failed to register the copy command for cabinet '{0}' formed by splitting cabinet '{1}'.", newCabName, firstCabName); |
1890 | } | 1856 | } |
1891 | 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 | |||
1897 | public static Message SplitCabinetNameCollision(string newCabName, string firstCabName) | 1858 | public static Message SplitCabinetNameCollision(string newCabName, string firstCabName) |
1898 | { | 1859 | { |
1899 | 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); | 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 | |||
1901 | 1862 | ||
1902 | public static Message StandardActionRelativelyScheduledInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) | 1863 | public static Message StandardActionRelativelyScheduledInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) |
1903 | { | 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); |
1905 | } | 1866 | } |
1906 | 1867 | ||
1907 | public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length, int maximumLength) | 1868 | public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length, int maximumLength) |
1908 | { | 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); |
1910 | } | 1871 | } |
1911 | 1872 | ||
1912 | public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string tableName, string streamName, int streamLength) | 1873 | public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string tableName, string streamName, int streamLength) |
1913 | { | 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); |
1915 | } | 1876 | } |
1916 | 1877 | ||
1917 | public static Message StubMissingWixburnSection(string filename) | 1878 | public static Message StubMissingWixburnSection(string filename) |
@@ -1926,7 +1887,7 @@ namespace WixToolset.Data | |||
1926 | 1887 | ||
1927 | public static Message SuppressNonoverridableAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) | 1888 | public static Message SuppressNonoverridableAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) |
1928 | { | 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); |
1930 | } | 1891 | } |
1931 | 1892 | ||
1932 | public static Message SuppressNonoverridableAction2(SourceLineNumber sourceLineNumbers) | 1893 | public static Message SuppressNonoverridableAction2(SourceLineNumber sourceLineNumbers) |
@@ -1946,7 +1907,7 @@ namespace WixToolset.Data | |||
1946 | 1907 | ||
1947 | public static Message TableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) | 1908 | public static Message TableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) |
1948 | { | 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); |
1950 | } | 1911 | } |
1951 | 1912 | ||
1952 | public static Message TooDeeplyIncluded(SourceLineNumber sourceLineNumbers, int depth) | 1913 | public static Message TooDeeplyIncluded(SourceLineNumber sourceLineNumbers, int depth) |
@@ -1956,17 +1917,17 @@ namespace WixToolset.Data | |||
1956 | 1917 | ||
1957 | public static Message TooManyChildren(SourceLineNumber sourceLineNumbers, string elementName, string childElementName) | 1918 | public static Message TooManyChildren(SourceLineNumber sourceLineNumbers, string elementName, string childElementName) |
1958 | { | 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); |
1960 | } | 1921 | } |
1961 | 1922 | ||
1962 | public static Message TooManyColumnsInRealTable(string tableName, int columnCount, int supportedColumnCount) | 1923 | public static Message TooManyColumnsInRealTable(string tableName, int columnCount, int supportedColumnCount) |
1963 | { | 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); |
1965 | } | 1926 | } |
1966 | 1927 | ||
1967 | public static Message TooManyElements(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, int expectedInstances) | 1928 | public static Message TooManyElements(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, int expectedInstances) |
1968 | { | 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); |
1970 | } | 1931 | } |
1971 | 1932 | ||
1972 | public static Message TooManySearchElements(SourceLineNumber sourceLineNumbers, string elementName) | 1933 | public static Message TooManySearchElements(SourceLineNumber sourceLineNumbers, string elementName) |
@@ -1981,17 +1942,17 @@ namespace WixToolset.Data | |||
1981 | 1942 | ||
1982 | public static Message TypeSpecificationForExtensionRequired(string parameter) | 1943 | public static Message TypeSpecificationForExtensionRequired(string parameter) |
1983 | { | 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); |
1985 | } | 1946 | } |
1986 | 1947 | ||
1987 | public static Message UnableToGetAuthenticodeCertOfFile(string filePath, string moreInformation) | 1948 | public static Message UnableToGetAuthenticodeCertOfFile(string filePath, string moreInformation) |
1988 | { | 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); |
1990 | } | 1951 | } |
1991 | 1952 | ||
1992 | public static Message UnableToGetAuthenticodeCertOfFileDownlevelOS(string filePath, string moreInformation) | 1953 | public static Message UnableToGetAuthenticodeCertOfFileDownlevelOS(string filePath, string moreInformation) |
1993 | { | 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); |
1995 | } | 1956 | } |
1996 | 1957 | ||
1997 | public static Message UnableToConvertFieldToNumber(string value) | 1958 | public static Message UnableToConvertFieldToNumber(string value) |
@@ -2121,27 +2082,27 @@ namespace WixToolset.Data | |||
2121 | 2082 | ||
2122 | public static Message UnexpectedTableInMergeModule(SourceLineNumber sourceLineNumbers, string tableName) | 2083 | public static Message UnexpectedTableInMergeModule(SourceLineNumber sourceLineNumbers, string tableName) |
2123 | { | 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); |
2125 | } | 2086 | } |
2126 | 2087 | ||
2127 | public static Message UnexpectedTableInPatch(SourceLineNumber sourceLineNumbers, string tableName) | 2088 | public static Message UnexpectedTableInPatch(SourceLineNumber sourceLineNumbers, string tableName) |
2128 | { | 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); |
2130 | } | 2091 | } |
2131 | 2092 | ||
2132 | public static Message UnexpectedTableInPatchCreationPackage(SourceLineNumber sourceLineNumbers, string tableName) | 2093 | public static Message UnexpectedTableInPatchCreationPackage(SourceLineNumber sourceLineNumbers, string tableName) |
2133 | { | 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); |
2135 | } | 2096 | } |
2136 | 2097 | ||
2137 | public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace) | 2098 | public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace) |
2138 | { | 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); |
2140 | } | 2101 | } |
2141 | 2102 | ||
2142 | public static Message UnhandledExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName, string extensionNamespace) | 2103 | public static Message UnhandledExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName, string extensionNamespace) |
2143 | { | 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); |
2145 | } | 2106 | } |
2146 | 2107 | ||
2147 | public static Message UniqueFileSearchIdRequired(SourceLineNumber sourceLineNumbers, string id, string elementName) | 2108 | public static Message UniqueFileSearchIdRequired(SourceLineNumber sourceLineNumbers, string id, string elementName) |
@@ -2191,12 +2152,12 @@ namespace WixToolset.Data | |||
2191 | 2152 | ||
2192 | public static Message UnsupportedExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName) | 2153 | public static Message UnsupportedExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName) |
2193 | { | 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); |
2195 | } | 2156 | } |
2196 | 2157 | ||
2197 | public static Message UnsupportedExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName) | 2158 | public static Message UnsupportedExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName) |
2198 | { | 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); |
2200 | } | 2161 | } |
2201 | 2162 | ||
2202 | public static Message UnsupportedPlatformForElement(SourceLineNumber sourceLineNumbers, string platform, string elementName) | 2163 | public static Message UnsupportedPlatformForElement(SourceLineNumber sourceLineNumbers, string platform, string elementName) |
@@ -2246,7 +2207,7 @@ namespace WixToolset.Data | |||
2246 | 2207 | ||
2247 | public static Message VersionIndependentProgIdsCannotHaveIcons(SourceLineNumber sourceLineNumbers) | 2208 | public static Message VersionIndependentProgIdsCannotHaveIcons(SourceLineNumber sourceLineNumbers) |
2248 | { | 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."); |
2250 | } | 2211 | } |
2251 | 2212 | ||
2252 | public static Message VersionMismatch(SourceLineNumber sourceLineNumbers, string fileType, string version, string expectedVersion) | 2213 | public static Message VersionMismatch(SourceLineNumber sourceLineNumbers, string fileType, string version, string expectedVersion) |
@@ -2271,17 +2232,12 @@ namespace WixToolset.Data | |||
2271 | 2232 | ||
2272 | public static Message WixVariableCollision(SourceLineNumber sourceLineNumbers, string variableId) | 2233 | public static Message WixVariableCollision(SourceLineNumber sourceLineNumbers, string variableId) |
2273 | { | 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); |
2275 | } | 2236 | } |
2276 | 2237 | ||
2277 | public static Message WixVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId) | 2238 | public static Message WixVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId) |
2278 | { | 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); | 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); |
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); | ||
2285 | } | 2241 | } |
2286 | 2242 | ||
2287 | public static Message NoSourceFiles() | 2243 | public static Message NoSourceFiles() |
@@ -2341,7 +2297,7 @@ namespace WixToolset.Data | |||
2341 | StreamNameTooLong = 13, | 2297 | StreamNameTooLong = 13, |
2342 | IllegalIdentifier = 14, | 2298 | IllegalIdentifier = 14, |
2343 | IllegalYesNoValue = 15, | 2299 | IllegalYesNoValue = 15, |
2344 | CabCreationFailed = 16, | 2300 | CommandLineCommandRequired = 16, |
2345 | CabExtractionFailed = 17, | 2301 | CabExtractionFailed = 17, |
2346 | AppIdIncompatibleAdvertiseState = 18, | 2302 | AppIdIncompatibleAdvertiseState = 18, |
2347 | IllegalAttributeWhenAdvertised = 19, | 2303 | IllegalAttributeWhenAdvertised = 19, |
@@ -2349,7 +2305,6 @@ namespace WixToolset.Data | |||
2349 | IllegalAttributeValue = 21, | 2305 | IllegalAttributeValue = 21, |
2350 | CustomActionMultipleSources = 22, | 2306 | CustomActionMultipleSources = 22, |
2351 | CustomActionMultipleTargets = 23, | 2307 | CustomActionMultipleTargets = 23, |
2352 | CustomActionIllegalInnerText = 24, | ||
2353 | IllegalShortFilename = 26, | 2308 | IllegalShortFilename = 26, |
2354 | IllegalLongFilename = 27, | 2309 | IllegalLongFilename = 27, |
2355 | TableNameTooLong = 28, | 2310 | TableNameTooLong = 28, |
@@ -2367,7 +2322,6 @@ namespace WixToolset.Data | |||
2367 | ExampleGuid = 40, | 2322 | ExampleGuid = 40, |
2368 | TooManyChildren = 41, | 2323 | TooManyChildren = 41, |
2369 | ComponentMultipleKeyPaths = 42, | 2324 | ComponentMultipleKeyPaths = 42, |
2370 | CabClosureFailed = 43, | ||
2371 | ExpectedAttributes = 44, | 2325 | ExpectedAttributes = 44, |
2372 | ExpectedAttributesWithOtherAttribute = 45, | 2326 | ExpectedAttributesWithOtherAttribute = 45, |
2373 | ExpectedAttributesWithoutOtherAttribute = 46, | 2327 | ExpectedAttributesWithoutOtherAttribute = 46, |
@@ -2586,7 +2540,7 @@ namespace WixToolset.Data | |||
2586 | InvalidPlatformValue = 265, | 2540 | InvalidPlatformValue = 265, |
2587 | IllegalValidationArguments = 266, | 2541 | IllegalValidationArguments = 266, |
2588 | OrphanedComponent = 267, | 2542 | OrphanedComponent = 267, |
2589 | IllegalCommandlineArgumentCombination = 268, | 2543 | IllegalCommandLineArgumentValue = 268, |
2590 | ProductCodeInvalidForTransform = 269, | 2544 | ProductCodeInvalidForTransform = 269, |
2591 | InsertInvalidSequenceActionOrder = 270, | 2545 | InsertInvalidSequenceActionOrder = 270, |
2592 | InsertSequenceNoSpace = 271, | 2546 | InsertSequenceNoSpace = 271, |
@@ -2641,8 +2595,6 @@ namespace WixToolset.Data | |||
2641 | BothUpgradeCodesRequired = 322, | 2595 | BothUpgradeCodesRequired = 322, |
2642 | IllegalBinderClassName = 323, | 2596 | IllegalBinderClassName = 323, |
2643 | SpecifiedBinderNotFound = 324, | 2597 | SpecifiedBinderNotFound = 324, |
2644 | CannotLoadBinderFileManager = 325, | ||
2645 | CannotLoadLinkerExtension = 326, | ||
2646 | UnableToGetAuthenticodeCertOfFile = 327, | 2598 | UnableToGetAuthenticodeCertOfFile = 327, |
2647 | UnableToGetAuthenticodeCertOfFileDownlevelOS = 328, | 2599 | UnableToGetAuthenticodeCertOfFileDownlevelOS = 328, |
2648 | ReadOnlyOutputFile = 329, | 2600 | ReadOnlyOutputFile = 329, |
@@ -2650,9 +2602,6 @@ namespace WixToolset.Data | |||
2650 | ParentElementAttributeRequired = 331, | 2602 | ParentElementAttributeRequired = 331, |
2651 | PreprocessorExtensionPragmaFailed = 333, | 2603 | PreprocessorExtensionPragmaFailed = 333, |
2652 | InvalidPreprocessorPragma = 334, | 2604 | InvalidPreprocessorPragma = 334, |
2653 | SmokeUnknownFileExtension = 335, | ||
2654 | SmokeUnsupportedFileExtension = 336, | ||
2655 | SmokeMalformedPath = 337, | ||
2656 | InvalidStubExe = 338, | 2605 | InvalidStubExe = 338, |
2657 | StubMissingWixburnSection = 339, | 2606 | StubMissingWixburnSection = 339, |
2658 | StubWixburnSectionTooSmall = 340, | 2607 | StubWixburnSectionTooSmall = 340, |
@@ -2671,7 +2620,6 @@ namespace WixToolset.Data | |||
2671 | MultipleFilesMatchedWithOutputSpecification = 353, | 2620 | MultipleFilesMatchedWithOutputSpecification = 353, |
2672 | InvalidBundle = 354, | 2621 | InvalidBundle = 354, |
2673 | BundleTooNew = 355, | 2622 | BundleTooNew = 355, |
2674 | WrongFileExtensionForNumberOfInputs = 356, | ||
2675 | MediaTableCollision = 357, | 2623 | MediaTableCollision = 357, |
2676 | InvalidCabinetTemplate = 358, | 2624 | InvalidCabinetTemplate = 358, |
2677 | MaximumUncompressedMediaSizeTooLarge = 359, | 2625 | MaximumUncompressedMediaSizeTooLarge = 359, |
@@ -2691,7 +2639,6 @@ namespace WixToolset.Data | |||
2691 | MaximumCabinetSizeForLargeFileSplittingTooLarge = 375, | 2639 | MaximumCabinetSizeForLargeFileSplittingTooLarge = 375, |
2692 | SplitCabinetCopyRegistrationFailed = 376, | 2640 | SplitCabinetCopyRegistrationFailed = 376, |
2693 | SplitCabinetNameCollision = 377, | 2641 | SplitCabinetNameCollision = 377, |
2694 | SplitCabinetInsertionFailed = 378, | ||
2695 | InvalidPreprocessorFunctionAutoVersion = 379, | 2642 | InvalidPreprocessorFunctionAutoVersion = 379, |
2696 | InvalidFourPartVersion = 380, | 2643 | InvalidFourPartVersion = 380, |
2697 | UnsupportedPlatformForElement = 381, | 2644 | UnsupportedPlatformForElement = 381, |
diff --git a/src/api/wix/WixToolset.Extensibility/Services/ICommandLineParser.cs b/src/api/wix/WixToolset.Extensibility/Services/ICommandLineParser.cs index efd6600d..ac9945c0 100644 --- a/src/api/wix/WixToolset.Extensibility/Services/ICommandLineParser.cs +++ b/src/api/wix/WixToolset.Extensibility/Services/ICommandLineParser.cs | |||
@@ -73,8 +73,9 @@ namespace WixToolset.Extensibility.Services | |||
73 | /// Gets the next argument as a file or displays an error. | 73 | /// Gets the next argument as a file or displays an error. |
74 | /// </summary> | 74 | /// </summary> |
75 | /// <param name="argument">Current argument used in the error message if necessary.</param> | 75 | /// <param name="argument">Current argument used in the error message if necessary.</param> |
76 | /// <param name="filePurpose">Purpose of the required file.</param> | ||
76 | /// <returns>The fully expanded path if the argument is a file path, otherwise null.</returns> | 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); |
78 | 79 | ||
79 | /// <summary> | 80 | /// <summary> |
80 | /// Adds the next argument as a file to the list or displays an error. | 81 | /// Adds the next argument as a file to the list or displays an error. |
diff --git a/src/tools/heat/HeatCommand.cs b/src/tools/heat/HeatCommand.cs index 6815acd6..d0c86401 100644 --- a/src/tools/heat/HeatCommand.cs +++ b/src/tools/heat/HeatCommand.cs | |||
@@ -75,7 +75,7 @@ namespace WixToolset.Harvesters | |||
75 | } | 75 | } |
76 | else if ("o" == parameter || "out" == parameter) | 76 | else if ("o" == parameter || "out" == parameter) |
77 | { | 77 | { |
78 | this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg); | 78 | this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg, "output source file"); |
79 | 79 | ||
80 | if (String.IsNullOrEmpty(this.OutputFile)) | 80 | if (String.IsNullOrEmpty(this.OutputFile)) |
81 | { | 81 | { |
diff --git a/src/wix/WixToolset.Core.Burn/CommandLine/BurnCommand.cs b/src/wix/WixToolset.Core.Burn/CommandLine/BurnCommand.cs index 886551e3..7129f867 100644 --- a/src/wix/WixToolset.Core.Burn/CommandLine/BurnCommand.cs +++ b/src/wix/WixToolset.Core.Burn/CommandLine/BurnCommand.cs | |||
@@ -5,6 +5,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
5 | using System; | 5 | using System; |
6 | using System.Threading; | 6 | using System.Threading; |
7 | using System.Threading.Tasks; | 7 | using System.Threading.Tasks; |
8 | using WixToolset.Data; | ||
8 | using WixToolset.Extensibility; | 9 | using WixToolset.Extensibility; |
9 | using WixToolset.Extensibility.Data; | 10 | using WixToolset.Extensibility.Data; |
10 | using WixToolset.Extensibility.Services; | 11 | using WixToolset.Extensibility.Services; |
@@ -17,10 +18,13 @@ namespace WixToolset.Core.Burn.CommandLine | |||
17 | public BurnCommand(IServiceProvider serviceProvider) | 18 | public BurnCommand(IServiceProvider serviceProvider) |
18 | { | 19 | { |
19 | this.ServiceProvider = serviceProvider; | 20 | this.ServiceProvider = serviceProvider; |
21 | this.Messaging = this.ServiceProvider.GetService<IMessaging>(); | ||
20 | } | 22 | } |
21 | 23 | ||
22 | private IServiceProvider ServiceProvider { get; } | 24 | private IServiceProvider ServiceProvider { get; } |
23 | 25 | ||
26 | private IMessaging Messaging { get; } | ||
27 | |||
24 | private BurnSubcommandBase Subcommand { get; set; } | 28 | private BurnSubcommandBase Subcommand { get; set; } |
25 | 29 | ||
26 | public override CommandLineHelp GetCommandLineHelp() | 30 | public override CommandLineHelp GetCommandLineHelp() |
@@ -41,8 +45,8 @@ namespace WixToolset.Core.Burn.CommandLine | |||
41 | { | 45 | { |
42 | if (this.Subcommand is null) | 46 | if (this.Subcommand is null) |
43 | { | 47 | { |
44 | Console.Error.WriteLine("A subcommand is required for the \"burn\" command. Add -h to for help."); | 48 | this.Messaging.Write(ErrorMessages.CommandLineCommandRequired("burn")); |
45 | return Task.FromResult(1); | 49 | return Task.FromResult(this.Messaging.LastErrorNumber); |
46 | } | 50 | } |
47 | 51 | ||
48 | return this.Subcommand.ExecuteAsync(cancellationToken); | 52 | return this.Subcommand.ExecuteAsync(cancellationToken); |
diff --git a/src/wix/WixToolset.Core.Burn/CommandLine/DetachSubcommand.cs b/src/wix/WixToolset.Core.Burn/CommandLine/DetachSubcommand.cs index e737af0b..30345cc2 100644 --- a/src/wix/WixToolset.Core.Burn/CommandLine/DetachSubcommand.cs +++ b/src/wix/WixToolset.Core.Burn/CommandLine/DetachSubcommand.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
7 | using System.Threading; | 7 | using System.Threading; |
8 | using System.Threading.Tasks; | 8 | using System.Threading.Tasks; |
9 | using WixToolset.Core.Burn.Inscribe; | 9 | using WixToolset.Core.Burn.Inscribe; |
10 | using WixToolset.Data; | ||
10 | using WixToolset.Extensibility.Data; | 11 | using WixToolset.Extensibility.Data; |
11 | using WixToolset.Extensibility.Services; | 12 | using WixToolset.Extensibility.Services; |
12 | 13 | ||
@@ -41,23 +42,22 @@ namespace WixToolset.Core.Burn.CommandLine | |||
41 | { | 42 | { |
42 | if (String.IsNullOrEmpty(this.InputPath)) | 43 | if (String.IsNullOrEmpty(this.InputPath)) |
43 | { | 44 | { |
44 | Console.Error.WriteLine("Path to input bundle is required"); | 45 | this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle")); |
45 | return Task.FromResult(-1); | ||
46 | } | 46 | } |
47 | 47 | else if (String.IsNullOrEmpty(this.EngineOutputPath)) | |
48 | if (String.IsNullOrEmpty(this.EngineOutputPath)) | ||
49 | { | 48 | { |
50 | Console.Error.WriteLine("Path to output the bundle engine is required"); | 49 | this.Messaging.Write(ErrorMessages.FilePathRequired("output the bundle engine")); |
51 | return Task.FromResult(-1); | ||
52 | } | 50 | } |
53 | 51 | else | |
54 | if (String.IsNullOrEmpty(this.IntermediateFolder)) | ||
55 | { | 52 | { |
56 | this.IntermediateFolder = Path.GetTempPath(); | 53 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
57 | } | 54 | { |
55 | this.IntermediateFolder = Path.GetTempPath(); | ||
56 | } | ||
58 | 57 | ||
59 | var command = new InscribeBundleEngineCommand(this.ServiceProvider, this.InputPath, this.EngineOutputPath, this.IntermediateFolder); | 58 | var command = new InscribeBundleEngineCommand(this.ServiceProvider, this.InputPath, this.EngineOutputPath, this.IntermediateFolder); |
60 | command.Execute(); | 59 | command.Execute(); |
60 | } | ||
61 | 61 | ||
62 | return Task.FromResult(this.Messaging.LastErrorNumber); | 62 | return Task.FromResult(this.Messaging.LastErrorNumber); |
63 | } | 63 | } |
@@ -74,7 +74,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
74 | return true; | 74 | return true; |
75 | 75 | ||
76 | case "engine": | 76 | case "engine": |
77 | this.EngineOutputPath = parser.GetNextArgumentAsFilePathOrError(argument); | 77 | this.EngineOutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output the bundle engine"); |
78 | return true; | 78 | return true; |
79 | } | 79 | } |
80 | } | 80 | } |
diff --git a/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs b/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs index 19aec14e..b4d71580 100644 --- a/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs +++ b/src/wix/WixToolset.Core.Burn/CommandLine/ExtractSubcommand.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
7 | using System.Threading; | 7 | using System.Threading; |
8 | using System.Threading.Tasks; | 8 | using System.Threading.Tasks; |
9 | using WixToolset.Core.Burn.Bundles; | 9 | using WixToolset.Core.Burn.Bundles; |
10 | using WixToolset.Data; | ||
10 | using WixToolset.Extensibility.Data; | 11 | using WixToolset.Extensibility.Data; |
11 | using WixToolset.Extensibility.Services; | 12 | using WixToolset.Extensibility.Services; |
12 | 13 | ||
@@ -41,34 +42,33 @@ namespace WixToolset.Core.Burn.CommandLine | |||
41 | { | 42 | { |
42 | if (String.IsNullOrEmpty(this.InputPath)) | 43 | if (String.IsNullOrEmpty(this.InputPath)) |
43 | { | 44 | { |
44 | Console.Error.WriteLine("Path to input bundle is required"); | 45 | this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle")); |
45 | return Task.FromResult(-1); | ||
46 | } | 46 | } |
47 | 47 | else if (String.IsNullOrEmpty(this.ExtractPath)) | |
48 | if (String.IsNullOrEmpty(this.ExtractPath)) | ||
49 | { | 48 | { |
50 | Console.Error.WriteLine("Path to output the extracted bundle is required"); | 49 | this.Messaging.Write(ErrorMessages.FilePathRequired("output the extracted bundle")); |
51 | return Task.FromResult(-1); | ||
52 | } | 50 | } |
53 | 51 | else | |
54 | if (String.IsNullOrEmpty(this.IntermediateFolder)) | ||
55 | { | 52 | { |
56 | this.IntermediateFolder = Path.GetTempPath(); | 53 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
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 | ||
66 | { | 54 | { |
67 | reader.ExtractAttachedContainers(this.ExtractPath, this.IntermediateFolder); | 55 | this.IntermediateFolder = Path.GetTempPath(); |
68 | } | 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)) | ||
70 | { | 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 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
diff --git a/src/wix/WixToolset.Core.Burn/CommandLine/ReattachSubcommand.cs b/src/wix/WixToolset.Core.Burn/CommandLine/ReattachSubcommand.cs index da6cd9b4..d02a98fc 100644 --- a/src/wix/WixToolset.Core.Burn/CommandLine/ReattachSubcommand.cs +++ b/src/wix/WixToolset.Core.Burn/CommandLine/ReattachSubcommand.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
7 | using System.Threading; | 7 | using System.Threading; |
8 | using System.Threading.Tasks; | 8 | using System.Threading.Tasks; |
9 | using WixToolset.Core.Burn.Inscribe; | 9 | using WixToolset.Core.Burn.Inscribe; |
10 | using WixToolset.Data; | ||
10 | using WixToolset.Extensibility.Data; | 11 | using WixToolset.Extensibility.Data; |
11 | using WixToolset.Extensibility.Services; | 12 | using WixToolset.Extensibility.Services; |
12 | 13 | ||
@@ -32,7 +33,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
32 | 33 | ||
33 | public override CommandLineHelp GetCommandLineHelp() | 34 | public override CommandLineHelp GetCommandLineHelp() |
34 | { | 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[] |
36 | { | 37 | { |
37 | new CommandLineHelpSwitch("-intermediateFolder", "Optional working folder. If not specified %TMP% will be used."), | 38 | new CommandLineHelpSwitch("-intermediateFolder", "Optional working folder. If not specified %TMP% will be used."), |
38 | new CommandLineHelpSwitch("-out", "-o", "Output bundle with signed engine attached."), | 39 | new CommandLineHelpSwitch("-out", "-o", "Output bundle with signed engine attached."), |
@@ -43,39 +44,39 @@ namespace WixToolset.Core.Burn.CommandLine | |||
43 | { | 44 | { |
44 | if (String.IsNullOrEmpty(this.InputPath)) | 45 | if (String.IsNullOrEmpty(this.InputPath)) |
45 | { | 46 | { |
46 | Console.Error.WriteLine("Path to input bundle is required"); | 47 | this.Messaging.Write(ErrorMessages.FilePathRequired("input bundle")); |
47 | return Task.FromResult(-1); | ||
48 | } | 48 | } |
49 | 49 | else if (String.IsNullOrEmpty(this.SignedEnginePath)) | |
50 | if (String.IsNullOrEmpty(this.SignedEnginePath)) | ||
51 | { | 50 | { |
52 | Console.Error.WriteLine("Path to detached signed bundle engine is required"); | 51 | this.Messaging.Write(ErrorMessages.FilePathRequired("detached signed bundle bundle")); |
53 | return Task.FromResult(-1); | ||
54 | } | 52 | } |
55 | 53 | else | |
56 | if (String.IsNullOrEmpty(this.IntermediateFolder)) | ||
57 | { | 54 | { |
58 | this.IntermediateFolder = Path.GetTempPath(); | 55 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
59 | } | 56 | { |
57 | this.IntermediateFolder = Path.GetTempPath(); | ||
58 | } | ||
60 | 59 | ||
61 | if (String.IsNullOrEmpty(this.OutputPath)) | 60 | if (String.IsNullOrEmpty(this.OutputPath)) |
62 | { | 61 | { |
63 | this.OutputPath = this.InputPath; | 62 | this.OutputPath = this.InputPath; |
64 | } | 63 | } |
65 | 64 | ||
66 | var command = new InscribeBundleCommand(this.ServiceProvider, this.InputPath, this.SignedEnginePath, this.OutputPath, this.IntermediateFolder); | 65 | var command = new InscribeBundleCommand(this.ServiceProvider, this.InputPath, this.SignedEnginePath, this.OutputPath, this.IntermediateFolder); |
67 | var didWork = command.Execute(); | 66 | var didWork = command.Execute(); |
68 | 67 | ||
69 | // If the detach subcommand did not encounter an error but did no work | 68 | // 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). | 69 | // then return the special exit code that indicates no work was done (-1000). |
71 | var exitCode = this.Messaging.LastErrorNumber; | 70 | var exitCode = this.Messaging.LastErrorNumber; |
72 | 71 | ||
73 | if (!didWork && exitCode == 0) | 72 | if (!didWork && exitCode == 0) |
74 | { | 73 | { |
75 | exitCode = -1000; | 74 | exitCode = -1000; |
75 | return Task.FromResult(exitCode); | ||
76 | } | ||
76 | } | 77 | } |
77 | 78 | ||
78 | return Task.FromResult(exitCode); | 79 | return Task.FromResult(this.Messaging.LastErrorNumber); |
79 | } | 80 | } |
80 | 81 | ||
81 | public override bool TryParseArgument(ICommandLineParser parser, string argument) | 82 | public override bool TryParseArgument(ICommandLineParser parser, string argument) |
@@ -86,7 +87,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
86 | switch (parameter.ToLowerInvariant()) | 87 | switch (parameter.ToLowerInvariant()) |
87 | { | 88 | { |
88 | case "engine": | 89 | case "engine": |
89 | this.SignedEnginePath = parser.GetNextArgumentAsFilePathOrError(argument); | 90 | this.SignedEnginePath = parser.GetNextArgumentAsFilePathOrError(argument, "detached signed bundle bundle"); |
90 | return true; | 91 | return true; |
91 | 92 | ||
92 | case "intermediatefolder": | 93 | case "intermediatefolder": |
@@ -95,7 +96,7 @@ namespace WixToolset.Core.Burn.CommandLine | |||
95 | 96 | ||
96 | case "o": | 97 | case "o": |
97 | case "out": | 98 | case "out": |
98 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument); | 99 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output bundle"); |
99 | return true; | 100 | return true; |
100 | } | 101 | } |
101 | } | 102 | } |
diff --git a/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs b/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs index ae98ccca..2d65e740 100644 --- a/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs +++ b/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs | |||
@@ -102,33 +102,34 @@ namespace WixToolset.Core.Burn.CommandLine | |||
102 | var inputPaths = this.ExpandInputPaths(); | 102 | var inputPaths = this.ExpandInputPaths(); |
103 | if (inputPaths.Count == 0) | 103 | if (inputPaths.Count == 0) |
104 | { | 104 | { |
105 | Console.Error.WriteLine("Path to a remote payload is required"); | 105 | this.Messaging.Write(ErrorMessages.FilePathRequired("a remote payload")); |
106 | return Task.FromResult(-1); | ||
107 | } | 106 | } |
108 | 107 | else | |
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)) | ||
114 | { | 108 | { |
115 | this.IntermediateFolder = Path.GetTempPath(); | 109 | // Reverse sort to ensure longest paths are matched first. |
116 | } | 110 | this.BasePaths.Sort(); |
111 | this.BasePaths.Reverse(); | ||
117 | 112 | ||
118 | var element = this.HarvestPackageElement(inputPaths); | 113 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
119 | |||
120 | if (!this.Messaging.EncounteredError) | ||
121 | { | ||
122 | if (!String.IsNullOrEmpty(this.OutputPath)) | ||
123 | { | 114 | { |
124 | var outputFolder = Path.GetDirectoryName(this.OutputPath); | 115 | this.IntermediateFolder = Path.GetTempPath(); |
125 | Directory.CreateDirectory(outputFolder); | ||
126 | |||
127 | File.WriteAllText(this.OutputPath, element.ToString()); | ||
128 | } | 116 | } |
129 | else | 117 | |
118 | var element = this.HarvestPackageElement(inputPaths); | ||
119 | |||
120 | if (!this.Messaging.EncounteredError) | ||
130 | { | 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 | } | ||
132 | } | 133 | } |
133 | } | 134 | } |
134 | 135 | ||
@@ -149,12 +150,16 @@ namespace WixToolset.Core.Burn.CommandLine | |||
149 | 150 | ||
150 | case "bundlepayloadgeneration": | 151 | case "bundlepayloadgeneration": |
151 | var bundlePayloadGenerationValue = parser.GetNextArgumentOrError(argument); | 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)) |
153 | { | 154 | { |
154 | this.BundlePayloadGeneration = bundlePayloadGeneration; | 155 | this.BundlePayloadGeneration = bundlePayloadGeneration; |
155 | return true; | ||
156 | } | 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; | ||
158 | 163 | ||
159 | case "du": | 164 | case "du": |
160 | case "downloadurl": | 165 | case "downloadurl": |
@@ -167,16 +172,20 @@ namespace WixToolset.Core.Burn.CommandLine | |||
167 | 172 | ||
168 | case "packagetype": | 173 | case "packagetype": |
169 | var packageTypeValue = parser.GetNextArgumentOrError(argument); | 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)) |
171 | { | 176 | { |
172 | this.PackageType = packageType; | 177 | this.PackageType = packageType; |
173 | return true; | ||
174 | } | 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; | ||
176 | 185 | ||
177 | case "o": | 186 | case "o": |
178 | case "out": | 187 | case "out": |
179 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument); | 188 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file"); |
180 | return true; | 189 | return true; |
181 | 190 | ||
182 | case "r": | 191 | case "r": |
diff --git a/src/wix/WixToolset.Core.ExtensionCache/ExtensionCacheManagerCommand.cs b/src/wix/WixToolset.Core.ExtensionCache/ExtensionCacheManagerCommand.cs index f7a93a6d..a1059e83 100644 --- a/src/wix/WixToolset.Core.ExtensionCache/ExtensionCacheManagerCommand.cs +++ b/src/wix/WixToolset.Core.ExtensionCache/ExtensionCacheManagerCommand.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Core.ExtensionCache | |||
7 | using System.Linq; | 7 | using System.Linq; |
8 | using System.Threading; | 8 | using System.Threading; |
9 | using System.Threading.Tasks; | 9 | using System.Threading.Tasks; |
10 | using WixToolset.Data; | ||
10 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility; |
11 | using WixToolset.Extensibility.Data; | 12 | using WixToolset.Extensibility.Data; |
12 | using WixToolset.Extensibility.Services; | 13 | using WixToolset.Extensibility.Services; |
@@ -62,8 +63,8 @@ namespace WixToolset.Core.ExtensionCache | |||
62 | { | 63 | { |
63 | if (!this.Subcommand.HasValue) | 64 | if (!this.Subcommand.HasValue) |
64 | { | 65 | { |
65 | Console.Error.WriteLine("A subcommand is required for the \"extension\" command. Use -h to for help."); | 66 | this.Messaging.Write(ErrorMessages.CommandLineCommandRequired("extension")); |
66 | return -1; | 67 | return this.Messaging.LastErrorNumber; |
67 | } | 68 | } |
68 | 69 | ||
69 | var success = false; | 70 | var success = false; |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/DecompilerSubcommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/DecompilerSubcommand.cs index 97da7a9e..b46df22a 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/DecompilerSubcommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/DecompilerSubcommand.cs | |||
@@ -62,58 +62,57 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
62 | { | 62 | { |
63 | if (String.IsNullOrEmpty(this.InputPath)) | 63 | if (String.IsNullOrEmpty(this.InputPath)) |
64 | { | 64 | { |
65 | Console.Error.WriteLine("Input MSI or MSM database is required"); | 65 | this.Messaging.Write(ErrorMessages.FilePathRequired("input MSI or MSM database")); |
66 | return Task.FromResult(-1); | ||
67 | } | 66 | } |
68 | 67 | else if (!this.TryCalculateDecompileType(out var decompileType)) | |
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)) | ||
76 | { | 68 | { |
77 | this.IntermediateFolder = Path.GetTempPath(); | 69 | this.Messaging.Write(WindowsInstallerBackendErrors.UnknownDecompileType(this.DecompileType, this.InputPath)); |
78 | } | 70 | } |
79 | 71 | else | |
80 | if (String.IsNullOrEmpty(this.OutputPath)) | ||
81 | { | 72 | { |
82 | this.OutputPath = Path.ChangeExtension(this.InputPath, ".wxs"); | 73 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
83 | } | 74 | { |
75 | this.IntermediateFolder = Path.GetTempPath(); | ||
76 | } | ||
84 | 77 | ||
85 | var extensionManager = this.ServiceProvider.GetService<IExtensionManager>(); | 78 | if (String.IsNullOrEmpty(this.OutputPath)) |
86 | var creator = this.ServiceProvider.GetService<ISymbolDefinitionCreator>(); | 79 | { |
87 | 80 | this.OutputPath = Path.ChangeExtension(this.InputPath, ".wxs"); | |
88 | var context = this.ServiceProvider.GetService<IWindowsInstallerDecompileContext>(); | 81 | } |
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); | ||
107 | 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 | ||
109 | { | 102 | { |
110 | Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(context.OutputPath))); | 103 | var decompiler = this.ServiceProvider.GetService<IWindowsInstallerDecompiler>(); |
111 | result.Document.Save(context.OutputPath, SaveOptions.OmitDuplicateNamespaces); | 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); | ||
112 | } | 115 | } |
113 | } | ||
114 | catch (WixException e) | ||
115 | { | ||
116 | this.Messaging.Write(e.Error); | ||
117 | } | 116 | } |
118 | 117 | ||
119 | return Task.FromResult(this.Messaging.LastErrorNumber); | 118 | return Task.FromResult(this.Messaging.LastErrorNumber); |
@@ -132,7 +131,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
132 | 131 | ||
133 | case "o": | 132 | case "o": |
134 | case "out": | 133 | case "out": |
135 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument); | 134 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file"); |
136 | return true; | 135 | return true; |
137 | 136 | ||
138 | case "sct": | 137 | case "sct": |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/InscribeSubcommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/InscribeSubcommand.cs index dd80b8e2..fbcd5b52 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/InscribeSubcommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/InscribeSubcommand.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
7 | using System.Threading; | 7 | using System.Threading; |
8 | using System.Threading.Tasks; | 8 | using System.Threading.Tasks; |
9 | using WixToolset.Core.WindowsInstaller.Inscribe; | 9 | using WixToolset.Core.WindowsInstaller.Inscribe; |
10 | using WixToolset.Data; | ||
10 | using WixToolset.Extensibility.Data; | 11 | using WixToolset.Extensibility.Data; |
11 | using WixToolset.Extensibility.Services; | 12 | using WixToolset.Extensibility.Services; |
12 | 13 | ||
@@ -41,22 +42,23 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
41 | { | 42 | { |
42 | if (String.IsNullOrEmpty(this.InputPath)) | 43 | if (String.IsNullOrEmpty(this.InputPath)) |
43 | { | 44 | { |
44 | Console.Error.WriteLine("Input MSI database is required"); | 45 | this.Messaging.Write(ErrorMessages.FilePathRequired("input MSI database")); |
45 | return Task.FromResult(-1); | ||
46 | } | 46 | } |
47 | 47 | else | |
48 | if (String.IsNullOrEmpty(this.IntermediateFolder)) | ||
49 | { | 48 | { |
50 | this.IntermediateFolder = Path.GetTempPath(); | 49 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
51 | } | 50 | { |
51 | this.IntermediateFolder = Path.GetTempPath(); | ||
52 | } | ||
52 | 53 | ||
53 | if (String.IsNullOrEmpty(this.OutputPath)) | 54 | if (String.IsNullOrEmpty(this.OutputPath)) |
54 | { | 55 | { |
55 | this.OutputPath = this.InputPath; | 56 | this.OutputPath = this.InputPath; |
56 | } | 57 | } |
57 | 58 | ||
58 | var command = new InscribeMsiPackageCommand(this.ServiceProvider, this.InputPath, this.IntermediateFolder, this.OutputPath); | 59 | var command = new InscribeMsiPackageCommand(this.ServiceProvider, this.InputPath, this.IntermediateFolder, this.OutputPath); |
59 | command.Execute(); | 60 | command.Execute(); |
61 | } | ||
60 | 62 | ||
61 | return Task.FromResult(this.Messaging.LastErrorNumber); | 63 | return Task.FromResult(this.Messaging.LastErrorNumber); |
62 | } | 64 | } |
@@ -74,7 +76,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
74 | 76 | ||
75 | case "o": | 77 | case "o": |
76 | case "out": | 78 | case "out": |
77 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument); | 79 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file"); |
78 | return true; | 80 | return true; |
79 | } | 81 | } |
80 | } | 82 | } |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs index 77f29723..727e20b2 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs | |||
@@ -102,29 +102,28 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
102 | { | 102 | { |
103 | if (String.IsNullOrEmpty(this.TargetPath)) | 103 | if (String.IsNullOrEmpty(this.TargetPath)) |
104 | { | 104 | { |
105 | Console.Error.WriteLine("Input file required"); | 105 | this.Messaging.Write(ErrorMessages.FilePathRequired("input file")); |
106 | return Task.FromResult(-1); | ||
107 | } | 106 | } |
108 | 107 | else if (String.IsNullOrEmpty(this.OutputPath)) | |
109 | if (String.IsNullOrEmpty(this.OutputPath)) | ||
110 | { | 108 | { |
111 | Console.Error.WriteLine("Output file required"); | 109 | this.Messaging.Write(ErrorMessages.FilePathRequired("output file")); |
112 | return Task.FromResult(-1); | ||
113 | } | 110 | } |
114 | 111 | else | |
115 | if (String.IsNullOrEmpty(this.IntermediateFolder)) | ||
116 | { | 112 | { |
117 | this.IntermediateFolder = Path.GetTempPath(); | 113 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
118 | } | 114 | { |
115 | this.IntermediateFolder = Path.GetTempPath(); | ||
116 | } | ||
119 | 117 | ||
120 | var transform = this.LoadTransform(); | 118 | var transform = this.LoadTransform(); |
121 | 119 | ||
122 | if (!this.Messaging.EncounteredError) | 120 | if (!this.Messaging.EncounteredError) |
123 | { | 121 | { |
124 | this.SaveTransform(transform); | 122 | this.SaveTransform(transform); |
123 | } | ||
125 | } | 124 | } |
126 | 125 | ||
127 | return Task.FromResult(this.Messaging.EncounteredError ? 1 : 0); | 126 | return Task.FromResult(this.Messaging.LastErrorNumber); |
128 | } | 127 | } |
129 | 128 | ||
130 | public override bool TryParseArgument(ICommandLineParser parser, string argument) | 129 | public override bool TryParseArgument(ICommandLineParser parser, string argument) |
@@ -144,7 +143,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
144 | 143 | ||
145 | case "o": | 144 | case "o": |
146 | case "out": | 145 | case "out": |
147 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument); | 146 | this.OutputPath = parser.GetNextArgumentAsFilePathOrError(argument, "output file"); |
148 | return true; | 147 | return true; |
149 | 148 | ||
150 | case "p": | 149 | case "p": |
@@ -158,6 +157,10 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
158 | case "serr": | 157 | case "serr": |
159 | { | 158 | { |
160 | var serr = parser.GetNextArgumentOrError(argument); | 159 | var serr = parser.GetNextArgumentOrError(argument); |
160 | if (String.IsNullOrEmpty(serr)) | ||
161 | { | ||
162 | return true; | ||
163 | } | ||
161 | 164 | ||
162 | switch (serr.ToLowerInvariant()) | 165 | switch (serr.ToLowerInvariant()) |
163 | { | 166 | { |
@@ -186,7 +189,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
186 | return true; | 189 | return true; |
187 | 190 | ||
188 | default: | 191 | default: |
189 | this.Messaging.Write(ErrorMessages.ExpectedArgument(serr)); | 192 | parser.ReportErrorArgument(argument, ErrorMessages.IllegalCommandLineArgumentValue(argument, serr, new[] { "a", "b", "c", "d", "e", "f" })); |
190 | return true; | 193 | return true; |
191 | } | 194 | } |
192 | } | 195 | } |
@@ -194,6 +197,10 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
194 | case "val": | 197 | case "val": |
195 | { | 198 | { |
196 | var val = parser.GetNextArgumentOrError(argument); | 199 | var val = parser.GetNextArgumentOrError(argument); |
200 | if (String.IsNullOrEmpty(val)) | ||
201 | { | ||
202 | return true; | ||
203 | } | ||
197 | 204 | ||
198 | switch (val.ToLowerInvariant()) | 205 | switch (val.ToLowerInvariant()) |
199 | { | 206 | { |
@@ -254,7 +261,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
254 | return true; | 261 | return true; |
255 | 262 | ||
256 | default: | 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" })); |
258 | return true; | 265 | return true; |
259 | } | 266 | } |
260 | } | 267 | } |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/ValidateSubcommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/ValidateSubcommand.cs index f00002e3..a3db003c 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/ValidateSubcommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/ValidateSubcommand.cs | |||
@@ -8,6 +8,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
8 | using System.Threading; | 8 | using System.Threading; |
9 | using System.Threading.Tasks; | 9 | using System.Threading.Tasks; |
10 | using WixToolset.Core.WindowsInstaller.Validate; | 10 | using WixToolset.Core.WindowsInstaller.Validate; |
11 | using WixToolset.Data; | ||
11 | using WixToolset.Data.WindowsInstaller; | 12 | using WixToolset.Data.WindowsInstaller; |
12 | using WixToolset.Extensibility.Data; | 13 | using WixToolset.Extensibility.Data; |
13 | using WixToolset.Extensibility.Services; | 14 | using WixToolset.Extensibility.Services; |
@@ -54,11 +55,9 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
54 | 55 | ||
55 | if (String.IsNullOrEmpty(this.DatabasePath)) | 56 | if (String.IsNullOrEmpty(this.DatabasePath)) |
56 | { | 57 | { |
57 | Console.Error.WriteLine("Input MSI or MSM database is required"); | 58 | this.Messaging.Write(ErrorMessages.FilePathRequired("input MSI or MSM database")); |
58 | return Task.FromResult(-1); | ||
59 | } | 59 | } |
60 | 60 | else if (this.CubeFiles.Count == 0) | |
61 | if (this.CubeFiles.Count == 0) | ||
62 | { | 61 | { |
63 | var ext = Path.GetExtension(this.DatabasePath); | 62 | var ext = Path.GetExtension(this.DatabasePath); |
64 | switch (ext.ToLowerInvariant()) | 63 | switch (ext.ToLowerInvariant()) |
@@ -72,30 +71,33 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
72 | break; | 71 | break; |
73 | 72 | ||
74 | default: | 73 | default: |
75 | Console.Error.WriteLine("Unknown extension: {0}. Use the -cub switch to specify the path to the ICE CUBe file", ext); | 74 | this.Messaging.Write(WindowsInstallerBackendErrors.UnknownValidationTargetFileExtension(ext)); |
76 | return Task.FromResult(-1); | 75 | break; |
77 | } | 76 | } |
78 | } | 77 | } |
79 | 78 | ||
80 | if (String.IsNullOrEmpty(this.WixpdbPath)) | 79 | if (!this.Messaging.EncounteredError) |
81 | { | 80 | { |
82 | this.WixpdbPath = Path.ChangeExtension(this.DatabasePath, ".wixpdb"); | 81 | if (String.IsNullOrEmpty(this.WixpdbPath)) |
83 | } | 82 | { |
83 | this.WixpdbPath = Path.ChangeExtension(this.DatabasePath, ".wixpdb"); | ||
84 | } | ||
84 | 85 | ||
85 | if (String.IsNullOrEmpty(this.IntermediateFolder)) | 86 | if (String.IsNullOrEmpty(this.IntermediateFolder)) |
86 | { | 87 | { |
87 | this.IntermediateFolder = Path.GetTempPath(); | 88 | this.IntermediateFolder = Path.GetTempPath(); |
88 | } | 89 | } |
89 | 90 | ||
90 | if (File.Exists(this.WixpdbPath)) | 91 | if (File.Exists(this.WixpdbPath)) |
91 | { | 92 | { |
92 | data = WindowsInstallerData.Load(this.WixpdbPath); | 93 | data = WindowsInstallerData.Load(this.WixpdbPath); |
93 | } | 94 | } |
94 | 95 | ||
95 | var command = new ValidateDatabaseCommand(this.Messaging, this.FileSystem, this.IntermediateFolder, this.DatabasePath, data, this.CubeFiles, this.Ices, this.SuppressIces); | 96 | var command = new ValidateDatabaseCommand(this.Messaging, this.FileSystem, this.IntermediateFolder, this.DatabasePath, data, this.CubeFiles, this.Ices, this.SuppressIces); |
96 | command.Execute(); | 97 | command.Execute(); |
98 | } | ||
97 | 99 | ||
98 | return Task.FromResult(this.Messaging.EncounteredError ? 1 : 0); | 100 | return Task.FromResult(this.Messaging.LastErrorNumber); |
99 | } | 101 | } |
100 | 102 | ||
101 | public override bool TryParseArgument(ICommandLineParser parser, string argument) | 103 | public override bool TryParseArgument(ICommandLineParser parser, string argument) |
@@ -106,33 +108,24 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
106 | switch (parameter.ToLowerInvariant()) | 108 | switch (parameter.ToLowerInvariant()) |
107 | { | 109 | { |
108 | case "cub": | 110 | case "cub": |
109 | { | 111 | parser.GetNextArgumentOrError(argument, this.CubeFiles); |
110 | var value = parser.GetNextArgumentOrError(argument); | ||
111 | this.CubeFiles.Add(value); | ||
112 | return true; | 112 | return true; |
113 | } | ||
114 | 113 | ||
115 | case "ice": | 114 | case "ice": |
116 | { | 115 | parser.GetNextArgumentOrError(argument, this.Ices); |
117 | var value = parser.GetNextArgumentOrError(argument); | ||
118 | this.Ices.Add(value); | ||
119 | return true; | 116 | return true; |
120 | } | ||
121 | 117 | ||
122 | case "intermediatefolder": | 118 | case "intermediatefolder": |
123 | this.IntermediateFolder = parser.GetNextArgumentAsDirectoryOrError(argument); | 119 | this.IntermediateFolder = parser.GetNextArgumentAsDirectoryOrError(argument); |
124 | return true; | 120 | return true; |
125 | 121 | ||
126 | case "pdb": | 122 | case "pdb": |
127 | this.WixpdbPath = parser.GetNextArgumentAsFilePathOrError(argument); | 123 | this.WixpdbPath = parser.GetNextArgumentAsFilePathOrError(argument, "wixpdb path"); |
128 | return true; | 124 | return true; |
129 | 125 | ||
130 | case "sice": | 126 | case "sice": |
131 | { | 127 | parser.GetNextArgumentOrError(argument, this.SuppressIces); |
132 | var value = parser.GetNextArgumentOrError(argument); | ||
133 | this.SuppressIces.Add(value); | ||
134 | return true; | 128 | return true; |
135 | } | ||
136 | } | 129 | } |
137 | } | 130 | } |
138 | else if (String.IsNullOrEmpty(this.DatabasePath)) | 131 | else if (String.IsNullOrEmpty(this.DatabasePath)) |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/WindowsInstallerCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/WindowsInstallerCommand.cs index 964aab71..d4c81a65 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/WindowsInstallerCommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/WindowsInstallerCommand.cs | |||
@@ -5,6 +5,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
5 | using System; | 5 | using System; |
6 | using System.Threading; | 6 | using System.Threading; |
7 | using System.Threading.Tasks; | 7 | using System.Threading.Tasks; |
8 | using WixToolset.Data; | ||
8 | using WixToolset.Extensibility; | 9 | using WixToolset.Extensibility; |
9 | using WixToolset.Extensibility.Data; | 10 | using WixToolset.Extensibility.Data; |
10 | using WixToolset.Extensibility.Services; | 11 | using WixToolset.Extensibility.Services; |
@@ -17,10 +18,13 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
17 | public WindowsInstallerCommand(IServiceProvider serviceProvider) | 18 | public WindowsInstallerCommand(IServiceProvider serviceProvider) |
18 | { | 19 | { |
19 | this.ServiceProvider = serviceProvider; | 20 | this.ServiceProvider = serviceProvider; |
21 | this.Messaging = this.ServiceProvider.GetService<IMessaging>(); | ||
20 | } | 22 | } |
21 | 23 | ||
22 | private IServiceProvider ServiceProvider { get; } | 24 | private IServiceProvider ServiceProvider { get; } |
23 | 25 | ||
26 | private IMessaging Messaging { get; } | ||
27 | |||
24 | private WindowsInstallerSubcommandBase Subcommand { get; set; } | 28 | private WindowsInstallerSubcommandBase Subcommand { get; set; } |
25 | 29 | ||
26 | public override CommandLineHelp GetCommandLineHelp() | 30 | public override CommandLineHelp GetCommandLineHelp() |
@@ -41,8 +45,8 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine | |||
41 | { | 45 | { |
42 | if (this.Subcommand is null) | 46 | if (this.Subcommand is null) |
43 | { | 47 | { |
44 | Console.Error.WriteLine("A subcommand is required for the \"msi\" command. Add -h to for help."); | 48 | this.Messaging.Write(ErrorMessages.CommandLineCommandRequired("msi")); |
45 | return Task.FromResult(1); | 49 | return Task.FromResult(this.Messaging.LastErrorNumber); |
46 | } | 50 | } |
47 | 51 | ||
48 | return this.Subcommand.ExecuteAsync(cancellationToken); | 52 | return this.Subcommand.ExecuteAsync(cancellationToken); |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs index 4f7cf5dc..ea867ea8 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs | |||
@@ -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); | 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 | } | 30 | } |
31 | 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 | |||
32 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | 42 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
33 | { | 43 | { |
34 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); | 44 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); |
@@ -40,6 +50,8 @@ namespace WixToolset.Core.WindowsInstaller | |||
40 | InvalidModuleVersion = 7501, | 50 | InvalidModuleVersion = 7501, |
41 | ExceededMaximumAllowedComponentsInMsi = 7502, | 51 | ExceededMaximumAllowedComponentsInMsi = 7502, |
42 | ExceededMaximumAllowedFeatureDepthInMsi = 7503, | 52 | ExceededMaximumAllowedFeatureDepthInMsi = 7503, |
53 | UnknownDecompileType = 7504, | ||
54 | UnknownValidationTargetFileExtension = 7505, | ||
43 | } // last available is 7999. 8000 is BurnBackendErrors. | 55 | } // last available is 7999. 8000 is BurnBackendErrors. |
44 | } | 56 | } |
45 | } | 57 | } |
diff --git a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs index 51101d01..dc4e0a6d 100644 --- a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs | |||
@@ -520,9 +520,13 @@ namespace WixToolset.Core.CommandLine | |||
520 | if (Enum.TryParse(value, true, out Platform platform)) | 520 | if (Enum.TryParse(value, true, out Platform platform)) |
521 | { | 521 | { |
522 | this.Platform = platform; | 522 | this.Platform = platform; |
523 | return true; | ||
524 | } | 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; | ||
526 | } | 530 | } |
527 | 531 | ||
528 | case "bf": | 532 | case "bf": |
@@ -536,9 +540,8 @@ namespace WixToolset.Core.CommandLine | |||
536 | if (value != null && this.TryParseBindPath(value, out var bindPath)) | 540 | if (value != null && this.TryParseBindPath(value, out var bindPath)) |
537 | { | 541 | { |
538 | this.BindPaths.Add(bindPath); | 542 | this.BindPaths.Add(bindPath); |
539 | return true; | ||
540 | } | 543 | } |
541 | return false; | 544 | return true; |
542 | } | 545 | } |
543 | 546 | ||
544 | case "cc": | 547 | case "cc": |
@@ -551,7 +554,7 @@ namespace WixToolset.Core.CommandLine | |||
551 | return true; | 554 | return true; |
552 | 555 | ||
553 | case "trackingfile": | 556 | case "trackingfile": |
554 | this.TrackingFile = parser.GetNextArgumentAsFilePathOrError(arg); | 557 | this.TrackingFile = parser.GetNextArgumentAsFilePathOrError(arg, "tracking file"); |
555 | return true; | 558 | return true; |
556 | 559 | ||
557 | case "d": | 560 | case "d": |
@@ -566,9 +569,13 @@ namespace WixToolset.Core.CommandLine | |||
566 | if (Enum.TryParse(value, true, out CompressionLevel compressionLevel)) | 569 | if (Enum.TryParse(value, true, out CompressionLevel compressionLevel)) |
567 | { | 570 | { |
568 | this.DefaultCompressionLevel = compressionLevel; | 571 | this.DefaultCompressionLevel = compressionLevel; |
569 | return true; | ||
570 | } | 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; | ||
572 | } | 579 | } |
573 | 580 | ||
574 | case "i": | 581 | case "i": |
@@ -594,7 +601,7 @@ namespace WixToolset.Core.CommandLine | |||
594 | 601 | ||
595 | case "o": | 602 | case "o": |
596 | case "out": | 603 | case "out": |
597 | this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg); | 604 | this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg, "output file"); |
598 | return true; | 605 | return true; |
599 | 606 | ||
600 | case "outputtype": | 607 | case "outputtype": |
@@ -602,7 +609,7 @@ namespace WixToolset.Core.CommandLine | |||
602 | return true; | 609 | return true; |
603 | 610 | ||
604 | case "pdb": | 611 | case "pdb": |
605 | this.PdbFile = parser.GetNextArgumentAsFilePathOrError(arg); | 612 | this.PdbFile = parser.GetNextArgumentAsFilePathOrError(arg, "wixpdb file"); |
606 | return true; | 613 | return true; |
607 | 614 | ||
608 | case "pdbtype": | 615 | case "pdbtype": |
@@ -611,9 +618,13 @@ namespace WixToolset.Core.CommandLine | |||
611 | if (Enum.TryParse(value, true, out PdbType pdbType)) | 618 | if (Enum.TryParse(value, true, out PdbType pdbType)) |
612 | { | 619 | { |
613 | this.PdbType = pdbType; | 620 | this.PdbType = pdbType; |
614 | return true; | ||
615 | } | 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; | ||
617 | } | 628 | } |
618 | 629 | ||
619 | case "resetacls": | 630 | case "resetacls": |
diff --git a/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs b/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs index 52350929..ed0936a8 100644 --- a/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs +++ b/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs | |||
@@ -31,20 +31,20 @@ namespace WixToolset.Core.CommandLine | |||
31 | return !String.IsNullOrEmpty(arg) && '-' == arg[0]; | 31 | return !String.IsNullOrEmpty(arg) && '-' == arg[0]; |
32 | } | 32 | } |
33 | 33 | ||
34 | public string GetArgumentAsFilePathOrError(string argument, string fileType) | 34 | public string GetArgumentAsFilePathOrError(string argument, string filePurpose) |
35 | { | 35 | { |
36 | if (!File.Exists(argument)) | 36 | if (!File.Exists(argument)) |
37 | { | 37 | { |
38 | this.Messaging.Write(ErrorMessages.FileNotFound(null, argument, fileType)); | 38 | this.Messaging.Write(ErrorMessages.FileNotFound(null, argument, filePurpose)); |
39 | return null; | 39 | return null; |
40 | } | 40 | } |
41 | 41 | ||
42 | return argument; | 42 | return argument; |
43 | } | 43 | } |
44 | 44 | ||
45 | public bool GetArgumentAsFilePathOrError(string argument, string fileType, IList<string> paths) | 45 | public bool GetArgumentAsFilePathOrError(string argument, string filePurpose, IList<string> paths) |
46 | { | 46 | { |
47 | var files = this.GetFiles(argument, fileType); | 47 | var files = this.GetFiles(argument, filePurpose); |
48 | 48 | ||
49 | foreach (var path in files) | 49 | foreach (var path in files) |
50 | { | 50 | { |
@@ -100,9 +100,9 @@ namespace WixToolset.Core.CommandLine | |||
100 | return false; | 100 | return false; |
101 | } | 101 | } |
102 | 102 | ||
103 | public string GetNextArgumentAsFilePathOrError(string commandLineSwitch) | 103 | public string GetNextArgumentAsFilePathOrError(string commandLineSwitch, string filePurpose) |
104 | { | 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 | { | 106 | { |
107 | return path; | 107 | return path; |
108 | } | 108 | } |
@@ -189,13 +189,13 @@ namespace WixToolset.Core.CommandLine | |||
189 | return directory != null; | 189 | return directory != null; |
190 | } | 190 | } |
191 | 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 | { | 193 | { |
194 | path = null; | 194 | path = null; |
195 | 195 | ||
196 | if (String.IsNullOrEmpty(arg) || '-' == arg[0]) | 196 | if (String.IsNullOrEmpty(arg) || '-' == arg[0]) |
197 | { | 197 | { |
198 | this.Messaging.Write(ErrorMessages.FilePathRequired(commandlineSwitch)); | 198 | this.Messaging.Write(ErrorMessages.FilePathRequired(commandlineSwitch, purpose)); |
199 | } | 199 | } |
200 | else if (Directory.Exists(arg)) | 200 | else if (Directory.Exists(arg)) |
201 | { | 201 | { |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/CommandLineFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/CommandLineFixture.cs index c1c98252..0d0b7208 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/CommandLineFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/CommandLineFixture.cs | |||
@@ -22,7 +22,22 @@ namespace WixToolsetTest.CoreIntegration | |||
22 | WixAssert.CompareLineByLine(new[] | 22 | WixAssert.CompareLineByLine(new[] |
23 | { | 23 | { |
24 | "-bindpath is expected to be followed by a value. See -? for additional detail.", | 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" | ||
26 | }, result.Messages.Select(m => m.ToString()).ToArray()); | 41 | }, result.Messages.Select(m => m.ToString()).ToArray()); |
27 | Assert.Equal(1, result.ExitCode); | 42 | Assert.Equal(1, result.ExitCode); |
28 | } | 43 | } |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs index ef12a91e..2ad6bac2 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/CustomActionFixture.cs | |||
@@ -33,7 +33,7 @@ namespace WixToolsetTest.CoreIntegration | |||
33 | }); | 33 | }); |
34 | 34 | ||
35 | Assert.Equal(176, result.ExitCode); | 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 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
@@ -60,7 +60,7 @@ namespace WixToolsetTest.CoreIntegration | |||
60 | }); | 60 | }); |
61 | 61 | ||
62 | Assert.Equal(176, result.ExitCode); | 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 | } | 64 | } |
65 | } | 65 | } |
66 | 66 | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/FeatureFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/FeatureFixture.cs index 8beb4d8d..2e371794 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/FeatureFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/FeatureFixture.cs | |||
@@ -37,7 +37,7 @@ namespace WixToolsetTest.CoreIntegration | |||
37 | 37 | ||
38 | WixAssert.CompareLineByLine(new[] | 38 | WixAssert.CompareLineByLine(new[] |
39 | { | 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()); | 41 | }, messages.ToArray()); |
42 | 42 | ||
43 | Assert.Equal(267, result.ExitCode); | 43 | Assert.Equal(267, result.ExitCode); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index 60e9653a..6c670158 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | |||
@@ -753,7 +753,7 @@ namespace WixToolsetTest.CoreIntegration | |||
753 | first => | 753 | first => |
754 | { | 754 | { |
755 | Assert.Equal(MessageLevel.Error, first.Level); | 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 | }); | 757 | }); |
758 | 758 | ||
759 | Assert.False(File.Exists(msiPath)); | 759 | Assert.False(File.Exists(msiPath)); |