aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2026-01-19 04:13:21 -0800
committerRob Mensching <rob@firegiant.com>2026-01-19 13:22:53 -0800
commitb0c76b75920bf4a7db46696ece01c856dd888519 (patch)
treed5da2f42d442b9fb1dbaffc54d9e7a8c6381ac11
parentb337ce4678a5c66c7a2edc2bf9f87a71b4916b1b (diff)
downloadwix-b0c76b75920bf4a7db46696ece01c856dd888519.tar.gz
wix-b0c76b75920bf4a7db46696ece01c856dd888519.tar.bz2
wix-b0c76b75920bf4a7db46696ece01c856dd888519.zip
Privatize error messages to their components
Fixes 6423
-rw-r--r--src/api/wix/WixToolset.Data/ErrorMessages.cs2088
-rw-r--r--src/ext/Bal/wixext/BalCompiler.cs2
-rw-r--r--src/ext/Firewall/wixext/FirewallErrors.cs1
-rw-r--r--src/ext/Sql/wixext/SqlErrors.cs8
-rw-r--r--src/ext/Sql/wixext/SqlExtensionFactory.cs2
-rw-r--r--src/ext/Sql/wixext/Symbols/SqlDatabaseSymbol.cs2
-rw-r--r--src/ext/Sql/wixext/Symbols/SqlFileSpecSymbol.cs2
-rw-r--r--src/ext/Sql/wixext/Symbols/SqlScriptSymbol.cs2
-rw-r--r--src/ext/Sql/wixext/Symbols/SqlStringSymbol.cs2
-rw-r--r--src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs6
-rw-r--r--src/wix/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs4
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs14
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs28
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs8
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs4
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs6
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs138
-rw-r--r--src/wix/WixToolset.Core.Native/Msm/IMsmErrors.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/AssemblyNameReader.cs4
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs12
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs6
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs4
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs6
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs4
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs22
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs14
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs16
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs8
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs12
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesFromTransforms.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs12
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs32
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs10
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFromTextFilesCommand.cs6
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs4
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Differ.cs12
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs8
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindTransformCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs522
-rw-r--r--src/wix/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs3
-rw-r--r--src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs7
-rw-r--r--src/wix/WixToolset.Core/CommandLine/BuildCommand.cs11
-rw-r--r--src/wix/WixToolset.Core/CommandLine/CommandLine.cs6
-rw-r--r--src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs23
-rw-r--r--src/wix/WixToolset.Core/Common.cs11
-rw-r--r--src/wix/WixToolset.Core/Compile/CompilerPackagePayload.cs2
-rw-r--r--src/wix/WixToolset.Core/Compiler.cs142
-rw-r--r--src/wix/WixToolset.Core/CompilerCore.cs18
-rw-r--r--src/wix/WixToolset.Core/CompilerErrors.cs1
-rw-r--r--src/wix/WixToolset.Core/Compiler_Bundle.cs10
-rw-r--r--src/wix/WixToolset.Core/Compiler_CustomTable.cs8
-rw-r--r--src/wix/WixToolset.Core/Compiler_EmbeddedUI.cs2
-rw-r--r--src/wix/WixToolset.Core/Compiler_Module.cs2
-rw-r--r--src/wix/WixToolset.Core/Compiler_Package.cs48
-rw-r--r--src/wix/WixToolset.Core/Compiler_UI.cs10
-rw-r--r--src/wix/WixToolset.Core/CoreErrors.cs876
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs13
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs9
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/FileSystem.cs1
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/LayoutServices.cs3
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs17
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/PathResolver.cs5
-rw-r--r--src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs31
-rw-r--r--src/wix/WixToolset.Core/ILibrarian.cs1
-rw-r--r--src/wix/WixToolset.Core/LibraryResult.cs4
-rw-r--r--src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs3
-rw-r--r--src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs5
-rw-r--r--src/wix/WixToolset.Core/Link/ResolveReferencesCommand.cs5
-rw-r--r--src/wix/WixToolset.Core/Link/WixGroupingOrdering.cs8
-rw-r--r--src/wix/WixToolset.Core/Linker.cs26
-rw-r--r--src/wix/WixToolset.Core/LocalizationParser.cs10
-rw-r--r--src/wix/WixToolset.Core/Preprocess/IfState.cs2
-rw-r--r--src/wix/WixToolset.Core/Preprocess/PreprocessorOperation.cs2
-rw-r--r--src/wix/WixToolset.Core/Preprocessor.cs62
-rw-r--r--src/wix/WixToolset.Core/VariableResolution.cs2
-rw-r--r--src/wix/WixToolset.Core/VariableResolver.cs10
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs2
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/WixiplFixture.cs2
86 files changed, 2042 insertions, 2414 deletions
diff --git a/src/api/wix/WixToolset.Data/ErrorMessages.cs b/src/api/wix/WixToolset.Data/ErrorMessages.cs
index f3add0a1..21bdaada 100644
--- a/src/api/wix/WixToolset.Data/ErrorMessages.cs
+++ b/src/api/wix/WixToolset.Data/ErrorMessages.cs
@@ -8,336 +8,19 @@ namespace WixToolset.Data
8 8
9 public static class ErrorMessages 9 public static class ErrorMessages
10 { 10 {
11 public static Message ActionCircularDependency(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
12 {
13 return Message(sourceLineNumbers, Ids.ActionCircularDependency, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is also scheduled to come before or after action '{1}'. Please remove this circular dependency by changing the Before or After attribute for one of the actions.", sequenceTableName, actionName1, actionName2);
14 }
15
16 public static Message ActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
17 {
18 return Message(sourceLineNumbers, Ids.ActionCollision, "The {0} table contains an action '{1}' that is declared in two different locations. Please remove one of the actions or set the Overridable='yes' attribute on one of their elements.", sequenceTableName, actionName);
19 }
20
21 public static Message ActionCollision2(SourceLineNumber sourceLineNumbers)
22 {
23 return Message(sourceLineNumbers, Ids.ActionCollision2, "The location of the action related to previous error.");
24 }
25
26 public static Message ActionScheduledRelativeToItself(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
27 {
28 return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToItself, "The {0}/@{1} attribute's value '{2}' is invalid because it would make this action dependent upon itself. Please change the value to the name of a different action.", elementName, attributeName, attributeValue);
29 }
30
31 public static Message ActionScheduledRelativeToTerminationAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
32 {
33 return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToTerminationAction, "The {0} table contains an action '{1}' that is scheduled to come before or after action '{2}', which is a special action which only occurs when the installer terminates. These special actions can be identified by their negative sequence numbers. Please schedule the action '{1}' to come before or after a different action.", sequenceTableName, actionName1, actionName2);
34 }
35
36 public static Message ActionScheduledRelativeToTerminationAction2(SourceLineNumber sourceLineNumbers)
37 {
38 return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToTerminationAction2, "The location of the special termination action related to previous error(s).");
39 }
40
41 public static Message AdditionalArgumentUnexpected(string argument)
42 {
43 return Message(null, Ids.AdditionalArgumentUnexpected, "Additional argument '{0}' was unexpected. Remove the argument and add the '-?' switch for more information.", argument);
44 }
45
46 public static Message AdminImageRequired(string productCode)
47 {
48 return Message(null, Ids.AdminImageRequired, "Source information is required for the product '{0}'. If you ran torch.exe with both target and updated .msi files, you must first perform an administrative installation of both .msi files then pass -a when running torch.exe.", productCode);
49 }
50
51 public static Message AdvertiseStateMustMatch(SourceLineNumber sourceLineNumbers, string advertiseState, string parentAdvertiseState)
52 {
53 return Message(sourceLineNumbers, Ids.AdvertiseStateMustMatch, "The advertise state of this element: '{0}', does not match the advertise state set on the parent element: '{1}'.", advertiseState, parentAdvertiseState);
54 }
55
56 public static Message AppIdIncompatibleAdvertiseState(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string parentValue)
57 {
58 return Message(sourceLineNumbers, Ids.AppIdIncompatibleAdvertiseState, "The {0}/@(1) attribute's value, '{2}' does not match the advertise state on its parent element: '{3}'. (Note: AppIds nested under Fragment, Module, or Package elements must be advertised.)", elementName, attributeName, value, parentValue);
59 }
60
61 public static Message BaselineRequired()
62 {
63 return Message(null, Ids.BaselineRequired, "No baseline was specified for one of the transforms specified. A baseline is required for all transforms in a patch.");
64 }
65
66 public static Message BinderFileManagerMissingFile(SourceLineNumber sourceLineNumbers, string exceptionMessage)
67 {
68 return Message(sourceLineNumbers, Ids.BinderFileManagerMissingFile, "{0}", exceptionMessage);
69 }
70
71 public static Message BothUpgradeCodesRequired()
72 {
73 return Message(null, Ids.BothUpgradeCodesRequired, "Both the target and updated package authoring must define the Package/@UpgradeCode attribute if the transform validates the UpgradeCode (default). Either define the Package/@UpgradeCode attribute in both the target and updated authoring, or set the Validate/@UpgradeCode attribute to 'no' in the patch authoring.");
74 }
75
76 public static Message BundleTooNew(string bundleExecutable, long bundleVersion)
77 {
78 return Message(null, Ids.BundleTooNew, "Unable to read bundle executable '{0}', because this bundle was created with a newer version of WiX (bundle version '{1}'). You must use a newer version of WiX in order to read this bundle.", bundleExecutable, bundleVersion);
79 }
80
81 public static Message CabExtractionFailed(string cabName, string directoryName)
82 {
83 return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' to directory '{1}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, directoryName);
84 }
85
86 public static Message CabExtractionFailed(string cabName, string mergeModulePath, string directoryName)
87 {
88 return Message(null, Ids.CabExtractionFailed, "Failed to extract cab '{0}' from merge module '{1}' to directory '{2}'. This is most likely due to a lack of available disk space on the destination drive.", cabName, mergeModulePath, directoryName);
89 }
90
91 public static Message CabFileDoesNotExist(string cabName, string mergeModulePath, string directoryName)
92 {
93 return Message(null, Ids.CabFileDoesNotExist, "Attempted to extract cab '{0}' from merge module '{1}' to directory '{2}'. The cab file was not found. This usually means that you have a merge module without a cabinet inside it.", cabName, mergeModulePath, directoryName);
94 }
95
96 public static Message CannotAuthorSpecialProperties(SourceLineNumber sourceLineNumbers, string propertyName)
97 {
98 return Message(sourceLineNumbers, Ids.CannotAuthorSpecialProperties, "The {0} property was specified. Special MSI properties cannot be authored. Use the attributes on the Property element instead.", propertyName);
99 }
100
101 public static Message CannotDefaultComponentId(SourceLineNumber sourceLineNumbers)
102 {
103 return Message(sourceLineNumbers, Ids.CannotDefaultComponentId, "The Component/@Id attribute was not found; it is required when there is no valid keypath to use as the default id value.");
104 }
105
106 public static Message CannotDefaultMismatchedAdvertiseStates(SourceLineNumber sourceLineNumbers)
107 {
108 return Message(sourceLineNumbers, Ids.CannotDefaultMismatchedAdvertiseStates, "MIME element cannot be marked as the default when its advertise state differs from its parent element. Ensure that the advertise state of the MIME element matches its parents element or remove the Mime/@Advertise attribute completely.");
109 }
110
111 public static Message CannotFindFile(SourceLineNumber sourceLineNumbers, string fileId, string fileName, string filePath)
112 {
113 return Message(sourceLineNumbers, Ids.CannotFindFile, "The file with id '{0}' and name '{1}' could not be found with source path: '{2}'.", fileId, fileName, filePath);
114 }
115
116 public static Message CanNotHaveTwoParents(SourceLineNumber sourceLineNumbers, string directorySearch, string parentAttribute, string parentElement)
117 {
118 return Message(sourceLineNumbers, Ids.CanNotHaveTwoParents, "The DirectorySearchRef {0} can not have a Parent attribute {1} and also be nested under parent element {2}", directorySearch, parentAttribute, parentElement);
119 }
120
121 public static Message CannotOpenMergeModule(SourceLineNumber sourceLineNumbers, string mergeModuleIdentifier, string mergeModuleFile)
122 {
123 return Message(sourceLineNumbers, Ids.CannotOpenMergeModule, "Cannot open the merge module '{0}' from file '{1}'.", mergeModuleIdentifier, mergeModuleFile);
124 }
125
126 public static Message CannotReundefineVariable(SourceLineNumber sourceLineNumbers, string variableName)
127 {
128 return Message(sourceLineNumbers, Ids.CannotReundefineVariable, "The variable '{0}' cannot be undefined because its already undefined.", variableName);
129 }
130 11
131 public static Message CheckBoxValueOnlyValidWithCheckBox(SourceLineNumber sourceLineNumbers, string elementName, string controlType)
132 {
133 return Message(sourceLineNumbers, Ids.CheckBoxValueOnlyValidWithCheckBox, "A {0} element was specified with Type='{1}' and a CheckBoxValue. Check box values can only be specified with Type='CheckBox'.", elementName, controlType);
134 }
135
136 public static Message CircularSearchReference(string chain)
137 {
138 return Message(null, Ids.CircularSearchReference, "A circular reference of search ordering constraints was detected: {0}. Search ordering references must form a directed acyclic graph.", chain);
139 }
140 12
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 13
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 14
151 public static Message ComponentExpectedFeature(SourceLineNumber sourceLineNumbers, string component, string type, string target)
152 {
153 return Message(sourceLineNumbers, Ids.ComponentExpectedFeature, "The component '{0}' is not assigned to a feature. The component's {1} '{2}' requires it to be assigned to at least one feature.", component, type, target);
154 }
155 15
156 public static Message ComponentMultipleKeyPaths(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string fileElementName, string registryElementName, string odbcDataSourceElementName)
157 {
158 return Message(sourceLineNumbers, Ids.ComponentMultipleKeyPaths, "The {0} element has multiple key paths set. The key path may only be set to '{2}' in extension elements that support it or one of the following locations: {0}/@{1}, {3}/@{1}, {4}/@{1}, or {5}/@{1}.", elementName, attributeName, value, fileElementName, registryElementName, odbcDataSourceElementName);
159 }
160 16
161 public static Message ComponentReferencedTwice(SourceLineNumber sourceLineNumbers, string crefChildId)
162 {
163 return Message(sourceLineNumbers, Ids.ComponentReferencedTwice, "Component {0} cannot be contained in a Module twice.", crefChildId);
164 }
165 17
166 public static Message ConditionExpected(SourceLineNumber sourceLineNumbers, string elementName)
167 {
168 return Message(sourceLineNumbers, Ids.ConditionExpected, "The {0} element's inner text cannot be an empty string or completely whitespace. If you don't want a condition, then simply remove the entire {0} element.", elementName);
169 }
170 18
171 public static Message CorruptFileFormat(string path, string format) 19 public static Message CorruptFileFormat(string path, string format)
172 { 20 {
173 return Message(null, Ids.CorruptFileFormat, "Attempted to load corrupt file from path: {0}. The file with format {1} contained unexpected content. Ensure the correct path was provided and that the file has not been incorrectly modified.", path, format.ToLowerInvariant()); 21 return Message(null, Ids.CorruptFileFormat, "Attempted to load corrupt file from path: {0}. The file with format {1} contained unexpected content. Ensure the correct path was provided and that the file has not been incorrectly modified.", path, format.ToLowerInvariant());
174 } 22 }
175 23
176 public static Message CouldNotDetermineProductCodeFromTransformSummaryInfo()
177 {
178 return Message(null, Ids.CouldNotDetermineProductCodeFromTransformSummaryInfo, "Could not determine ProductCode from transform summary information.");
179 }
180
181 public static Message CreateCabAddFileFailed()
182 {
183 return Message(null, Ids.CreateCabAddFileFailed, "An error (E_FAIL) was returned while creating a CAB file. The most common cause of this error is attempting to create a CAB file larger than 2GB. You can reduce the size of your installation package, use a higher compression level, or split your files into more than one CAB file.");
184 }
185
186 public static Message CreateCabInsufficientDiskSpace()
187 {
188 return Message(null, Ids.CreateCabInsufficientDiskSpace, "An error (ERROR_DISK_FULL) was returned while creating a CAB file. This means you have insufficient disk space. Clear disk space and try again.");
189 }
190
191 public static Message CubeFileNotFound(string cubeFile)
192 {
193 return Message(null, Ids.CubeFileNotFound, "The cube file '{0}' cannot be found. This file is required for MSI validation.", cubeFile);
194 }
195
196 public static Message CustomActionMultipleSources(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5)
197 {
198 return Message(sourceLineNumbers, Ids.CustomActionMultipleSources, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following source attributes specified at a time: {2}, {3}, {4}, {5}, or {6}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5);
199 }
200
201 public static Message CustomActionMultipleTargets(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5, string attributeName6, string attributeName7)
202 {
203 return Message(sourceLineNumbers, Ids.CustomActionMultipleTargets, "The {0}/@{1} attribute cannot coexist with a previously specified attribute on this element. The {0} element may only have one of the following target attributes specified at a time: {2}, {3}, {4}, {5}, {6}, {7}, or {8}.", elementName, attributeName, attributeName1, attributeName2, attributeName3, attributeName4, attributeName5, attributeName6, attributeName7);
204 }
205
206 public static Message CustomActionSequencedInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
207 {
208 return Message(sourceLineNumbers, Ids.CustomActionSequencedInModule, "The {0} table contains a custom action '{1}' that has a sequence number specified. The Sequence attribute is not allowed for custom actions in a merge module. Please remove the action or use the Before or After attributes to specify where this action should be sequenced relative to another action.", sequenceTableName, actionName);
209 }
210
211 public static Message CustomTableIllegalColumnWidth(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value)
212 {
213 return Message(sourceLineNumbers, Ids.CustomTableIllegalColumnWidth, "The {0}/@{1} attribute's value, '{2}', is not a valid column width. Valid column widths are 2 or 4.", elementName, attributeName, value);
214 }
215
216 public static Message CustomTableMissingPrimaryKey(SourceLineNumber sourceLineNumbers)
217 {
218 return Message(sourceLineNumbers, Ids.CustomTableMissingPrimaryKey, "The CustomTable is missing a Column element with the PrimaryKey attribute set to 'yes'. At least one column must be marked as the primary key.");
219 }
220
221 public static Message CustomTableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
222 {
223 return Message(sourceLineNumbers, Ids.CustomTableNameTooLong, "The {0}/@{1} attribute's value, '{2}', is too long for a table name. It cannot be more than than 31 characters long.", elementName, attributeName, value);
224 }
225
226 public static Message DatabaseSchemaMismatch(SourceLineNumber sourceLineNumbers, string tableName)
227 {
228 return Message(sourceLineNumbers, Ids.DatabaseSchemaMismatch, "The table definition of '{0}' in the target database does not match the table definition in the updated database. A transform requires that the target database schema match the updated database schema.", tableName);
229 }
230
231 public static Message DirectoryPathRequired(string parameter)
232 {
233 return Message(null, Ids.DirectoryPathRequired, "The parameter '{0}' must be followed by a directory path.", parameter);
234 }
235
236 public static Message DisallowedMsiProperty(SourceLineNumber sourceLineNumbers, string property, string illegalValueList)
237 {
238 return Message(sourceLineNumbers, Ids.DisallowedMsiProperty, "The '{0}' MsiProperty is controlled by the bootstrapper and cannot be authored. (Illegal properties are: {1}.) Remove the MsiProperty element.", property, illegalValueList);
239 }
240
241 public static Message DuplicateCabinetName(SourceLineNumber sourceLineNumbers, string cabinetName)
242 {
243 return Message(sourceLineNumbers, Ids.DuplicateCabinetName, "Duplicate cabinet name '{0}' found.", cabinetName);
244 }
245
246 public static Message DuplicateCabinetName2(SourceLineNumber sourceLineNumbers, string cabinetName)
247 {
248 return Message(sourceLineNumbers, Ids.DuplicateCabinetName2, "Duplicate cabinet name '{0}' error related to previous error.", cabinetName);
249 }
250
251 public static Message DuplicateComponentGuids(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
252 {
253 return Message(sourceLineNumbers, Ids.DuplicateComponentGuids, "Component/@Id='{0}' with {2} '{3}' has a @Guid value '{1}' that duplicates another component in this package. It is recommended to give each component its own unique GUID.", componentId, guid, type, keyPath);
254 }
255
256 public static Message DuplicateContextValue(SourceLineNumber sourceLineNumbers, string contextValue)
257 {
258 return Message(sourceLineNumbers, Ids.DuplicateContextValue, "The context value '{0}' was duplicated. Context values must be distinct.", contextValue);
259 }
260
261 public static Message DuplicatedUiLocalization(SourceLineNumber sourceLineNumbers, string controlName, string dialogName)
262 {
263 return Message(sourceLineNumbers, Ids.DuplicatedUiLocalization, "The localization for control {0} in dialog {1} is duplicated. Only one localization per control is allowed.", controlName, dialogName);
264 }
265
266 public static Message DuplicatedUiLocalization(SourceLineNumber sourceLineNumbers, string dialogName)
267 {
268 return Message(sourceLineNumbers, Ids.DuplicatedUiLocalization, "The localization for dialog {0} is duplicated. Only one localization per dialog is allowed.", dialogName);
269 }
270
271 public static Message DuplicateExtensionPreprocessorType(string extension, string variablePrefix, string collidingExtension)
272 {
273 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);
274 }
275
276 public static Message DuplicateExtensionTable(string extension, string tableName)
277 {
278 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);
279 }
280
281 public static Message DuplicateExtensionXmlSchemaNamespace(string extension, string extensionXmlSchemaNamespace, string collidingExtension)
282 {
283 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);
284 }
285
286 public static Message DuplicateFileId(string fileId)
287 {
288 return Message(null, Ids.DuplicateFileId, "Multiple files with ID '{0}' exist. Windows Installer does not support file IDs that differ only by case. Change the file IDs to be unique.", fileId);
289 }
290
291 public static Message DuplicateLocalizationIdentifier(SourceLineNumber sourceLineNumbers, string localizationId)
292 {
293 return Message(sourceLineNumbers, Ids.DuplicateLocalizationIdentifier, "The localization identifier '{0}' has been duplicated in multiple locations. A common cause is a bundle .wixproj that automatically loads .wxl files that are intended for the bootstrapper application. You can turn off that behavior by setting the EnableDefaultEmbeddedResourceItems property to false.", localizationId);
294 }
295
296 public static Message DuplicateModuleCaseInsensitiveFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId1, string fileId2)
297 {
298 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);
299 }
300
301 public static Message DuplicateModuleFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId)
302 {
303 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);
304 }
305
306 public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)
307 {
308 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);
309 }
310
311 public static Message DuplicateProviderDependencyKey(string providerKey, string packageId)
312 {
313 return Message(null, Ids.DuplicateProviderDependencyKey, "The provider dependency key '{0}' was already imported from the package with Id '{1}'. Please remove the Provides element with the key '{0}' from the package authoring.", providerKey, packageId);
314 }
315
316 public static Message DuplicateSourcesForOutput(string sourceList, string outputFile)
317 {
318 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);
319 }
320
321 public static Message DuplicateTransform(string transform)
322 {
323 return Message(null, Ids.DuplicateTransform, "The transform {0} was included twice on the command line. Each transform can be applied to a patch only once.", transform);
324 }
325
326 public static Message DuplicateVariableDefinition(string variableName, string variableValue, string variableCollidingValue)
327 {
328 return Message(null, Ids.DuplicateVariableDefinition, "The variable '{0}' with value '{1}' was previously declared with value '{2}'.", variableName, variableValue, variableCollidingValue);
329 }
330
331 public static Message ExampleGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
332 {
333 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);
334 }
335
336 public static Message ExpectedArgument(string argument)
337 {
338 return Message(null, Ids.ExpectedArgument, "{0} is expected to be followed by a value. See -? for additional detail.", argument);
339 }
340
341 public static Message ExpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) 24 public static Message ExpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
342 { 25 {
343 return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required.", elementName, attributeName); 26 return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required.", elementName, attributeName);
@@ -363,46 +46,6 @@ namespace WixToolset.Data
363 return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required unless the attribute {2} has a value of '{3}'.", elementName, attributeName, otherAttributeName, otherAttributeValue, otherAttributeValueUnless); 46 return Message(sourceLineNumbers, Ids.ExpectedAttribute, "The {0}/@{1} attribute was not found; it is required unless the attribute {2} has a value of '{3}'.", elementName, attributeName, otherAttributeName, otherAttributeValue, otherAttributeValueUnless);
364 } 47 }
365 48
366 public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
367 {
368 return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required unless it is specified in the parent element.", elementName, attributeName);
369 }
370
371 public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName)
372 {
373 return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2} element.", elementName, attributeName, parentElementName);
374 }
375
376 public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName, string parentAttributeName)
377 {
378 return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2}/@{3} attribute.", elementName, attributeName, parentElementName, parentAttributeName);
379 }
380
381 public static Message ExpectedAttributeWithValueWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName2)
382 {
383 return Message(sourceLineNumbers, Ids.ExpectedAttributeWithValueWithOtherAttribute, "The {0}/@{1} attribute is required to have a value when attribute {2} is present.", elementName, attributeName, attributeName2);
384 }
385
386 public static Message ExpectedAttributeOrElement(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement)
387 {
388 return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElement, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required.", parentElement, attribute, childElement);
389 }
390
391 public static Message ExpectedAttributeOrElementWithOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute)
392 {
393 return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is specified.", parentElement, attribute, childElement, otherAttribute);
394 }
395
396 public static Message ExpectedAttributeOrElementWithOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute, string otherAttributeValue)
397 {
398 return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is specified with value '{4}'.", parentElement, attribute, childElement, otherAttribute, otherAttributeValue);
399 }
400
401 public static Message ExpectedAttributeOrElementWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute)
402 {
403 return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithoutOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is not specified.", parentElement, attribute, childElement, otherAttribute);
404 }
405
406 public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2) 49 public static Message ExpectedAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
407 { 50 {
408 return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1} or {2} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2); 51 return Message(sourceLineNumbers, Ids.ExpectedAttributes, "The {0} element's {1} or {2} attribute was not found; one of these is required.", elementName, attributeName1, attributeName2);
@@ -448,54 +91,54 @@ namespace WixToolset.Data
448 return Message(sourceLineNumbers, Ids.ExpectedAttributesWithOtherAttribute, "The {0} element's {1} or {2} attribute was not found; one of these is required when attribute {3} has a value of '{4}'.", elementName, attributeName1, attributeName2, otherAttributeName, otherAttributeValue); 91 return Message(sourceLineNumbers, Ids.ExpectedAttributesWithOtherAttribute, "The {0} element's {1} or {2} attribute was not found; one of these is required when attribute {3} has a value of '{4}'.", elementName, attributeName1, attributeName2, otherAttributeName, otherAttributeValue);
449 } 92 }
450 93
451 public static Message ExpectedAttributesWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string otherAttributeName) 94 public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
452 { 95 {
453 return Message(sourceLineNumbers, Ids.ExpectedAttributesWithoutOtherAttribute, "The {0} element's {1} or {2} attribute was not found; one of these is required without attribute {3} present.", elementName, attributeName1, attributeName2, otherAttributeName); 96 return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required unless it is specified in the parent element.", elementName, attributeName);
454 } 97 }
455 98
456 public static Message ExpectedAttributeWhenElementNotUnderElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName) 99 public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName)
457 { 100 {
458 return Message(sourceLineNumbers, Ids.ExpectedAttributeWhenElementNotUnderElement, "The '{0}/@{1}' attribute was not found; it is required when element '{0}' is not nested under a '{2}' element.", elementName, attributeName, parentElementName); 101 return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2} element.", elementName, attributeName, parentElementName);
459 } 102 }
460 103
461 public static Message ExpectedAttributeWithElement(SourceLineNumber sourceLineNumbers, string elementName, string attribute, string childElementName) 104 public static Message ExpectedAttributeInElementOrParent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName, string parentAttributeName)
462 { 105 {
463 return Message(sourceLineNumbers, Ids.ExpectedAttributeWithElement, "The {0} element must have attribute '{1}' when child element '{2}' is present.", elementName, attribute, childElementName); 106 return Message(sourceLineNumbers, Ids.ExpectedAttributeInElementOrParent, "The {0}/@{1} attribute was not found or empty; it is required, or it can be specified in the parent {2}/@{3} attribute.", elementName, attributeName, parentElementName, parentAttributeName);
464 } 107 }
465 108
466 public static Message ExpectedAttributeWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName) 109 public static Message ExpectedAttributeWithValueWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName2)
467 { 110 {
468 return Message(sourceLineNumbers, Ids.ExpectedAttributeWithoutOtherAttributes, "The {0} element's {1} attribute was not found; it is required without attribute {2} present.", elementName, attributeName, otherAttributeName); 111 return Message(sourceLineNumbers, Ids.ExpectedAttributeWithValueWithOtherAttribute, "The {0}/@{1} attribute is required to have a value when attribute {2} is present.", elementName, attributeName, attributeName2);
469 } 112 }
470 113
471 public static Message ExpectedAttributeWithoutOtherAttributes(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName1, string otherAttributeName2) 114 public static Message ExpectedAttributeOrElementWithOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute)
472 { 115 {
473 return Message(sourceLineNumbers, Ids.ExpectedAttributeWithoutOtherAttributes, "The {0} element's {1} attribute was not found; it is required without attribute {2} or {3} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2); 116 return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is specified.", parentElement, attribute, childElement, otherAttribute);
474 } 117 }
475 118
476 public static Message ExpectedBinaryCategory(SourceLineNumber sourceLineNumbers) 119 public static Message ExpectedAttributeOrElementWithOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute, string otherAttributeValue)
477 { 120 {
478 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'."); 121 return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is specified with value '{4}'.", parentElement, attribute, childElement, otherAttribute, otherAttributeValue);
479 } 122 }
480 123
481 public static Message ExpectedClientPatchIdInWixMsp() 124 public static Message ExpectedAttributeOrElementWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string childElement, string otherAttribute)
482 { 125 {
483 return Message(null, Ids.ExpectedClientPatchIdInWixMsp, "The WixMsp is missing the client patch ID. Recompile the patch source files with the latest WiX toolset."); 126 return Message(sourceLineNumbers, Ids.ExpectedAttributeOrElementWithoutOtherAttribute, "Element '{0}' missing attribute '{1}' or child element '{2}'. Exactly one of those is required when attribute '{3}' is not specified.", parentElement, attribute, childElement, otherAttribute);
484 } 127 }
485 128
486 public static Message ExpectedDecompiler(string identifier) 129 public static Message ExpectedAttributesWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string otherAttributeName)
487 { 130 {
488 return Message(null, Ids.ExpectedDecompiler, "No decompiler was provided. {0} requires a decompiler.", identifier); 131 return Message(sourceLineNumbers, Ids.ExpectedAttributesWithoutOtherAttribute, "The {0} element's {1} or {2} attribute was not found; one of these is required without attribute {3} present.", elementName, attributeName1, attributeName2, otherAttributeName);
489 } 132 }
490 133
491 public static Message ExpectedDirectory(string directory) 134 public static Message ExpectedAttributeWhenElementNotUnderElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElementName)
492 { 135 {
493 return Message(null, Ids.ExpectedDirectory, "The directory '{0}' could not be found.", directory); 136 return Message(sourceLineNumbers, Ids.ExpectedAttributeWhenElementNotUnderElement, "The '{0}/@{1}' attribute was not found; it is required when element '{0}' is not nested under a '{2}' element.", elementName, attributeName, parentElementName);
494 } 137 }
495 138
496 public static Message ExpectedDirectoryGotFile(string option, string path) 139 public static Message ExpectedAttributeWithoutOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName)
497 { 140 {
498 return Message(null, Ids.ExpectedDirectoryGotFile, "The {0} option requires a directory, but the provided path is a file: {1}", option, path); 141 return Message(sourceLineNumbers, Ids.ExpectedAttributeWithoutOtherAttributes, "The {0} element's {1} attribute was not found; it is required without attribute {2} present.", elementName, attributeName, otherAttributeName);
499 } 142 }
500 143
501 public static Message ExpectedElement(SourceLineNumber sourceLineNumbers, string elementName) 144 public static Message ExpectedElement(SourceLineNumber sourceLineNumbers, string elementName)
@@ -523,101 +166,11 @@ namespace WixToolset.Data
523 return Message(sourceLineNumbers, Ids.ExpectedElement, "A {0} element must have at least one child element of type {1}, {2}, {3}, or {4}.", elementName, childName1, childName2, childName3, childName4); 166 return Message(sourceLineNumbers, Ids.ExpectedElement, "A {0} element must have at least one child element of type {1}, {2}, {3}, or {4}.", elementName, childName1, childName2, childName3, childName4);
524 } 167 }
525 168
526 public static Message ExpectedEndElement(SourceLineNumber sourceLineNumbers, string elementName)
527 {
528 return Message(sourceLineNumbers, Ids.ExpectedEndElement, "The end element matching the '{0}' start element was not found.", elementName);
529 }
530
531 public static Message ExpectedEndforeach(SourceLineNumber sourceLineNumbers)
532 {
533 return Message(sourceLineNumbers, Ids.ExpectedEndforeach, "A <?foreach?> statement was found that had no matching <?endforeach?>.");
534 }
535
536 public static Message ExpectedExpressionAfterNot(SourceLineNumber sourceLineNumbers, string expression)
537 {
538 return Message(sourceLineNumbers, Ids.ExpectedExpressionAfterNot, "Expecting an argument for 'NOT' in expression '{0}'.", expression);
539 }
540
541 public static Message ExpectedFileGotDirectory(string option, string path)
542 {
543 return Message(null, Ids.ExpectedFileGotDirectory, "The {0} option requires a file, but the provided path is a directory: {1}", option, path);
544 }
545
546 public static Message ExpectedMediaCabinet(SourceLineNumber sourceLineNumbers, string fileId, int diskId)
547 {
548 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);
549 }
550
551 public static Message ExpectedMediaRowsInWixMsp()
552 {
553 return Message(null, Ids.ExpectedMediaRowsInWixMsp, "The WixMsp has no media rows defined.");
554 }
555
556 public static Message ExpectedParentWithAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string grandparentElement) 169 public static Message ExpectedParentWithAttribute(SourceLineNumber sourceLineNumbers, string parentElement, string attribute, string grandparentElement)
557 { 170 {
558 return Message(sourceLineNumbers, Ids.ExpectedParentWithAttribute, "When the {0}/@{1} attribute is specified, the {0} element must be nested under a {2} element.", parentElement, attribute, grandparentElement); 171 return Message(sourceLineNumbers, Ids.ExpectedParentWithAttribute, "When the {0}/@{1} attribute is specified, the {0} element must be nested under a {2} element.", parentElement, attribute, grandparentElement);
559 } 172 }
560 173
561 public static Message ExpectedPatchIdInWixMsp()
562 {
563 return Message(null, Ids.ExpectedPatchIdInWixMsp, "The WixMsp is missing the patch ID.");
564 }
565
566 public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers)
567 {
568 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.");
569 }
570
571 public static Message ExpectedTableInMergeModule(string identifier)
572 {
573 return Message(null, Ids.ExpectedTableInMergeModule, "The table '{0}' was expected but was missing.", identifier);
574 }
575
576 public static Message ExpectedVariable(SourceLineNumber sourceLineNumbers, string expression)
577 {
578 return Message(sourceLineNumbers, Ids.ExpectedVariable, "A required variable was missing in the expression '{0}'.", expression);
579 }
580
581 public static Message ExpectedBindVariableValue(string variableId)
582 {
583 return Message(null, Ids.ExpectedBindVariableValue, "The bind variable '{0}' was declared without a value. Please specify a value for the variable.", variableId);
584 }
585
586 public static Message FamilyNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length)
587 {
588 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);
589 }
590
591 public static Message FeatureCannotFavorAndDisallowAdvertise(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue)
592 {
593 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);
594 }
595
596 public static Message FeatureCannotFollowParentAndFavorLocalOrSource(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue)
597 {
598 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);
599 }
600
601 public static Message FeatureConfigurableDirectoryNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
602 {
603 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);
604 }
605
606 public static Message FeatureNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
607 {
608 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);
609 }
610
611 public static Message FileIdentifierNotFound(SourceLineNumber sourceLineNumbers, string fileIdentifier)
612 {
613 return Message(sourceLineNumbers, Ids.FileIdentifierNotFound, "The file row with identifier '{0}' could not be found.", fileIdentifier);
614 }
615
616 public static Message FileInUse(SourceLineNumber sourceLineNumbers, string file)
617 {
618 return Message(sourceLineNumbers, Ids.FileInUse, "The process can not access the file '{0}' because it is being used by another process.", file);
619 }
620
621 public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file) 174 public static Message FileNotFound(SourceLineNumber sourceLineNumbers, string file)
622 { 175 {
623 return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the file '{0}'.", file); 176 return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the file '{0}'.", file);
@@ -635,86 +188,16 @@ namespace WixToolset.Data
635 return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the {0}file '{1}'. The following paths were checked: {2}", fileTypePrefix, file, combinedCheckedPaths); 188 return Message(sourceLineNumbers, Ids.FileNotFound, "Cannot find the {0}file '{1}'. The following paths were checked: {2}", fileTypePrefix, file, combinedCheckedPaths);
636 } 189 }
637 190
638 public static Message FileOrDirectoryPathRequired(string parameter)
639 {
640 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);
641 }
642
643 public static Message FilePathRequired(string filePurpose)
644 {
645 return Message(null, Ids.FilePathRequired, "The path to the {0} is required.", filePurpose);
646 }
647
648 public static Message FilePathRequired(string parameter, string filePurpose)
649 {
650 return Message(null, Ids.FilePathRequired, "The parameter '{0}' must be followed by a file path for the {1}.", parameter, filePurpose);
651 }
652
653 public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName)
654 {
655 return Message(sourceLineNumbers, Ids.FileTooLarge, "'{0}' is too large, file size must be less than 2147483648.", fileName);
656 }
657
658 public static Message FileWriteError(string path, string error)
659 {
660 return Message(null, Ids.FileWriteError, "Error writing to the path: '{0}'. Error message: '{1}'", path, error);
661 }
662
663 public static Message FinishCabFailed()
664 {
665 return Message(null, Ids.FinishCabFailed, "An error (E_FAIL) was returned while finalizing a CAB file. This most commonly happens when creating a CAB file with more than 65535 files in it or a compressed size greater than 2GB. Either reduce the number of files in your installation package or split your installation package's files into more than one CAB file using the Media element.");
666 }
667
668 public static Message FullTempDirectory(string prefix, string directory)
669 {
670 return Message(null, Ids.FullTempDirectory, "Unable to create temporary file. A common cause is that too many files that have names beginning with '{0}' are present. Delete any unneeded files in the '{1}' directory and try again.", prefix, directory);
671 }
672
673 public static Message GACAssemblyIdentityWarning(SourceLineNumber sourceLineNumbers, string fileName, string assemblyName)
674 {
675 return Message(sourceLineNumbers, Ids.GACAssemblyIdentityWarning, "The destination name of file '{0}' does not match its assembly name '{1}' in your authoring. This will cause an installation failure for this assembly, because it will be installed to the Global Assembly Cache. To fix this error, update File/@Name of file '{0}' to be the actual name of the assembly.", fileName, assemblyName);
676 }
677
678 public static Message GacAssemblyNoStrongName(SourceLineNumber sourceLineNumbers, string assemblyName, string componentName)
679 {
680 return Message(sourceLineNumbers, Ids.GacAssemblyNoStrongName, "Assembly {0} in component {1} has no strong name and has been marked to be placed in the GAC. All assemblies installed to the GAC must have a valid strong name.", assemblyName, componentName);
681 }
682
683 public static Message GenericReadNotAllowed(SourceLineNumber sourceLineNumbers) 191 public static Message GenericReadNotAllowed(SourceLineNumber sourceLineNumbers)
684 { 192 {
685 return Message(sourceLineNumbers, Ids.GenericReadNotAllowed, "Permission elements cannot have GenericRead as the only permission specified. Include at least one other permission."); 193 return Message(sourceLineNumbers, Ids.GenericReadNotAllowed, "Permission elements cannot have GenericRead as the only permission specified. Include at least one other permission.");
686 } 194 }
687 195
688 public static Message GuidContainsLowercaseLetters(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
689 {
690 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);
691 }
692
693 public static Message HarvestSourceNotSpecified()
694 {
695 return Message(null, Ids.HarvestSourceNotSpecified, "A harvest source must be specified after the harvest type and can be followed by harvester arguments.");
696 }
697
698 public static Message IdentifierNotFound(string type, string identifier)
699 {
700 return Message(null, Ids.IdentifierNotFound, "An expected identifier ('{1}', of type '{0}') was not found.", type, identifier);
701 }
702
703 public static Message IdentifierTooLongError(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int maxLength)
704 {
705 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);
706 }
707
708 public static Message IllegalAttributeExceptOnElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string expectedElementName) 196 public static Message IllegalAttributeExceptOnElement(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string expectedElementName)
709 { 197 {
710 return Message(sourceLineNumbers, Ids.IllegalAttributeExceptOnElement, "The {1} attribute can only be specified on the {2} element.", elementName, attributeName, expectedElementName); 198 return Message(sourceLineNumbers, Ids.IllegalAttributeExceptOnElement, "The {1} attribute can only be specified on the {2} element.", elementName, attributeName, expectedElementName);
711 } 199 }
712 200
713 public static Message IllegalAttributeInMergeModule(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
714 {
715 return Message(sourceLineNumbers, Ids.IllegalAttributeInMergeModule, "The {0}/@{1} attribute cannot be specified in a merge module.", elementName, attributeName);
716 }
717
718 public static Message IllegalAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, params string[] legalValues) 201 public static Message IllegalAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, params string[] legalValues)
719 { 202 {
720 return Message(sourceLineNumbers, Ids.IllegalAttributeValue, "The {0}/@{1} attribute's value, '{2}', is not one of the legal options: '{3}'.", elementName, attributeName, value, String.Join(", ", legalValues)); 203 return Message(sourceLineNumbers, Ids.IllegalAttributeValue, "The {0}/@{1} attribute's value, '{2}', is not one of the legal options: '{3}'.", elementName, attributeName, value, String.Join(", ", legalValues));
@@ -725,11 +208,6 @@ namespace WixToolset.Data
725 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWhenNested, "The {0}/@{1} attribute value, '{2}', cannot be specified when the {0} element is nested underneath a {3} element.", elementName, attributeName, attrivuteValue, parentElementName); 208 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWhenNested, "The {0}/@{1} attribute value, '{2}', cannot be specified when the {0} element is nested underneath a {3} element.", elementName, attributeName, attrivuteValue, parentElementName);
726 } 209 }
727 210
728 public static Message IllegalAttributeValueWithIllegalList(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string illegalValueList)
729 {
730 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithIllegalList, "The {0}/@{1} attribute's value, '{2}', is one of the illegal options: {3}.", elementName, attributeName, value, illegalValueList);
731 }
732
733 public static Message IllegalAttributeValueWithLegalList(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string legalValueList) 211 public static Message IllegalAttributeValueWithLegalList(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string legalValueList)
734 { 212 {
735 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithLegalList, "The {0}/@{1} attribute's value, '{2}', is not one of the legal options: {3}.", elementName, attributeName, value, legalValueList); 213 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithLegalList, "The {0}/@{1} attribute's value, '{2}', is not one of the legal options: {3}.", elementName, attributeName, value, legalValueList);
@@ -755,21 +233,11 @@ namespace WixToolset.Data
755 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithoutOtherAttribute, "The {0}/@{1} attribute's value, '{2}', cannot be specified without attribute {3} present.", elementName, attributeName, attributeValue, otherAttributeName); 233 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithoutOtherAttribute, "The {0}/@{1} attribute's value, '{2}', cannot be specified without attribute {3} present.", elementName, attributeName, attributeValue, otherAttributeName);
756 } 234 }
757 235
758 public static Message IllegalAttributeWhenAdvertised(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
759 {
760 return Message(sourceLineNumbers, Ids.IllegalAttributeWhenAdvertised, "The {0}/@{1} attribute cannot be specified because the element is advertised.", elementName, attributeName);
761 }
762
763 public static Message IllegalAttributeWhenNested(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElement) 236 public static Message IllegalAttributeWhenNested(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string parentElement)
764 { 237 {
765 return Message(sourceLineNumbers, Ids.IllegalAttributeWhenNested, "The {0}/@{1} attribute cannot be specified when the {0} element is nested underneath a {2} element. If this {0} is a member of a ComponentGroup where ComponentGroup/@{1} is set, then the {0}/@{1} attribute should be removed.", elementName, attributeName, parentElement); 238 return Message(sourceLineNumbers, Ids.IllegalAttributeWhenNested, "The {0}/@{1} attribute cannot be specified when the {0} element is nested underneath a {2} element. If this {0} is a member of a ComponentGroup where ComponentGroup/@{1} is set, then the {0}/@{1} attribute should be removed.", elementName, attributeName, parentElement);
766 } 239 }
767 240
768 public static Message IllegalAttributeWithInnerText(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
769 {
770 return Message(sourceLineNumbers, Ids.IllegalAttributeWithInnerText, "The {0}/@{1} attribute cannot be specified when the element has body text as well. Specify either the attribute or the body, but not both.", elementName, attributeName);
771 }
772
773 public static Message IllegalAttributeWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName) 241 public static Message IllegalAttributeWithOtherAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName)
774 { 242 {
775 return Message(sourceLineNumbers, Ids.IllegalAttributeWithOtherAttribute, "The {0}/@{1} attribute cannot be specified when attribute {2} is present.", elementName, attributeName, otherAttributeName); 243 return Message(sourceLineNumbers, Ids.IllegalAttributeWithOtherAttribute, "The {0}/@{1} attribute cannot be specified when attribute {2} is present.", elementName, attributeName, otherAttributeName);
@@ -820,47 +288,6 @@ namespace WixToolset.Data
820 return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutOtherAttributes, "The {0}/@{1} attribute can only be specified with one of the following attributes: {2}, {3}, {4}, or {5} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2, otherAttributeName3, otherAttributeName4); 288 return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutOtherAttributes, "The {0}/@{1} attribute can only be specified with one of the following attributes: {2}, {3}, {4}, or {5} present.", elementName, attributeName, otherAttributeName1, otherAttributeName2, otherAttributeName3, otherAttributeName4);
821 } 289 }
822 290
823 public static Message IllegalBinderClassName()
824 {
825 return Message(null, Ids.IllegalBinderClassName, "Illegal binder class name specified for -binder command line option.");
826 }
827
828 public static Message IllegalCabbingThreadCount(string numThreads)
829 {
830 return Message(null, Ids.IllegalCabbingThreadCount, "Illegal number of threads to create cabinets: '{0}' for -ct <N> command line option. Specify the number of threads to use like -ct 2.", numThreads);
831 }
832
833 public static Message IllegalCharactersInPath(string pathName)
834 {
835 return Message(null, Ids.IllegalCharactersInPath, "Illegal characters in path '{0}'. Ensure you provided a valid path to the file.", pathName);
836 }
837
838 public static Message IllegalCodepage(int codepage)
839 {
840 return Message(null, Ids.IllegalCodepage, "The code page '{0}' is not a valid Windows code page. Update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
841 }
842
843 public static Message IllegalCodepage(SourceLineNumber sourceLineNumbers, int codepage)
844 {
845 return Message(sourceLineNumbers, Ids.IllegalCodepage, "The code page '{0}' is not a valid Windows code page. Update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
846 }
847
848 public static Message IllegalCodepageAttribute(SourceLineNumber sourceLineNumbers, string codepage, string elementName, string attributeName)
849 {
850 return Message(sourceLineNumbers, Ids.IllegalCodepageAttribute, "The code page '{0}' is not a valid Windows code page. Please check the {1}/@{2} attribute value in your source file.", codepage, elementName, attributeName);
851 }
852
853 public static Message IllegalColumnName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
854 {
855 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);
856 }
857
858 public static Message IllegalCommandLineArgumentValue(string arg, string value, IEnumerable<string> validValues)
859 {
860 var combinedValidValues = String.Join(", ", validValues);
861 return Message(null, Ids.IllegalCommandLineArgumentValue, "The argument {0} value '{1}' is invalid. Use one of the following values {2}", arg, value, combinedValidValues);
862 }
863
864 public static Message IllegalComponentWithAutoGeneratedGuid(SourceLineNumber sourceLineNumbers) 291 public static Message IllegalComponentWithAutoGeneratedGuid(SourceLineNumber sourceLineNumbers)
865 { 292 {
866 return Message(sourceLineNumbers, Ids.IllegalComponentWithAutoGeneratedGuid, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components using a Directory as a KeyPath or containing ODBCDataSource child elements cannot use an automatically generated guid. Make sure your component doesn't have a Directory as the KeyPath and move any ODBCDataSource child elements to components with explicit component guids."); 293 return Message(sourceLineNumbers, Ids.IllegalComponentWithAutoGeneratedGuid, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components using a Directory as a KeyPath or containing ODBCDataSource child elements cannot use an automatically generated guid. Make sure your component doesn't have a Directory as the KeyPath and move any ODBCDataSource child elements to components with explicit component guids.");
@@ -871,16 +298,6 @@ namespace WixToolset.Data
871 return Message(sourceLineNumbers, Ids.IllegalComponentWithAutoGeneratedGuid, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with registry keypaths and files cannot use an automatically generated guid. Create multiple components, each with one file and/or one registry value keypath, to use automatically generated guids.", registryKeyPath); 298 return Message(sourceLineNumbers, Ids.IllegalComponentWithAutoGeneratedGuid, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with registry keypaths and files cannot use an automatically generated guid. Create multiple components, each with one file and/or one registry value keypath, to use automatically generated guids.", registryKeyPath);
872 } 299 }
873 300
874 public static Message IllegalCompressionLevel(SourceLineNumber sourceLineNumbers, string compressionLevel)
875 {
876 return Message(sourceLineNumbers, Ids.IllegalCompressionLevel, "The compression level '{0}' is not valid. Valid values are 'none', 'low', 'medium', 'high', and 'mszip'.", compressionLevel);
877 }
878
879 public static Message IllegalDefineStatement(SourceLineNumber sourceLineNumbers, string defineStatement)
880 {
881 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);
882 }
883
884 public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) 301 public static Message IllegalEmptyAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
885 { 302 {
886 return Message(sourceLineNumbers, Ids.IllegalEmptyAttributeValue, "The {0}/@{1} attribute's value cannot be an empty string. If a value is not required, simply remove the entire attribute.", elementName, attributeName); 303 return Message(sourceLineNumbers, Ids.IllegalEmptyAttributeValue, "The {0}/@{1} attribute's value cannot be an empty string. If a value is not required, simply remove the entire attribute.", elementName, attributeName);
@@ -891,41 +308,11 @@ namespace WixToolset.Data
891 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); 308 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);
892 } 309 }
893 310
894 public static Message IllegalEnvironmentVariable(string environmentVariable, string value)
895 {
896 return Message(null, Ids.IllegalEnvironmentVariable, "The {0} environment variable is set to an invalid value of '{1}'.", environmentVariable, value);
897 }
898
899 public static Message IllegalFamilyName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
900 {
901 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);
902 }
903
904 public static Message IllegalFileCompressionAttributes(SourceLineNumber sourceLineNumbers) 311 public static Message IllegalFileCompressionAttributes(SourceLineNumber sourceLineNumbers)
905 { 312 {
906 return Message(sourceLineNumbers, Ids.IllegalFileCompressionAttributes, "Cannot have both the MsidbFileAttributesCompressed and MsidbFileAttributesNoncompressed options set in a file attributes column."); 313 return Message(sourceLineNumbers, Ids.IllegalFileCompressionAttributes, "Cannot have both the MsidbFileAttributesCompressed and MsidbFileAttributesNoncompressed options set in a file attributes column.");
907 } 314 }
908 315
909 public static Message IllegalForeach(SourceLineNumber sourceLineNumbers, string foreachStatement)
910 {
911 return Message(sourceLineNumbers, Ids.IllegalForeach, "The foreach statement '{0}' is illegal. The proper format for foreach is <?foreach varName in valueList?>.", foreachStatement);
912 }
913
914 public static Message IllegalGeneratedGuidComponentUnversionedKeypath(SourceLineNumber sourceLineNumbers)
915 {
916 return Message(sourceLineNumbers, Ids.IllegalGeneratedGuidComponentUnversionedKeypath, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with more than one file cannot use an automatically generated guid unless a versioned file is the keypath and the other files are unversioned. This component's keypath is not versioned. Create multiple components to use automatically generated guids.");
917 }
918
919 public static Message IllegalGeneratedGuidComponentVersionedNonkeypath(SourceLineNumber sourceLineNumbers)
920 {
921 return Message(sourceLineNumbers, Ids.IllegalGeneratedGuidComponentVersionedNonkeypath, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with more than one file cannot use an automatically generated guid unless a versioned file is the keypath and the other files are unversioned. This component has a non-keypath file that is versioned. Create multiple components to use automatically generated guids.");
922 }
923
924 public static Message IllegalGuidValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
925 {
926 return Message(sourceLineNumbers, Ids.IllegalGuidValue, "The {0}/@{1} attribute's value, '{2}', is not a legal guid value.", elementName, attributeName, value);
927 }
928
929 public static Message IllegalIdentifier(SourceLineNumber sourceLineNumbers, string elementName, string value) 316 public static Message IllegalIdentifier(SourceLineNumber sourceLineNumbers, string elementName, string value)
930 { 317 {
931 return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0} element's value, '{1}', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, value); 318 return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0} element's value, '{1}', is not a legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, value);
@@ -946,21 +333,6 @@ namespace WixToolset.Data
946 return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0}/@{1} attribute's value '{2}' contains an illegal identifier '{3}'. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, attributeName, value, identifier); 333 return Message(sourceLineNumbers, Ids.IllegalIdentifier, "The {0}/@{1} attribute's value '{2}' contains an illegal identifier '{3}'. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.). Every identifier must begin with either a letter or an underscore.", elementName, attributeName, value, identifier);
947 } 334 }
948 335
949 public static Message IllegalIdentifierLooksLikeFormatted(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
950 {
951 return Message(sourceLineNumbers, Ids.IllegalIdentifierLooksLikeFormatted, "The {0}/@{1} attribute's value, '{2}', is not a legal identifier. The {0}/@{1} attribute does not support formatted string values, such as property names enclosed in brackets ([LIKETHIS]). The value must be the identifier of another element, such as the Directory/@Id attribute value.", elementName, attributeName, value);
952 }
953
954 public static Message IllegalInlineLocVariable(SourceLineNumber sourceLineNumbers, string variableName, string variableValue)
955 {
956 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);
957 }
958
959 public static Message IllegalIntegerInExpression(SourceLineNumber sourceLineNumbers, string expression)
960 {
961 return Message(sourceLineNumbers, Ids.IllegalIntegerInExpression, "An illegal number was found in the expression '{0}'.", expression);
962 }
963
964 public static Message IllegalIntegerValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) 336 public static Message IllegalIntegerValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
965 { 337 {
966 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); 338 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);
@@ -976,94 +348,24 @@ namespace WixToolset.Data
976 return Message(sourceLineNumbers, Ids.IllegalLongFilename, "The {0}/@{1} attribute's value '{2}' contains a invalid filename '{3}'. Legal filenames 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, filename); 348 return Message(sourceLineNumbers, Ids.IllegalLongFilename, "The {0}/@{1} attribute's value '{2}' contains a invalid filename '{3}'. Legal filenames 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, filename);
977 } 349 }
978 350
979 public static Message IllegalLongValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
980 {
981 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);
982 }
983
984 public static Message IllegalModuleExclusionLanguageAttributes(SourceLineNumber sourceLineNumbers)
985 {
986 return Message(sourceLineNumbers, Ids.IllegalModuleExclusionLanguageAttributes, "Cannot set both ExcludeLanguage and ExcludeExceptLanguage attributes on a ModuleExclusion element.");
987 }
988
989 public static Message IllegalParentAttributeWhenNested(SourceLineNumber sourceLineNumbers, string parentElementName, string parentAttributeName, string childElement) 351 public static Message IllegalParentAttributeWhenNested(SourceLineNumber sourceLineNumbers, string parentElementName, string parentAttributeName, string childElement)
990 { 352 {
991 return Message(sourceLineNumbers, Ids.IllegalParentAttributeWhenNested, "The {0}/@{1} attribute cannot be specified when a {2} element is nested underneath the {0} element.", parentElementName, parentAttributeName, childElement); 353 return Message(sourceLineNumbers, Ids.IllegalParentAttributeWhenNested, "The {0}/@{1} attribute cannot be specified when a {2} element is nested underneath the {0} element.", parentElementName, parentAttributeName, childElement);
992 } 354 }
993 355
994 public static Message IllegalPathForGeneratedComponentGuid(SourceLineNumber sourceLineNumbers, string componentName, string keyFilePath)
995 {
996 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);
997 }
998
999 public static Message IllegalPropertyCustomActionAttributes(SourceLineNumber sourceLineNumbers)
1000 {
1001 return Message(sourceLineNumbers, Ids.IllegalPropertyCustomActionAttributes, "The CustomAction sets a property but its Execute attribute is not 'immediate' (the default). Property-setting custom actions cannot be deferred.\"");
1002 }
1003
1004 public static Message IllegalRelativeLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) 356 public static Message IllegalRelativeLongFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1005 { 357 {
1006 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); 358 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);
1007 } 359 }
1008 360
1009 public static Message IllegalRootDirectory(SourceLineNumber sourceLineNumbers, string directoryId) 361 public static Message TooManyElements(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, int expectedInstances)
1010 {
1011 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);
1012 }
1013
1014 public static Message IllegalSearchIdForParentDepth(SourceLineNumber sourceLineNumbers, string id, string parentId)
1015 {
1016 return Message(sourceLineNumbers, Ids.IllegalSearchIdForParentDepth, "When the parent DirectorySearch/@Depth attribute is greater than 1 for the DirectorySearch '{1}', the FileSearch/@Id attribute must be absent for FileSearch '{0}' unless the parent DirectorySearch/@AssignToProperty attribute value is 'yes'. Remove the FileSearch/@Id attribute for '{0}' to resolve this issue.", id, parentId);
1017 }
1018
1019 public static Message IllegalShortFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1020 {
1021 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);
1022 }
1023
1024 public static Message IllegalSuppressWarningId(string suppressedId)
1025 {
1026 return Message(null, Ids.IllegalSuppressWarningId, "Illegal value '{0}' for the -sw<N> command line option. Specify a particular warning number, like '-sw6' to suppress the warning with ID 6, or '-sw' alone to suppress all warnings.", suppressedId);
1027 }
1028
1029 public static Message IllegalTargetDirDefaultDir(SourceLineNumber sourceLineNumbers, string defaultDir)
1030 {
1031 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);
1032 }
1033
1034 public static Message IllegalTerminalServerCustomActionAttributes(SourceLineNumber sourceLineNumbers)
1035 {
1036 return Message(sourceLineNumbers, Ids.IllegalTerminalServerCustomActionAttributes, "The CustomAction/@TerminalServerAware attribute's value is 'yes' but the Execute attribute is not 'deferred,' 'rollback,' or 'commit.' Terminal-Server-aware custom actions must be deferred, rollback, or commit custom actions. For more information, see https://learn.microsoft.com/en-us/windows/win32/msi/terminalserver .\"");
1037 }
1038
1039 public static Message IllegalValidationArguments()
1040 {
1041 return Message(null, Ids.IllegalValidationArguments, "You may only specify a single default type using -t or specify custom validation using -serr and -val.");
1042 }
1043
1044 public static Message IllegalVersionValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1045 {
1046 return Message(sourceLineNumbers, Ids.IllegalVersionValue, "The {0}/@{1} attribute's value, '{2}', is not a valid version. Specify a four-part version or semantic version, such as '#.#.#.#' or '#.#.#-label.#'.", elementName, attributeName, value);
1047 }
1048
1049 public static Message IllegalWarningIdAsError(string warningId)
1050 {
1051 return Message(null, Ids.IllegalWarningIdAsError, "Illegal value '{0}' for the -wx<N> command line option. Specify a particular warning number, like '-wx6' to display the warning with ID 6 as an error, or '-wx' alone to suppress all warnings.", warningId);
1052 }
1053
1054 public static Message IllegalBindVariablePrefix(SourceLineNumber sourceLineNumbers, string variableId)
1055 {
1056 return Message(sourceLineNumbers, Ids.IllegalBindVariablePrefix, "The bind variable $(wix.{0}) uses an illegal prefix '$'. Please use the '!' prefix instead.", variableId);
1057 }
1058
1059 public static Message IllegalYesNoAlwaysValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1060 { 362 {
1061 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); 363 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);
1062 } 364 }
1063 365
1064 public static Message IllegalYesNoDefaultValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) 366 public static Message IdentifierTooLongError(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int maxLength)
1065 { 367 {
1066 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); 368 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);
1067 } 369 }
1068 370
1069 public static Message IllegalYesNoValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) 371 public static Message IllegalYesNoValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
@@ -1071,41 +373,6 @@ namespace WixToolset.Data
1071 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); 373 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);
1072 } 374 }
1073 375
1074 public static Message ImplicitComponentKeyPath(SourceLineNumber sourceLineNumbers, string componentId)
1075 {
1076 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);
1077 }
1078
1079 public static Message InlineDirectorySyntaxRequiresPath(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string identifier)
1080 {
1081 return Message(sourceLineNumbers, Ids.InlineDirectorySyntaxRequiresPath, "The {0}/@{1} attribute's value '{2}' only specifies a directory reference. The inline directory syntax requires that at least one directory be specified in addition to the value. For example, use '{3}:\\foo\\' to add a 'foo' directory.", elementName, attributeName, value, identifier);
1082 }
1083
1084 public static Message InsecureBundleFilename(string filename)
1085 {
1086 return Message(null, Ids.InsecureBundleFilename, "The file name '{0}' creates an insecure bundle. Windows will load unnecessary compatibility shims into a bundle with that file name. These compatibility shims can be DLL hijacked allowing attackers to compromise your customers' computer. Choose a different bundle file name.", filename);
1087 }
1088
1089 public static Message InsertInvalidSequenceActionOrder(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionNameBefore, string actionNameAfter, string actionNameNew)
1090 {
1091 return Message(sourceLineNumbers, Ids.InsertInvalidSequenceActionOrder, "Invalid order of actions {1} and {2} in sequence table {0}. Action {3} must occur after {1} and before {2}, but {2} is currently sequenced after {1}. Please fix the ordering or explicitly supply a location for the action {3}.", sequenceTableName, actionNameBefore, actionNameAfter, actionNameNew);
1092 }
1093
1094 public static Message InsertSequenceNoSpace(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionNameBefore, string actionNameAfter, string actionNameNew)
1095 {
1096 return Message(sourceLineNumbers, Ids.InsertSequenceNoSpace, "Not enough space exists to sequence action {3} in table {0}. It must be sequenced after {1} and before {2}, but those two actions are currently sequenced next to each other. Please move one of those actions to allow {3} to be inserted between them.", sequenceTableName, actionNameBefore, actionNameAfter, actionNameNew);
1097 }
1098
1099 public static Message InsufficientVersion(SourceLineNumber sourceLineNumbers, Version currentVersion, Version requiredVersion)
1100 {
1101 return Message(sourceLineNumbers, Ids.InsufficientVersion, "The current version of the toolset is {0}, but version {1} is required.", currentVersion, requiredVersion);
1102 }
1103
1104 public static Message InsufficientVersion(SourceLineNumber sourceLineNumbers, Version currentVersion, Version requiredVersion, string extension)
1105 {
1106 return Message(sourceLineNumbers, Ids.InsufficientVersion, "The current version of the extension '{2}' is {0}, but version {1} is required.", currentVersion, requiredVersion, extension);
1107 }
1108
1109 public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value, int minimum, int maximum) 376 public static Message IntegralValueOutOfRange(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value, int minimum, int maximum)
1110 { 377 {
1111 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); 378 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);
@@ -1126,201 +393,11 @@ namespace WixToolset.Data
1126 return Message(sourceLineNumbers, Ids.IntegralValueSentinelCollision, "The long integral value {0} collides with a sentinel value in the compiler code.", value); 393 return Message(sourceLineNumbers, Ids.IntegralValueSentinelCollision, "The long integral value {0} collides with a sentinel value in the compiler code.", value);
1127 } 394 }
1128 395
1129 public static Message InvalidAddedFileRowWithoutSequence(SourceLineNumber sourceLineNumbers, string fileRowId)
1130 {
1131 return Message(sourceLineNumbers, Ids.InvalidAddedFileRowWithoutSequence, "A row has been added to the File table with id '{1}' that does not have a sequence number assigned to it. Create your transform from a pair of msi's instead of xml outputs to get sequences assigned to your File table's rows.", fileRowId);
1132 }
1133
1134 public static Message InvalidAssemblyFile(SourceLineNumber sourceLineNumbers, string assemblyFile, string moreInformation)
1135 {
1136 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);
1137 }
1138
1139 public static Message InvalidBundle(string bundleExecutable)
1140 {
1141 return Message(null, Ids.InvalidBundle, "Unable to read bundle executable '{0}'. This is not a valid WiX bundle.", bundleExecutable);
1142 }
1143
1144 public static Message InvalidCabinetTemplate(SourceLineNumber sourceLineNumbers, string cabinetTemplate)
1145 {
1146 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);
1147 }
1148
1149 public static Message InvalidCommandLineFileName(string fileName, string error)
1150 {
1151 return Message(null, Ids.InvalidCommandLineFileName, "Invalid file name specified on the command line: '{0}'. Error message: '{1}'", fileName, error);
1152 }
1153
1154 public static Message InvalidBundleCondition(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string condition)
1155 {
1156 return Message(sourceLineNumbers, Ids.InvalidBundleCondition, "The {0}/@{1} attribute's value '{2}' is not a valid bundle condition.", elementName, attributeName, condition);
1157 }
1158
1159 public static Message InvalidDateTimeFormat(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1160 {
1161 return Message(sourceLineNumbers, Ids.InvalidDateTimeFormat, "The {0}/@{1} attribute's value '{2}' is not a valid date/time value. A date/time value should follow the format YYYY-MM-DDTHH:mm:ss and be a valid date and time between 1980 and 2043, inclusive.", elementName, attributeName, value);
1162 }
1163
1164 public static Message InvalidDocumentElement(SourceLineNumber sourceLineNumbers, string elementName, string fileType, string expectedElementName) 396 public static Message InvalidDocumentElement(SourceLineNumber sourceLineNumbers, string elementName, string fileType, string expectedElementName)
1165 { 397 {
1166 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); 398 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);
1167 } 399 }
1168 400
1169 public static Message InvalidEmbeddedUIFileName(SourceLineNumber sourceLineNumbers, string codepage)
1170 {
1171 return Message(sourceLineNumbers, Ids.InvalidEmbeddedUIFileName, "The EmbeddedUI/@Name attribute value, '{0}', does not contain an extension. Windows Installer will not load an embedded UI DLL without an extension. Include an extension or just omit the Name attribute so it defaults to the file name portion of the Source attribute value.", codepage);
1172 }
1173
1174 public static Message CouldNotFindExtensionInPaths(string extensionPath, IEnumerable<string> checkedPaths)
1175 {
1176 return Message(null, Ids.InvalidExtension, "The extension '{0}' could not be found. Checked paths: {1}", extensionPath, String.Join(", ", checkedPaths));
1177 }
1178
1179 public static Message InvalidExtension(string extension)
1180 {
1181 return Message(null, Ids.InvalidExtension, "The extension '{0}' could not be loaded.", extension);
1182 }
1183
1184 public static Message InvalidExtension(string extension, string invalidReason)
1185 {
1186 return Message(null, Ids.InvalidExtension, "The extension '{0}' could not be loaded because of the following reason: {1}", extension, invalidReason);
1187 }
1188
1189 public static Message InvalidExtension(string extension, string extensionType, string expectedType)
1190 {
1191 return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}'.", extension, extensionType, expectedType);
1192 }
1193
1194 public static Message InvalidExtension(string extension, string extensionType, string expectedType1, string expectedType2)
1195 {
1196 return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}' or '{3}'.", extension, extensionType, expectedType1, expectedType2);
1197 }
1198
1199 public static Message InvalidExtensionType(string extension, string attributeType)
1200 {
1201 return Message(null, Ids.InvalidExtensionType, "Either '{1}' was not defined in the assembly or the type defined in extension '{0}' could not be loaded.", extension, attributeType);
1202 }
1203
1204 public static Message InvalidExtensionType(string extension, string className, string expectedType)
1205 {
1206 return Message(null, Ids.InvalidExtensionType, "The extension type '{1}' in extension '{0}' does not inherit from the expected class '{2}'.", extension, className, expectedType);
1207 }
1208
1209 public static Message InvalidExtensionType(string extension, string className, string exceptionType, string exceptionMessage)
1210 {
1211 return Message(null, Ids.InvalidExtensionType, "The type '{1}' in extension '{0}' could not be loaded. Exception type '{2}' returned the following message: {3}", extension, className, exceptionType, exceptionMessage);
1212 }
1213
1214 public static Message InvalidFileName(SourceLineNumber sourceLineNumbers, string fileName)
1215 {
1216 return Message(sourceLineNumbers, Ids.InvalidFileName, "Invalid file name '{0}'.", fileName);
1217 }
1218
1219 public static Message InvalidIdt(SourceLineNumber sourceLineNumbers, string idtFile)
1220 {
1221 return Message(sourceLineNumbers, Ids.InvalidIdt, "There was an error importing the file '{0}'.", idtFile);
1222 }
1223
1224 public static Message InvalidIdt(SourceLineNumber sourceLineNumbers, string idtFile, string tableName)
1225 {
1226 return Message(sourceLineNumbers, Ids.InvalidIdt, "There was an error importing table '{1}' from file '{0}'.", idtFile, tableName);
1227 }
1228
1229 public static Message InvalidKeyColumn(string tableName, string columnName, string foreignTableName, int foreignColumnNumber)
1230 {
1231 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);
1232 }
1233
1234 public static Message InvalidKeypathChange(SourceLineNumber sourceLineNumbers, string component, string transformPath)
1235 {
1236 return Message(sourceLineNumbers, Ids.InvalidKeypathChange, "Component '{0}' has a changed keypath in the transform '{1}'. Patches cannot change the keypath of a component.", component, transformPath);
1237 }
1238
1239 public static Message InvalidManifestContent(SourceLineNumber sourceLineNumbers, string fileName)
1240 {
1241 return Message(sourceLineNumbers, Ids.InvalidManifestContent, "The manifest '{0}' does not have the required assembly/assemblyIdentity element.", fileName);
1242 }
1243
1244 public static Message InvalidMergeLanguage(SourceLineNumber sourceLineNumbers, string mergeId, string mergeLanguage)
1245 {
1246 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);
1247 }
1248
1249 public static Message InvalidFourPartVersion(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string version)
1250 {
1251 return Message(sourceLineNumbers, Ids.InvalidFourPartVersion, "Invalid {0}/@Version '{1}'. {0} version has a max value of \"65535.65535.65535.65535\" and must be all numeric.", elementName, version);
1252 }
1253
1254 public static Message InvalidPlatformValue(SourceLineNumber sourceLineNumbers, string value)
1255 {
1256 return Message(sourceLineNumbers, Ids.InvalidPlatformValue, "The Platform attribute has an invalid value {0}. Possible values are x86, x64, or arm64.", value);
1257 }
1258
1259 public static Message InvalidPreprocessorFunction(SourceLineNumber sourceLineNumbers, string variable)
1260 {
1261 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);
1262 }
1263
1264 public static Message InvalidPreprocessorFunctionAutoVersion(SourceLineNumber sourceLineNumbers)
1265 {
1266 return Message(sourceLineNumbers, Ids.InvalidPreprocessorFunctionAutoVersion, "Invalid AutoVersion template specified.");
1267 }
1268
1269 public static Message InvalidPreprocessorPragma(SourceLineNumber sourceLineNumbers, string variable)
1270 {
1271 return Message(sourceLineNumbers, Ids.InvalidPreprocessorPragma, "Malformed preprocessor pragma '{0}'. Pragmas must have a prefix, a name of at least 1 character long, and be followed by optional arguments.", variable);
1272 }
1273
1274 public static Message InvalidPreprocessorVariable(SourceLineNumber sourceLineNumbers, string variable)
1275 {
1276 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);
1277 }
1278
1279 public static Message InvalidRemoveComponent(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath)
1280 {
1281 return Message(sourceLineNumbers, Ids.InvalidRemoveComponent, "Removing component '{0}' from feature '{1}' is not supported. Either the component was removed or the guid changed in the transform '{2}'. Add the component back, undo the change to the component guid, or remove the entire feature.", component, feature, transformPath);
1282 }
1283
1284 public static Message InvalidSequenceTable(string sequenceTableName)
1285 {
1286 return Message(null, Ids.InvalidSequenceTable, "Found an invalid sequence table '{0}'.", sequenceTableName);
1287 }
1288
1289 public static Message InvalidStringForCodepage(SourceLineNumber sourceLineNumbers, string codepage)
1290 {
1291 return Message(sourceLineNumbers, Ids.InvalidStringForCodepage, "A string was provided with characters that are not available in the specified database code page '{0}'. Either change these characters to ones that exist in the database's code page, or update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
1292 }
1293
1294 public static Message InvalidStubExe(string filename)
1295 {
1296 return Message(null, Ids.InvalidStubExe, "Stub executable '{0}' is not a valid Win32 executable.", filename);
1297 }
1298
1299 public static Message InvalidSubExpression(SourceLineNumber sourceLineNumbers, string subExpression, string expression)
1300 {
1301 return Message(sourceLineNumbers, Ids.InvalidSubExpression, "Found invalid subexpression '{0}' in expression '{1}'.", subExpression, expression);
1302 }
1303
1304 public static Message InvalidSummaryInfoCodePage(SourceLineNumber sourceLineNumbers, int codePage)
1305 {
1306 return Message(sourceLineNumbers, Ids.InvalidSummaryInfoCodePage, "The code page '{0}' is invalid for summary information. You must specify an ANSI code page.", codePage);
1307 }
1308
1309 public static Message InvalidValidatorMessageType(string type)
1310 {
1311 return Message(null, Ids.InvalidValidatorMessageType, "Unknown validation message type '{0}'.", type);
1312 }
1313
1314 public static Message InvalidVariableDefinition(string variableDefinition)
1315 {
1316 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);
1317 }
1318
1319 public static Message InvalidWixTransform(string fileName)
1320 {
1321 return Message(null, Ids.InvalidWixTransform, "The file '{0}' is not a valid WiX Transform.", fileName);
1322 }
1323
1324 public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string wixNamespace) 401 public static Message InvalidWixXmlNamespace(SourceLineNumber sourceLineNumbers, string wixElementName, string wixNamespace)
1325 { 402 {
1326 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); 403 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);
@@ -1331,644 +408,175 @@ namespace WixToolset.Data
1331 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); 408 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);
1332 } 409 }
1333 410
1334 public static Message InvalidXml(SourceLineNumber sourceLineNumbers, string fileType, string detail)
1335 {
1336 return Message(sourceLineNumbers, Ids.InvalidXml, "Not a valid {0} file; detail: {1}", fileType, detail);
1337 }
1338
1339 public static Message LocalizationVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId)
1340 {
1341 return Message(sourceLineNumbers, Ids.LocalizationVariableUnknown, "The localization variable !(loc.{0}) is unknown. Please ensure the variable is defined.", variableId);
1342 }
1343
1344 public static Message MaximumCabinetSizeForLargeFileSplittingTooLarge(SourceLineNumber sourceLineNumbers, int maximumCabinetSizeForLargeFileSplitting, int maxValueOfMaxCabSizeForLargeFileSplitting)
1345 {
1346 return Message(sourceLineNumbers, Ids.MaximumCabinetSizeForLargeFileSplittingTooLarge, "'{0}' is too large. Reduce the size of maximum cabinet size for large file splitting. The maximum permitted value is '{1}' MB.", maximumCabinetSizeForLargeFileSplitting, maxValueOfMaxCabSizeForLargeFileSplitting);
1347 }
1348
1349 public static Message MaximumUncompressedMediaSizeTooLarge(SourceLineNumber sourceLineNumbers, int maximumUncompressedMediaSize)
1350 {
1351 return Message(sourceLineNumbers, Ids.MaximumUncompressedMediaSizeTooLarge, "'{0}' is too large. Reduce the size of maximum uncompressed media size.", maximumUncompressedMediaSize);
1352 }
1353
1354 public static Message MediaEmbeddedCabinetNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length)
1355 {
1356 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);
1357 }
1358
1359 public static Message MediaTableCollision(SourceLineNumber sourceLineNumbers)
1360 {
1361 return Message(sourceLineNumbers, Ids.MediaTableCollision, "Only one of Media and MediaTemplate tables should be authored.");
1362 }
1363
1364 public static Message MergeExcludedModule(SourceLineNumber sourceLineNumbers, string mergeId, string otherMergeId)
1365 {
1366 return Message(sourceLineNumbers, Ids.MergeExcludedModule, "The module '{0}' cannot be merged because it excludes or is excluded by the merge module with signature '{1}'.", mergeId, otherMergeId);
1367 }
1368
1369 public static Message MergeFeatureRequired(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile, string mergeId)
1370 {
1371 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);
1372 }
1373
1374 public static Message MergeLanguageFailed(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile)
1375 {
1376 return Message(sourceLineNumbers, Ids.MergeLanguageFailed, "The language '{0}' is supported but uses an invalid language transform in the merge module '{1}'.", language, mergeModuleFile);
1377 }
1378
1379 public static Message MergeLanguageUnsupported(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile)
1380 {
1381 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);
1382 }
1383
1384 public static Message MergeModuleExpectedFeature(SourceLineNumber sourceLineNumbers, string mergeId)
1385 {
1386 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);
1387 }
1388
1389 public static Message MergePlatformMismatch(SourceLineNumber sourceLineNumbers, string mergeModuleFile)
1390 {
1391 return Message(sourceLineNumbers, Ids.MergePlatformMismatch, "'{0}' is a 64-bit merge module but the product consuming it is 32-bit. 32-bit products can consume only 32-bit merge modules.", mergeModuleFile);
1392 }
1393
1394 public static Message MissingBundleInformation(string friendlyName)
1395 {
1396 return Message(null, Ids.MissingBundleInformation, "The Bundle is missing {0} data, and cannot continue.", friendlyName);
1397 }
1398
1399 public static Message MissingBundleSearch(SourceLineNumber sourceLineNumbers, string searchId)
1400 {
1401 return Message(sourceLineNumbers, Ids.MissingBundleSearch, "Bundle Search with id '{0}' has no corresponding implementation symbol.", searchId);
1402 }
1403
1404 public static Message MissingDependencyVersion(string packageId)
1405 {
1406 return Message(null, Ids.MissingDependencyVersion, "The provider dependency version was not authored for the package with Id '{0}'. Please author the Provides/@Version attribute for this package.", packageId);
1407 }
1408
1409 public static Message MissingEntrySection()
1410 {
1411 return Message(null, Ids.MissingEntrySection, "Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, Module.");
1412 }
1413
1414 public static Message MissingEntrySection(string sectionType)
1415 {
1416 return Message(null, Ids.MissingEntrySection, "Could not find entry section in provided list of intermediates. Expected section of type '{0}'.", sectionType);
1417 }
1418
1419 public static Message MissingManifestForWin32Assembly(SourceLineNumber sourceLineNumbers, string file, string manifest)
1420 {
1421 return Message(sourceLineNumbers, Ids.MissingManifestForWin32Assembly, "File '{0}' is marked as a Win32 assembly but it refers to assembly manifest '{1}' that is not present in this product.", file, manifest);
1422 }
1423
1424 public static Message MissingMedia(SourceLineNumber sourceLineNumbers, int diskId)
1425 {
1426 return Message(sourceLineNumbers, Ids.MissingMedia, "There is no media defined for disk id '{0}'. You must author either <Media Id='{0}' ...> or <MediaTemplate ...>.", diskId);
1427 }
1428
1429 public static Message MissingOrInvalidModuleInstallerVersion(SourceLineNumber sourceLineNumbers, string moduleId, string mergeModuleFile, string productInstallerVersion)
1430 {
1431 return Message(sourceLineNumbers, Ids.MissingOrInvalidModuleInstallerVersion, "The merge module '{0}' from file '{1}' is either missing or has an invalid installer version. The value read from the installer version in module's summary information was '{2}'. This should be a numeric value representing a valid installer version such as 200 or 301.", moduleId, mergeModuleFile, productInstallerVersion);
1432 }
1433
1434 public static Message MissingPackagePayload(SourceLineNumber sourceLineNumbers, string packageId, string packageType)
1435 {
1436 return Message(sourceLineNumbers, Ids.MissingPackagePayload, "There is no payload defined for package '{0}'. This is specified on the {1}Package element or a child {1}PackagePayload element.", packageId, packageType);
1437 }
1438
1439 public static Message MissingTableDefinition(string tableName)
1440 {
1441 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);
1442 }
1443
1444 public static Message MissingTypeLibFile(SourceLineNumber sourceLineNumbers, string elementName, string fileElementName)
1445 {
1446 return Message(sourceLineNumbers, Ids.MissingTypeLibFile, "The {0} element is non-advertised and therefore requires a parent {1} element.", elementName, fileElementName);
1447 }
1448
1449 public static Message MissingValidatorExtension()
1450 {
1451 return Message(null, Ids.MissingValidatorExtension, "The validator requires at least one extension. Add \"ValidatorExtension, Wix\" for the default implementation.");
1452 }
1453
1454 public static Message MsiTransactionInvalidPackage(SourceLineNumber sourceLineNumbers, string packageId, string packageType)
1455 {
1456 return Message(sourceLineNumbers, Ids.MsiTransactionInvalidPackage, "Invalid package '{0}' in MSI transaction. It is type '{1}' but must be Msi or Msp.", packageId, packageType);
1457 }
1458
1459 public static Message MsiTransactionInvalidPackage2(SourceLineNumber sourceLineNumbers)
1460 {
1461 return Message(sourceLineNumbers, Ids.MsiTransactionInvalidPackage2, "Location of rollback boundary related to previous error.");
1462 }
1463
1464 public static Message MsiTransactionX86BeforeX64Package(SourceLineNumber sourceLineNumbers, string x64PackageId, string x86PackageId)
1465 {
1466 return Message(sourceLineNumbers, Ids.MsiTransactionX86BeforeX64Package, "Package '{0}' is x64 but Package '{1}' is x86. MSI transactions must install all x64 packages before any x86 package.", x64PackageId, x86PackageId);
1467 }
1468
1469 public static Message MsiTransactionX86BeforeX64Package2(SourceLineNumber sourceLineNumbers)
1470 {
1471 return Message(sourceLineNumbers, Ids.MsiTransactionX86BeforeX64Package2, "Location of x86 package related to previous error.");
1472 }
1473
1474 public static Message MultipleEntrySections(SourceLineNumber sourceLineNumbers, string sectionName1, string sectionName2)
1475 {
1476 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);
1477 }
1478
1479 public static Message MultipleEntrySections2(SourceLineNumber sourceLineNumbers)
1480 {
1481 return Message(sourceLineNumbers, Ids.MultipleEntrySections2, "Location of entry section related to previous error.");
1482 }
1483
1484 public static Message MultipleFilesMatchedWithOutputSpecification(string sourceSpecification, string sourceList)
1485 {
1486 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);
1487 }
1488
1489 public static Message MultipleIdentifiersFound(SourceLineNumber sourceLineNumbers, string elementName, string identifier, string mismatchIdentifier)
1490 {
1491 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);
1492 }
1493
1494 public static Message MultiplePackagePayloads(SourceLineNumber sourceLineNumbers, string packageId, string packagePayloadId1, string packagePayloadId2)
1495 {
1496 return Message(sourceLineNumbers, Ids.MultiplePackagePayloads, "The package '{0}' has multiple PackagePayloads: '{1}' and '{2}'. This normally happens when the payload is defined on the package element and a child PackagePayload element.", packageId, packagePayloadId1, packagePayloadId2);
1497 }
1498
1499 public static Message MultiplePackagePayloads2(SourceLineNumber sourceLineNumbers)
1500 {
1501 return Message(sourceLineNumbers, Ids.MultiplePackagePayloads2, "The location of the package payload related to previous error.");
1502 }
1503
1504 public static Message MultiplePackagePayloads3(SourceLineNumber sourceLineNumbers)
1505 {
1506 return Message(sourceLineNumbers, Ids.MultiplePackagePayloads3, "The location of the package related to previous error.");
1507 }
1508
1509 public static Message MultiplePrimaryReferences(SourceLineNumber sourceLineNumbers, string crefChildType, string crefChildId, string crefParentType, string crefParentId, string conflictParentType, string conflictParentId)
1510 {
1511 return Message(sourceLineNumbers, Ids.MultiplePrimaryReferences, "Multiple primary references were found for {0} '{1}' in {2} '{3}' and {4} '{5}'.", crefChildType, crefChildId, crefParentType, crefParentId, conflictParentType, conflictParentId);
1512 }
1513
1514 public static Message MustSpecifyOutputWithMoreThanOneInput()
1515 {
1516 return Message(null, Ids.MustSpecifyOutputWithMoreThanOneInput, "You must specify an output file using the \"-o\" or \"-out\" switch when you provide more than one input file.");
1517 }
1518
1519 public static Message NeedSequenceBeforeOrAfter(SourceLineNumber sourceLineNumbers, string elementName)
1520 {
1521 return Message(sourceLineNumbers, Ids.NeedSequenceBeforeOrAfter, "A {0} element must have a Before attribute, After attribute, or a Sequence attribute.", elementName);
1522 }
1523
1524 public static Message NewRowAddedInTable(SourceLineNumber sourceLineNumbers, string productCode, string tableName, string rowId)
1525 {
1526 return Message(sourceLineNumbers, Ids.NewRowAddedInTable, "Product '{0}': Table '{1}' has a new row '{2}' added. This makes the patch not uninstallable.", productCode, tableName, rowId);
1527 }
1528
1529 public static Message NoDataForColumn(SourceLineNumber sourceLineNumbers, string columnName, string tableName)
1530 {
1531 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);
1532 }
1533
1534 public static Message NoDifferencesInTransform(SourceLineNumber sourceLineNumbers)
1535 {
1536 return Message(sourceLineNumbers, Ids.NoDifferencesInTransform, "The transform being built did not contain any differences so it could not be created.");
1537 }
1538
1539 public static Message NoFirstControlSpecified(SourceLineNumber sourceLineNumbers, string dialogName)
1540 {
1541 return Message(sourceLineNumbers, Ids.NoFirstControlSpecified, "The '{0}' dialog element does not have a valid tabbable control. You must either have a tabbable control that is not marked TabSkip='yes', or you must mark a control TabSkip='no'. If you have a page with no tabbable controls (a progress page, for example), you might want to set the first Text control to be TabSkip='no'.", dialogName);
1542 }
1543
1544 public static Message NonterminatedPreprocessorInstruction(SourceLineNumber sourceLineNumbers, string beginInstruction, string endInstruction)
1545 {
1546 return Message(sourceLineNumbers, Ids.NonterminatedPreprocessorInstruction, "Found a <?{0}?> processing instruction without a matching <?{1}?> after it.", beginInstruction, endInstruction);
1547 }
1548
1549 public static Message NoUniqueActionSequenceNumber(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
1550 {
1551 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);
1552 }
1553
1554 public static Message NoUniqueActionSequenceNumber2(SourceLineNumber sourceLineNumbers)
1555 {
1556 return Message(sourceLineNumbers, Ids.NoUniqueActionSequenceNumber2, "The location of the sequenced action related to previous error.");
1557 }
1558
1559 public static Message OrderingReferenceLoopDetected(SourceLineNumber sourceLineNumbers, string loopList)
1560 {
1561 return Message(sourceLineNumbers, Ids.OrderingReferenceLoopDetected, "A circular reference of ordering dependencies was detected. The infinite loop includes: {0}. Ordering dependency references must form a directed acyclic graph.", loopList);
1562 }
1563
1564 public static Message OrphanedComponent(SourceLineNumber sourceLineNumbers, string componentName)
1565 {
1566 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);
1567 }
1568
1569 public static Message OutputCodepageMismatch(SourceLineNumber sourceLineNumbers, int beforeCodepage, int afterCodepage)
1570 {
1571 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);
1572 }
1573
1574 public static Message OutputCodepageMismatch2(SourceLineNumber sourceLineNumbers)
1575 {
1576 return Message(sourceLineNumbers, Ids.OutputCodepageMismatch2, "The location of the mismatched code page related to the previous warning.");
1577 }
1578
1579 public static Message OutputTargetNotSpecified()
1580 {
1581 return Message(null, Ids.OutputTargetNotSpecified, "The '-out' or '-o' parameter must specify a file path.");
1582 }
1583
1584 public static Message OutputTypeMismatch(SourceLineNumber sourceLineNumbers, string beforeOutputType, string afterOutputType)
1585 {
1586 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);
1587 }
1588
1589 public static Message OverridableActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
1590 {
1591 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);
1592 }
1593
1594 public static Message OverridableActionCollision2(SourceLineNumber sourceLineNumbers)
1595 {
1596 return Message(sourceLineNumbers, Ids.OverridableActionCollision2, "The location of the action related to previous error.");
1597 }
1598
1599 public static Message PackagePayloadUnsupported(SourceLineNumber sourceLineNumbers, string packageType)
1600 {
1601 return Message(sourceLineNumbers, Ids.PackagePayloadUnsupported, "The {0}PackagePayload element can only be used for {0}Packages.", packageType);
1602 }
1603
1604 public static Message PackagePayloadUnsupported2(SourceLineNumber sourceLineNumbers)
1605 {
1606 return Message(sourceLineNumbers, Ids.PackagePayloadUnsupported2, "The location of the package related to previous error.");
1607 }
1608
1609 public static Message ParentElementAttributeRequired(SourceLineNumber sourceLineNumbers, string parentElement, string parentAttribute, string childElement)
1610 {
1611 return Message(sourceLineNumbers, Ids.ParentElementAttributeRequired, "The parent {0} element is missing the {1} attribute that is required for the {2} child element.", parentElement, parentAttribute, childElement);
1612 }
1613
1614 public static Message PatchNotRemovable()
1615 {
1616 return Message(null, Ids.PatchNotRemovable, "This patch is not uninstallable. The 'Patch' element's attribute 'AllowRemoval' should be set to 'no'.");
1617 }
1618
1619 public static Message PatchWithoutTransforms()
1620 {
1621 return Message(null, Ids.PatchWithoutTransforms, "No transforms were provided to attach to the patch.");
1622 }
1623
1624 public static Message PatchWithoutValidTransforms()
1625 {
1626 return Message(null, Ids.PatchWithoutValidTransforms, "No valid transforms were provided to attach to the patch. Check to make sure the transforms you passed on the command line have a matching baseline authored in the patch. Also, make sure there are differences between your target and upgrade.");
1627 }
1628
1629 public static Message PathCannotContainQuote(string fileName)
1630 {
1631 return Message(null, Ids.PathCannotContainQuote, "Path '{0}' contains a literal quote character. Quotes are often accidentally introduced when trying to refer to a directory path with spaces in it, such as \"C:\\Out Directory\\\" -- the backslash before the quote acts an escape character. The correct representation for that path is: \"C:\\Out Directory\\\\\".", fileName);
1632 }
1633
1634 public static Message PathTooLong(SourceLineNumber sourceLineNumbers, string fileName)
1635 {
1636 return Message(sourceLineNumbers, Ids.PathTooLong, "'{0}' is too long, the fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.", fileName);
1637 }
1638
1639 public static Message PayloadMustBeRelativeToCache(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue) 411 public static Message PayloadMustBeRelativeToCache(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
1640 { 412 {
1641 return Message(sourceLineNumbers, Ids.PayloadMustBeRelativeToCache, "The {0}/@{1} attribute's value, '{2}', is not a relative path.", elementName, attributeName, attributeValue); 413 return Message(sourceLineNumbers, Ids.PayloadMustBeRelativeToCache, "The {0}/@{1} attribute's value, '{2}', is not a relative path.", elementName, attributeName, attributeValue);
1642 } 414 }
1643 415
1644 public static Message PerUserButAllUsersEquals1(SourceLineNumber sourceLineNumbers, string path)
1645 {
1646 return Message(sourceLineNumbers, Ids.PerUserButAllUsersEquals1, "The MSI '{0}' is explicitly marked to not elevate so it must be a per-user package but the ALLUSERS Property is set to '1' creating a per-machine package. Remove the Property with Id='ALLUSERS' and use Package/@Scope attribute to be explicit instead.", path);
1647 }
1648
1649 public static Message PreprocessorError(SourceLineNumber sourceLineNumbers, string message)
1650 {
1651 return Message(sourceLineNumbers, Ids.PreprocessorError, "{0}", message);
1652 }
1653
1654 public static Message PreprocessorExtensionEvaluateFunctionFailed(SourceLineNumber sourceLineNumbers, string prefix, string function, string args, string message)
1655 {
1656 return Message(sourceLineNumbers, Ids.PreprocessorExtensionEvaluateFunctionFailed, "In the preprocessor extension that handles prefix '{0}' while trying to call function '{1}({2})' and exception has occurred : {3}", prefix, function, args, message);
1657 }
1658
1659 public static Message PreprocessorExtensionForParameterMissing(SourceLineNumber sourceLineNumbers, string parameterName, string parameterPrefix)
1660 {
1661 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);
1662 }
1663
1664 public static Message PreprocessorExtensionGetVariableValueFailed(SourceLineNumber sourceLineNumbers, string prefix, string variable, string message)
1665 {
1666 return Message(sourceLineNumbers, Ids.PreprocessorExtensionGetVariableValueFailed, "In the preprocessor extension that handles prefix '{0}' while trying to get the value for variable '{1}' and exception has occured : {2}", prefix, variable, message);
1667 }
1668
1669 public static Message PreprocessorExtensionPragmaFailed(SourceLineNumber sourceLineNumbers, string pragma, string message)
1670 {
1671 return Message(sourceLineNumbers, Ids.PreprocessorExtensionPragmaFailed, "Exception thrown while processing pragma '{0}'. The exception's message is: {1}", pragma, message);
1672 }
1673
1674 public static Message PreprocessorIllegalForeachVariable(SourceLineNumber sourceLineNumbers, string variableName)
1675 {
1676 return Message(sourceLineNumbers, Ids.PreprocessorIllegalForeachVariable, "The variable named '{0}' is not allowed in a foreach expression.", variableName);
1677 }
1678
1679 public static Message PreprocessorMissingParameterPrefix(SourceLineNumber sourceLineNumbers, string parameterName)
1680 {
1681 return Message(sourceLineNumbers, Ids.PreprocessorMissingParameterPrefix, "Could not find the prefix in parameter name: '{0}'.", parameterName);
1682 }
1683
1684 public static Message ProductCodeInvalidForTransform(SourceLineNumber sourceLineNumbers)
1685 {
1686 return Message(sourceLineNumbers, Ids.ProductCodeInvalidForTransform, "The value '*' is not valid for the ProductCode when used in a transform or in a patch. Copy the ProductCode from your target product MSI into the Package/@ProductCode attribute value for your product authoring.");
1687 }
1688
1689 public static Message ProgIdNestedTooDeep(SourceLineNumber sourceLineNumbers)
1690 {
1691 return Message(sourceLineNumbers, Ids.ProgIdNestedTooDeep, "ProgId elements may not be nested more than 1 level deep.");
1692 }
1693
1694 public static Message RadioButtonBitmapAndIconDisallowed(SourceLineNumber sourceLineNumbers)
1695 {
1696 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.");
1697 }
1698
1699 public static Message RadioButtonTypeInconsistent(SourceLineNumber sourceLineNumbers)
1700 {
1701 return Message(sourceLineNumbers, Ids.RadioButtonTypeInconsistent, "All RadioButton elements in a RadioButtonGroup must be consistent with their use of the Bitmap, Icon, and Text attributes. Ensure all of the RadioButton elements in this group have the same attribute specified.");
1702 }
1703
1704 public static Message ReadOnlyOutputFile(string filePath)
1705 {
1706 return Message(null, Ids.ReadOnlyOutputFile, "Unable to output to file '{0}' because it is marked as read-only.", filePath);
1707 }
1708
1709 public static Message RealTableMissingPrimaryKeyColumn(SourceLineNumber sourceLineNumbers, string tableName) 416 public static Message RealTableMissingPrimaryKeyColumn(SourceLineNumber sourceLineNumbers, string tableName)
1710 { 417 {
1711 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); 418 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);
1712 } 419 }
1713 420
1714 public static Message RecursiveAction(string action, string tableName) 421 public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length, int maximumLength)
1715 {
1716 return Message(null, Ids.RecursiveAction, "The action '{0}' is recursively placed in the '{1}' table.", action, tableName);
1717 }
1718
1719 public static Message ReferenceLoopDetected(SourceLineNumber sourceLineNumbers, string loopList)
1720 {
1721 return Message(sourceLineNumbers, Ids.ReferenceLoopDetected, "A circular reference of groups was detected. The infinite loop includes: {0}. Group references must form a directed acyclic graph.", loopList);
1722 }
1723
1724 public static Message RegistryMultipleValuesWithoutMultiString(SourceLineNumber sourceLineNumbers, string registryElementName, string valueAttributeName, string registryValueElementName, string typeAttributeName)
1725 {
1726 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);
1727 }
1728
1729 public static Message RegistryNameValueIncorrect(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1730 {
1731 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);
1732 }
1733
1734 public static Message RegistryRootInvalid(SourceLineNumber sourceLineNumbers)
1735 {
1736 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.");
1737 }
1738
1739 public static Message RegistrySubElementCannotBeRemoved(SourceLineNumber sourceLineNumbers, string registryElementName, string registryValueElementName, string actionAttributeName, string removeValue, string removeKeyOnInstallValue)
1740 {
1741 return Message(sourceLineNumbers, Ids.RegistrySubElementCannotBeRemoved, "The {0}/{1} element cannot be specified if the {2} attribute's value is '{3}' or '{4}'.", registryElementName, registryValueElementName, actionAttributeName, removeValue, removeKeyOnInstallValue);
1742 }
1743
1744 public static Message RelativePathForRegistryElement(SourceLineNumber sourceLineNumbers)
1745 {
1746 return Message(sourceLineNumbers, Ids.RelativePathForRegistryElement, "Cannot convert RelativePath into Registry elements.");
1747 }
1748
1749 public static Message ReservedBurnNamespaceViolation(SourceLineNumber sourceLineNumbers, string element, string attribute, string prefix)
1750 {
1751 return Message(sourceLineNumbers, Ids.ReservedNamespaceViolation, "The {0}/@{1} attribute's value begins with the reserved prefix '{2}'. Some prefixes are reserved by the WiX toolset for well-known values. Change your attribute's value to not begin with the same prefix.", element, attribute, prefix);
1752 }
1753
1754 public static Message ReservedNamespaceViolation(SourceLineNumber sourceLineNumbers, string element, string attribute, string prefix)
1755 {
1756 return Message(sourceLineNumbers, Ids.ReservedNamespaceViolation, "The {0}/@{1} attribute's value begins with the reserved prefix '{2}'. Some prefixes are reserved by the Windows Installer and WiX Toolset for well-known values. Change your attribute's value to not begin with the same prefix.", element, attribute, prefix);
1757 }
1758
1759 public static Message RootFeatureCannotFollowParent(SourceLineNumber sourceLineNumbers)
1760 {
1761 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.");
1762 }
1763
1764 public static Message SameFileIdDifferentSource(SourceLineNumber sourceLineNumbers, string fileId, string sourcePath1, string sourcePath2)
1765 {
1766 return Message(sourceLineNumbers, Ids.SameFileIdDifferentSource, "Two different source paths '{1}' and '{2}' were detected for the same file identifier '{0}'. You must either author these under Media elements with different Id attribute values or in different patches.", fileId, sourcePath1, sourcePath2);
1767 }
1768
1769 public static Message SamePatchBaselineId(SourceLineNumber sourceLineNumbers, string id)
1770 {
1771 return Message(sourceLineNumbers, Ids.SamePatchBaselineId, "The PatchBaseline/@Id attribute value '{0}' is a child of multiple Media elements. This prevents transforms from being resolved to distinct media. Change the PatchBaseline/@Id attribute values to be unique.", id);
1772 }
1773
1774 public static Message SchemaValidationFailed(SourceLineNumber sourceLineNumbers, string validationError, int lineNumber, int linePosition)
1775 {
1776 return Message(sourceLineNumbers, Ids.SchemaValidationFailed, "Schema validation failed with the following error at line {1}, column {2}: {0}", validationError, lineNumber, linePosition);
1777 }
1778
1779 public static Message SearchElementRequired(SourceLineNumber sourceLineNumbers, string elementName)
1780 {
1781 return Message(sourceLineNumbers, Ids.SearchElementRequired, "A '{0}' element must have a search element as a child.", elementName);
1782 }
1783
1784 public static Message SearchElementRequiredWithAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
1785 {
1786 return Message(sourceLineNumbers, Ids.SearchElementRequiredWithAttribute, "A {0} element must have a search element as a child when the {0}/@{1} attribute has the value '{2}'.", elementName, attributeName, attributeValue);
1787 }
1788
1789 public static Message SearchPropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1790 {
1791 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);
1792 }
1793
1794 public static Message SecurePropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string propertyId)
1795 {
1796 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);
1797 }
1798
1799 public static Message SignedEmbeddedCabinet(SourceLineNumber sourceLineNumbers)
1800 {
1801 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'.");
1802 }
1803
1804 public static Message SingleExtensionSupported()
1805 {
1806 return Message(null, Ids.SingleExtensionSupported, "Multiple extensions were specified on the command line, only a single extension is supported.");
1807 }
1808
1809 public static Message SpecifiedBinderNotFound(string binderClass)
1810 {
1811 return Message(null, Ids.SpecifiedBinderNotFound, "The specified binder class '{0}' was not found in any extensions.", binderClass);
1812 }
1813
1814 public static Message SplitCabinetCopyRegistrationFailed(string newCabName, string firstCabName)
1815 { 422 {
1816 return Message(null, Ids.SplitCabinetCopyRegistrationFailed, "Failed to register the copy command for cabinet '{0}' formed by splitting cabinet '{1}'.", newCabName, firstCabName); 423 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);
1817 } 424 }
1818 425
1819 public static Message SplitCabinetNameCollision(string newCabName, string firstCabName) 426 public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string tableName, string streamName, int streamLength)
1820 { 427 {
1821 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); 428 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);
1822 } 429 }
1823 430
1824 public static Message StandardActionRelativelyScheduledInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) 431 public static Message UnableToConvertFieldToNumber(string value)
1825 { 432 {
1826 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); 433 return Message(null, Ids.UnableToConvertFieldToNumber, "Unable to convert intermediate symbol field value '{0}' to a number. This means the intermediate is corrupt or of an unsupported version.", value);
1827 } 434 }
1828 435
1829 public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length, int maximumLength) 436 public static Message UnexpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
1830 { 437 {
1831 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); 438 return Message(sourceLineNumbers, Ids.UnexpectedAttribute, "The {0} element contains an unexpected attribute '{1}'.", elementName, attributeName);
1832 } 439 }
1833 440
1834 public static Message StreamNameTooLong(SourceLineNumber sourceLineNumbers, string tableName, string streamName, int streamLength) 441 public static Message UnexpectedElement(SourceLineNumber sourceLineNumbers, string elementName, string childElementName)
1835 { 442 {
1836 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); 443 return Message(sourceLineNumbers, Ids.UnexpectedElement, "The {0} element contains an unexpected child element '{1}'.", elementName, childElementName);
1837 } 444 }
1838 445
1839 public static Message StubMissingWixburnSection(string filename) 446 public static Message UnexpectedException(Exception exception)
1840 { 447 {
1841 return Message(null, Ids.StubMissingWixburnSection, "Stub executable '{0}' does not contain a .wixburn data section.", filename); 448 return Message(null, Ids.UnexpectedException, exception.ToString());
1842 } 449 }
1843 450
1844 public static Message StubWixburnSectionTooSmall(string filename) 451 public static Message UnexpectedException(string message, string type, string stackTrace)
1845 { 452 {
1846 return Message(null, Ids.StubWixburnSectionTooSmall, "Stub executable '{0}' .wixburn data section is too small to store the Burn container header.", filename); 453 return Message(null, Ids.UnexpectedException, "{0}\r\n\r\nException Type: {1}\r\n\r\nStack Trace:\r\n{2}", message, type, stackTrace);
1847 } 454 }
1848 455
1849 public static Message SuppressNonoverridableAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName) 456 public static Message UnexpectedFileFormat(string path, string expectedFormat, string actualFormat)
1850 { 457 {
1851 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); 458 return Message(null, Ids.UnexpectedFileFormat, "Unexpected file format loaded from path: {0}. The file was expected to be a {1} but was actually: {2}. Ensure the correct path was provided.", path, expectedFormat.ToLowerInvariant(), actualFormat.ToLowerInvariant());
1852 } 459 }
1853 460
1854 public static Message SuppressNonoverridableAction2(SourceLineNumber sourceLineNumbers) 461 public static Message UnsupportedPlatformForElement(SourceLineNumber sourceLineNumbers, string platform, string elementName)
1855 { 462 {
1856 return Message(sourceLineNumbers, Ids.SuppressNonoverridableAction2, "The location of the non-overridable definition of the action related to previous error."); 463 return Message(sourceLineNumbers, Ids.UnsupportedPlatformForElement, "The element {1} does not support platform '{0}'. Consider removing the element or using the preprocessor to conditionally include the element based on the platform.", platform, elementName);
1857 } 464 }
1858 465
1859 public static Message TabbableControlNotAllowedInBillboard(SourceLineNumber sourceLineNumbers, string elementName, string controlType) 466 public static Message VersionMismatch(SourceLineNumber sourceLineNumbers, string fileType, string version, string expectedVersion)
1860 { 467 {
1861 return Message(sourceLineNumbers, Ids.TabbableControlNotAllowedInBillboard, "A {0} element was specified with Type='{1}' and TabSkip='no'. Tabbable controls are not allowed in Billboards.", elementName, controlType); 468 return Message(sourceLineNumbers, Ids.VersionMismatch, "The {0} file format version {1} is not compatible with the expected {0} file format version {2}.", fileType, version, expectedVersion);
1862 } 469 }
1863 470
1864 public static Message TableDecompilationUnimplemented(string tableName) 471 public static Message UnknownSymbolType(string symbolName)
1865 { 472 {
1866 return Message(null, Ids.TableDecompilationUnimplemented, "Decompilation of the {0} table has not been implemented by its extension.", tableName); 473 return Message(null, Ids.UnknownSymbolType, "Could not deserialize symbol of type type '{0}' because it is not a standard symbol type or one provided by a loaded extension.", symbolName);
1867 } 474 }
1868 475
1869 public static Message TableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value) 476 public static Message IllegalAttributeWhenNested(SourceLineNumber sourceLineNumbers, string attributeName)
1870 { 477 {
1871 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); 478 return Message(sourceLineNumbers, Ids.IllegalAttributeWhenNested, "The File element contains an attribute '{0}' that cannot be used in a File element that is a child of a Component element.", attributeName);
1872 } 479 }
1873 480
1874 public static Message TooDeeplyIncluded(SourceLineNumber sourceLineNumbers, int depth) 481 public static Message CommandLineCommandRequired()
1875 { 482 {
1876 return Message(sourceLineNumbers, Ids.TooDeeplyIncluded, "Include files cannot be nested more deeply than {0} times. Make sure included files don't accidentally include themselves.", depth); 483 return Message(null, Ids.CommandLineCommandRequired, "A command is required. Add -h for list of available subcommands.");
1877 } 484 }
1878 485
1879 public static Message TooManyChildren(SourceLineNumber sourceLineNumbers, string elementName, string childElementName) 486 public static Message CommandLineCommandRequired(string command)
1880 { 487 {
1881 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); 488 return Message(null, Ids.CommandLineCommandRequired, "A subcommand is required for the \"{0}\" command. Add -h for list of available commands.", command);
1882 } 489 }
1883 490
1884 public static Message TooManyColumnsInRealTable(string tableName, int columnCount, int supportedColumnCount) 491 public static Message CubeFileNotFound(string cubeFile)
1885 { 492 {
1886 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); 493 return Message(null, Ids.CubeFileNotFound, "The cube file '{0}' cannot be found. This file is required for MSI validation.", cubeFile);
1887 } 494 }
1888 495
1889 public static Message TooManyElements(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, int expectedInstances) 496 public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)
1890 { 497 {
1891 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); 498 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);
1892 } 499 }
1893 500
1894 public static Message TooManySearchElements(SourceLineNumber sourceLineNumbers, string elementName) 501 public static Message FilePathRequired(string filePurpose)
1895 { 502 {
1896 return Message(sourceLineNumbers, Ids.TooManySearchElements, "Only one search element can appear under a '{0}' element.", elementName); 503 return Message(null, Ids.FilePathRequired, "The path to the {0} is required.", filePurpose);
1897 } 504 }
1898 505
1899 public static Message TransformSchemaMismatch() 506 public static Message FilePathRequired(string parameter, string filePurpose)
1900 { 507 {
1901 return Message(null, Ids.TransformSchemaMismatch, "The transform schema does not match the database schema. The transform may have been generated from a different database."); 508 return Message(null, Ids.FilePathRequired, "The parameter '{0}' must be followed by a file path for the {1}.", parameter, filePurpose);
1902 } 509 }
1903 510
1904 public static Message TypeSpecificationForExtensionRequired(string parameter) 511 public static Message IdentifierNotFound(string type, string identifier)
1905 { 512 {
1906 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); 513 return Message(null, Ids.IdentifierNotFound, "An expected identifier ('{1}', of type '{0}') was not found.", type, identifier);
1907 } 514 }
1908 515
1909 public static Message UnableToGetAuthenticodeCertOfFile(string filePath, string moreInformation) 516 public static Message IllegalCharactersInPath(string pathName)
1910 { 517 {
1911 return Message(null, Ids.UnableToGetAuthenticodeCertOfFile, "Unable to get the authenticode certificate of '{0}'. More information: {1}", filePath, moreInformation); 518 return Message(null, Ids.IllegalCharactersInPath, "Illegal characters in path '{0}'. Ensure you provided a valid path to the file.", pathName);
1912 } 519 }
1913 520
1914 public static Message UnableToGetAuthenticodeCertOfFileDownlevelOS(string filePath, string moreInformation) 521 public static Message IllegalCodepage(int codepage)
1915 { 522 {
1916 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); 523 return Message(null, Ids.IllegalCodepage, "The code page '{0}' is not a valid Windows code page. Update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
1917 } 524 }
1918 525
1919 public static Message UnableToConvertFieldToNumber(string value) 526 public static Message IllegalCodepage(SourceLineNumber sourceLineNumbers, int codepage)
1920 { 527 {
1921 return Message(null, Ids.UnableToConvertFieldToNumber, "Unable to convert intermediate symbol field value '{0}' to a number. This means the intermediate is corrupt or of an unsupported version.", value); 528 return Message(sourceLineNumbers, Ids.IllegalCodepage, "The code page '{0}' is not a valid Windows code page. Update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
1922 } 529 }
1923 530
1924 public static Message UnableToOpenModule(SourceLineNumber sourceLineNumbers, string modulePath, string message) 531 public static Message IllegalCommandLineArgumentValue(string arg, string value, IEnumerable<string> validValues)
1925 { 532 {
1926 return Message(sourceLineNumbers, Ids.UnableToOpenModule, "Unable to open merge module '{0}'. Check to make sure the module language is correct. '{1}'", modulePath, message); 533 var combinedValidValues = String.Join(", ", validValues);
534 return Message(null, Ids.IllegalCommandLineArgumentValue, "The argument {0} value '{1}' is invalid. Use one of the following values {2}", arg, value, combinedValidValues);
1927 } 535 }
1928 536
1929 public static Message UnableToReadPackageInformation(SourceLineNumber sourceLineNumbers, string packagePath, string detailedErrorMessage) 537 public static Message IllegalEnvironmentVariable(string environmentVariable, string value)
1930 { 538 {
1931 return Message(sourceLineNumbers, Ids.UnableToReadPackageInformation, "Unable to read package '{0}'. {1}", packagePath, detailedErrorMessage); 539 return Message(null, Ids.IllegalEnvironmentVariable, "The {0} environment variable is set to an invalid value of '{1}'.", environmentVariable, value);
1932 } 540 }
1933 541
1934 public static Message UnauthorizedAccess(string filePath) 542 public static Message IllegalGuidValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1935 { 543 {
1936 return Message(null, Ids.UnauthorizedAccess, "Access to the path '{0}' is denied.", filePath); 544 return Message(sourceLineNumbers, Ids.IllegalGuidValue, "The {0}/@{1} attribute's value, '{2}', is not a legal guid value.", elementName, attributeName, value);
1937 } 545 }
1938 546
1939 public static Message UndefinedPreprocessorFunction(SourceLineNumber sourceLineNumbers, string variableName) 547 public static Message IllegalVersionValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
1940 { 548 {
1941 return Message(sourceLineNumbers, Ids.UndefinedPreprocessorFunction, "Undefined preprocessor function '$({0})'.", variableName); 549 return Message(sourceLineNumbers, Ids.IllegalVersionValue, "The {0}/@{1} attribute's value, '{2}', is not a valid version. Specify a four-part version or semantic version, such as '#.#.#.#' or '#.#.#-label.#'.", elementName, attributeName, value);
1942 } 550 }
1943 551
1944 public static Message UndefinedPreprocessorVariable(SourceLineNumber sourceLineNumbers, string variableName) 552 public static Message InvalidFileName(SourceLineNumber sourceLineNumbers, string fileName)
1945 { 553 {
1946 return Message(sourceLineNumbers, Ids.UndefinedPreprocessorVariable, "Undefined preprocessor variable '$({0})'.", variableName); 554 return Message(sourceLineNumbers, Ids.InvalidFileName, "Invalid file name '{0}'.", fileName);
1947 } 555 }
1948 556
1949 public static Message UnexpectedAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) 557 public static Message InvalidIdt(SourceLineNumber sourceLineNumbers, string idtFile)
1950 { 558 {
1951 return Message(sourceLineNumbers, Ids.UnexpectedAttribute, "The {0} element contains an unexpected attribute '{1}'.", elementName, attributeName); 559 return Message(sourceLineNumbers, Ids.InvalidIdt, "There was an error importing the file '{0}'.", idtFile);
1952 } 560 }
1953 561
1954 public static Message UnexpectedColumnCount(SourceLineNumber sourceLineNumbers, string tableName) 562 public static Message InvalidIdt(SourceLineNumber sourceLineNumbers, string idtFile, string tableName)
1955 { 563 {
1956 return Message(sourceLineNumbers, Ids.UnexpectedColumnCount, "A parsed row has more fields that contain data for table '{0}' than are defined. This is potentially because a standard table is being redefined as a custom table or is based on an older table schema.", tableName); 564 return Message(sourceLineNumbers, Ids.InvalidIdt, "There was an error importing table '{1}' from file '{0}'.", idtFile, tableName);
1957 } 565 }
1958 566
1959 public static Message UnexpectedContentNode(SourceLineNumber sourceLineNumbers, string elementName, string unexpectedNodeType) 567 public static Message InvalidValidatorMessageType(string type)
1960 { 568 {
1961 return Message(sourceLineNumbers, Ids.UnexpectedContentNode, "The {0} element contains an unexpected xml node of type {1}.", elementName, unexpectedNodeType); 569 return Message(null, Ids.InvalidValidatorMessageType, "Unknown validation message type '{0}'.", type);
1962 } 570 }
1963 571
1964 public static Message UnexpectedCustomTableColumn(SourceLineNumber sourceLineNumbers, string column) 572 public static Message InvalidXml(SourceLineNumber sourceLineNumbers, string fileType, string detail)
1965 { 573 {
1966 return Message(sourceLineNumbers, Ids.UnexpectedCustomTableColumn, "The custom table column '{0}' is unknown.", column); 574 return Message(sourceLineNumbers, Ids.InvalidXml, "Not a valid {0} file; detail: {1}", fileType, detail);
1967 } 575 }
1968 576
1969 public static Message UnexpectedElement(SourceLineNumber sourceLineNumbers, string elementName, string childElementName) 577 public static Message MissingTableDefinition(string tableName)
1970 { 578 {
1971 return Message(sourceLineNumbers, Ids.UnexpectedElement, "The {0} element contains an unexpected child element '{1}'.", elementName, childElementName); 579 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);
1972 } 580 }
1973 581
1974 public static Message UnexpectedElementWithAttribute(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, string attribute) 582 public static Message UnexpectedElementWithAttribute(SourceLineNumber sourceLineNumbers, string elementName, string childElementName, string attribute)
@@ -1991,21 +599,6 @@ namespace WixToolset.Data
1991 return Message(sourceLineNumbers, Ids.UnexpectedElementWithAttributeValue, "The {0} element cannot have a child element '{1}' unless attribute '{2}' is set to '{3}' or '{4}'.", elementName, childElementName, attribute, attributeValue1, attributeValue2); 599 return Message(sourceLineNumbers, Ids.UnexpectedElementWithAttributeValue, "The {0} element cannot have a child element '{1}' unless attribute '{2}' is set to '{3}' or '{4}'.", elementName, childElementName, attribute, attributeValue1, attributeValue2);
1992 } 600 }
1993 601
1994 public static Message UnexpectedEmptySubexpression(SourceLineNumber sourceLineNumbers, string expression)
1995 {
1996 return Message(sourceLineNumbers, Ids.UnexpectedEmptySubexpression, "The empty subexpression is unexpected in the expression '{0}'.", expression);
1997 }
1998
1999 public static Message UnexpectedException(Exception exception)
2000 {
2001 return Message(null, Ids.UnexpectedException, exception.ToString());
2002 }
2003
2004 public static Message UnexpectedException(string message, string type, string stackTrace)
2005 {
2006 return Message(null, Ids.UnexpectedException, "{0}\r\n\r\nException Type: {1}\r\n\r\nStack Trace:\r\n{2}", message, type, stackTrace);
2007 }
2008
2009 public static Message UnexpectedExternalUIMessage(string message) 602 public static Message UnexpectedExternalUIMessage(string message)
2010 { 603 {
2011 return Message(null, Ids.UnexpectedExternalUIMessage, "Error executing unknown ICE action. The following string format was not expected by the external UI message logger: \"{0}\".", message); 604 return Message(null, Ids.UnexpectedExternalUIMessage, "Error executing unknown ICE action. The following string format was not expected by the external UI message logger: \"{0}\".", message);
@@ -2016,116 +609,6 @@ namespace WixToolset.Data
2016 return Message(null, Ids.UnexpectedExternalUIMessage, "Error executing ICE action '{1}'. The following string format was not expected by the external UI message logger: \"{0}\".", message, action); 609 return Message(null, Ids.UnexpectedExternalUIMessage, "Error executing ICE action '{1}'. The following string format was not expected by the external UI message logger: \"{0}\".", message, action);
2017 } 610 }
2018 611
2019 public static Message UnexpectedFileExtension(string fileName, string expectedExtensions)
2020 {
2021 return Message(null, Ids.UnexpectedFileExtension, "The file '{0}' has an unexpected extension. Expected one of the following: '{1}'.", fileName, expectedExtensions);
2022 }
2023
2024 public static Message UnexpectedFileFormat(string path, string expectedFormat, string actualFormat)
2025 {
2026 return Message(null, Ids.UnexpectedFileFormat, "Unexpected file format loaded from path: {0}. The file was expected to be a {1} but was actually: {2}. Ensure the correct path was provided.", path, expectedFormat.ToLowerInvariant(), actualFormat.ToLowerInvariant());
2027 }
2028
2029 public static Message UnexpectedGroupChild(string parentType, string parentId, string childType, string childId)
2030 {
2031 return Message(null, Ids.UnexpectedGroupChild, "A group parent ('{0}'/'{1}') had an unexpected child ('{2}'/'{3}').", parentType, parentId, childType, childId);
2032 }
2033
2034 public static Message UnexpectedLiteral(SourceLineNumber sourceLineNumbers, string expression)
2035 {
2036 return Message(sourceLineNumbers, Ids.UnexpectedLiteral, "An unexpected literal was found in the expression '{0}'.", expression);
2037 }
2038
2039 public static Message UnexpectedPreprocessorOperator(SourceLineNumber sourceLineNumbers, string op)
2040 {
2041 return Message(sourceLineNumbers, Ids.UnexpectedPreprocessorOperator, "The operator '{0}' is unexpected.", op);
2042 }
2043
2044 public static Message UnexpectedTableInMergeModule(SourceLineNumber sourceLineNumbers, string tableName)
2045 {
2046 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);
2047 }
2048
2049 public static Message UnexpectedTableInPatch(SourceLineNumber sourceLineNumbers, string tableName)
2050 {
2051 return Message(sourceLineNumbers, Ids.UnexpectedTableInPatch, "An unexpected row in the '{0}' table was found in this patch. Patches cannot contain the '{0}' table.", tableName);
2052 }
2053
2054 public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace)
2055 {
2056 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);
2057 }
2058
2059 public static Message UnhandledExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName, string extensionNamespace)
2060 {
2061 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);
2062 }
2063
2064 public static Message UniqueFileSearchIdRequired(SourceLineNumber sourceLineNumbers, string id, string elementName)
2065 {
2066 return Message(sourceLineNumbers, Ids.UniqueFileSearchIdRequired, "The DirectorySearch element '{0}' requires that the child {1} element has a unique Id when the DirectorySearch/@AssignToProperty attribute is set to 'yes'.", id, elementName);
2067 }
2068
2069 public static Message UnknownCustomTableColumnType(SourceLineNumber sourceLineNumbers, string columnType)
2070 {
2071 return Message(sourceLineNumbers, Ids.UnknownCustomTableColumnType, "Encountered an unknown custom table column type '{0}'.", columnType);
2072 }
2073
2074 public static Message UnmatchedParenthesisInExpression(SourceLineNumber sourceLineNumbers, string expression)
2075 {
2076 return Message(sourceLineNumbers, Ids.UnmatchedParenthesisInExpression, "The parenthesis don't match in the expression '{0}'.", expression);
2077 }
2078
2079 public static Message UnmatchedPreprocessorInstruction(SourceLineNumber sourceLineNumbers, string beginInstruction, string endInstruction)
2080 {
2081 return Message(sourceLineNumbers, Ids.UnmatchedPreprocessorInstruction, "Found a <?{1}?> processing instruction without a matching <?{0}?> before it.", beginInstruction, endInstruction);
2082 }
2083
2084 public static Message UnmatchedQuotesInExpression(SourceLineNumber sourceLineNumbers, string expression)
2085 {
2086 return Message(sourceLineNumbers, Ids.UnmatchedQuotesInExpression, "The quotes don't match in the expression '{0}'.", expression);
2087 }
2088
2089 public static Message UnresolvedBindReference(SourceLineNumber sourceLineNumbers, string BindRef)
2090 {
2091 return Message(sourceLineNumbers, Ids.UnresolvedBindReference, "Unresolved bind-time variable {0}.", BindRef);
2092 }
2093
2094 public static Message UnresolvedReference(SourceLineNumber sourceLineNumbers, string symbolName)
2095 {
2096 return Message(sourceLineNumbers, Ids.UnresolvedReference, "The identifier '{0}' could not be found. Ensure you have typed the reference correctly and that all the necessary inputs are provided to the linker.", symbolName);
2097 }
2098
2099 public static Message UnresolvedReference(SourceLineNumber sourceLineNumbers, string symbolName, WixToolset.Data.AccessModifier accessModifier)
2100 {
2101 return Message(sourceLineNumbers, Ids.UnresolvedReference, "The identifier '{0}' is inaccessible due to its protection level.", symbolName, accessModifier);
2102 }
2103
2104 public static Message UnsupportedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string value)
2105 {
2106 return Message(sourceLineNumbers, Ids.UnsupportedAllUsersValue, "The MSI '{0}' set the ALLUSERS Property to '{0}' which is not supported. Remove the Property with Id='ALLUSERS' and use Package/@Scope attribute instead.", path, value);
2107 }
2108
2109 public static Message UnsupportedExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName)
2110 {
2111 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);
2112 }
2113
2114 public static Message UnsupportedExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName)
2115 {
2116 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);
2117 }
2118
2119 public static Message UnsupportedPlatformForElement(SourceLineNumber sourceLineNumbers, string platform, string elementName)
2120 {
2121 return Message(sourceLineNumbers, Ids.UnsupportedPlatformForElement, "The element {1} does not support platform '{0}'. Consider removing the element or using the preprocessor to conditionally include the element based on the platform.", platform, elementName);
2122 }
2123
2124 public static Message ValidationError(SourceLineNumber sourceLineNumbers, string ice, string message)
2125 {
2126 return Message(sourceLineNumbers, Ids.ValidationError, "{0}: {1}", ice, message);
2127 }
2128
2129 public static Message ValidationFailedDueToInvalidPackage() 612 public static Message ValidationFailedDueToInvalidPackage()
2130 { 613 {
2131 return Message(null, Ids.ValidationFailedDueToInvalidPackage, "Failed to open package for validation. The most common cause of this error is validating an x64 package on an x86 system. To fix this error, run validation on an x64 system or disable validation."); 614 return Message(null, Ids.ValidationFailedDueToInvalidPackage, "Failed to open package for validation. The most common cause of this error is validating an x64 package on an x86 system. To fix this error, run validation on an x64 system or disable validation.");
@@ -2146,31 +629,6 @@ namespace WixToolset.Data
2146 return Message(null, Ids.ValidationFailedToOpenDatabase, "Failed to open the database. During validation, this most commonly happens when attempting to open a database using an unsupported code page or a file that is not a valid Windows Installer database. Please use a different code page in Module/@Codepage, Package/@SummaryCodepage, Package/@Codepage, or WixLocalization/@Codepage; or make sure you provide the path to a valid Windows Installer database."); 629 return Message(null, Ids.ValidationFailedToOpenDatabase, "Failed to open the database. During validation, this most commonly happens when attempting to open a database using an unsupported code page or a file that is not a valid Windows Installer database. Please use a different code page in Module/@Codepage, Package/@SummaryCodepage, Package/@Codepage, or WixLocalization/@Codepage; or make sure you provide the path to a valid Windows Installer database.");
2147 } 630 }
2148 631
2149 public static Message ValueAndMaskMustBeSameLength(SourceLineNumber sourceLineNumbers)
2150 {
2151 return Message(sourceLineNumbers, Ids.ValueAndMaskMustBeSameLength, "The FileTypeMask/@Value and FileTypeMask/@Mask attributes must be the same length.");
2152 }
2153
2154 public static Message ValueNotSupported(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
2155 {
2156 return Message(sourceLineNumbers, Ids.ValueNotSupported, "The {0}/@{1} attribute's value, '{2}, is not supported by the Windows Installer.", elementName, attributeName, attributeValue);
2157 }
2158
2159 public static Message VariableDeclarationCollision(SourceLineNumber sourceLineNumbers, string variableName, string variableValue, string variableCollidingValue)
2160 {
2161 return Message(sourceLineNumbers, Ids.VariableDeclarationCollision, "The variable '{0}' with value '{1}' was previously declared with value '{2}'.", variableName, variableValue, variableCollidingValue);
2162 }
2163
2164 public static Message VersionIndependentProgIdsCannotHaveIcons(SourceLineNumber sourceLineNumbers)
2165 {
2166 return Message(sourceLineNumbers, Ids.VersionIndependentProgIdsCannotHaveIcons, "Version independent ProgIds cannot have Icons. Remove the Icon and/or IconIndex attributes from your ProgId element.");
2167 }
2168
2169 public static Message VersionMismatch(SourceLineNumber sourceLineNumbers, string fileType, string version, string expectedVersion)
2170 {
2171 return Message(sourceLineNumbers, Ids.VersionMismatch, "The {0} file format version {1} is not compatible with the expected {0} file format version {2}.", fileType, version, expectedVersion);
2172 }
2173
2174 public static Message Win32Exception(int nativeErrorCode, string message) 632 public static Message Win32Exception(int nativeErrorCode, string message)
2175 { 633 {
2176 return Message(null, Ids.Win32Exception, "An unexpected Win32 exception with error code 0x{0:X} occurred: {1}", nativeErrorCode, message); 634 return Message(null, Ids.Win32Exception, "An unexpected Win32 exception with error code 0x{0:X} occurred: {1}", nativeErrorCode, message);
@@ -2181,66 +639,6 @@ namespace WixToolset.Data
2181 return Message(null, Ids.Win32Exception, "An unexpected Win32 exception with error code 0x{0:X} occurred while accessing file '{1}': {2}", nativeErrorCode, file, message); 639 return Message(null, Ids.Win32Exception, "An unexpected Win32 exception with error code 0x{0:X} occurred while accessing file '{1}': {2}", nativeErrorCode, file, message);
2182 } 640 }
2183 641
2184 public static Message WixFileNotFound(string file)
2185 {
2186 return Message(null, Ids.WixFileNotFound, "The file '{0}' cannot be found.", file);
2187 }
2188
2189 public static Message BindVariableCollision(SourceLineNumber sourceLineNumbers, string variableId)
2190 {
2191 return Message(sourceLineNumbers, Ids.BindVariableCollision, "The bind variable '{0}' is declared in more than one location. Please remove one of the declarations.", variableId);
2192 }
2193
2194 public static Message BindVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId)
2195 {
2196 return Message(sourceLineNumbers, Ids.BindVariableUnknown, "The bind variable !(wix.{0}) is unknown. Please ensure the variable is declared on the command line for wix.exe, via a WixVariable element, or inline using the syntax !(wix.{0}=some value which doesn't contain parentheses).", variableId);
2197 }
2198
2199 public static Message NoSourceFiles()
2200 {
2201 return Message(null, Ids.NoSourceFiles, "No source files specified.");
2202 }
2203
2204 public static Message WixiplSourceFileIsExclusive()
2205 {
2206 return Message(null, Ids.WixiplSourceFileIsExclusive, "When an intermediate post link source file is specified, it must be the only source file provided.");
2207 }
2208
2209 public static Message IntermediatesMustBeCompiled(string invalidIntermediates)
2210 {
2211 return Message(null, Ids.IntermediatesMustBeCompiled, "Intermediates being linked must have been compiled. Intermediates with these ids were not compiled: {0}", invalidIntermediates);
2212 }
2213
2214 public static Message IntermediatesMustBeResolved(string invalidIntermediate)
2215 {
2216 return Message(null, Ids.IntermediatesMustBeResolved, "Intermediates being bound must have been resolved. This intermediate was not resolved: {0}", invalidIntermediate);
2217 }
2218
2219 public static Message UnknownSymbolType(string symbolName)
2220 {
2221 return Message(null, Ids.UnknownSymbolType, "Could not deserialize symbol of type type '{0}' because it is not a standard symbol type or one provided by a loaded extension.", symbolName);
2222 }
2223
2224 public static Message IllegalInnerText(SourceLineNumber sourceLineNumbers, string elementName, string innerText)
2225 {
2226 return Message(sourceLineNumbers, Ids.IllegalInnerText, "The {0} element contains illegal inner text: '{1}'.", elementName, innerText);
2227 }
2228
2229 public static Message IllegalInnerText(SourceLineNumber sourceLineNumbers, string elementName, string innerText, string attributeName)
2230 {
2231 return Message(sourceLineNumbers, Ids.IllegalInnerText, "The {0} element contains inner text which is obsolete. Use the {1} attribute instead.", elementName, attributeName);
2232 }
2233
2234 public static Message IllegalAttributeWhenNested(SourceLineNumber sourceLineNumbers, string attributeName)
2235 {
2236 return Message(sourceLineNumbers, Ids.IllegalAttributeWhenNested, "The File element contains an attribute '{0}' that cannot be used in a File element that is a child of a Component element.", attributeName);
2237 }
2238
2239 public static Message OverlengthTableNameInProductOrMergeModule(SourceLineNumber sourceLineNumbers, string tableName)
2240 {
2241 return Message(sourceLineNumbers, Ids.OverlengthTableNameInProductOrMergeModule, "The table name '{0}' is invalid because the table name exceeds 31 characters in length. For more information, see: https://learn.microsoft.com/en-au/windows/win32/msi/table-names", tableName);
2242 }
2243
2244 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 642 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
2245 { 643 {
2246 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); 644 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
@@ -2259,385 +657,77 @@ namespace WixToolset.Data
2259 UnexpectedAttribute = 4, 657 UnexpectedAttribute = 4,
2260 UnexpectedElement = 5, 658 UnexpectedElement = 5,
2261 IllegalEmptyAttributeValue = 6, 659 IllegalEmptyAttributeValue = 6,
2262 InsufficientVersion = 7,
2263 IllegalIntegerValue = 8, 660 IllegalIntegerValue = 8,
2264 IllegalGuidValue = 9, 661 IllegalGuidValue = 9,
2265 ExpectedAttribute = 10, 662 ExpectedAttribute = 10,
2266 SecurePropertyNotUppercase = 11,
2267 SearchPropertyNotUppercase = 12,
2268 StreamNameTooLong = 13, 663 StreamNameTooLong = 13,
2269 IllegalIdentifier = 14, 664 IllegalIdentifier = 14,
2270 IllegalYesNoValue = 15, 665 IllegalYesNoValue = 15,
2271 CommandLineCommandRequired = 16, 666 CommandLineCommandRequired = 16,
2272 CabExtractionFailed = 17,
2273 AppIdIncompatibleAdvertiseState = 18,
2274 IllegalAttributeWhenAdvertised = 19,
2275 ConditionExpected = 20,
2276 IllegalAttributeValue = 21, 667 IllegalAttributeValue = 21,
2277 CustomActionMultipleSources = 22,
2278 CustomActionMultipleTargets = 23,
2279 IllegalShortFilename = 26,
2280 IllegalLongFilename = 27, 668 IllegalLongFilename = 27,
2281 TableNameTooLong = 28,
2282 FeatureConfigurableDirectoryNotUppercase = 29,
2283 FeatureCannotFavorAndDisallowAdvertise = 30,
2284 FeatureCannotFollowParentAndFavorLocalOrSource = 31,
2285 MediaEmbeddedCabinetNameTooLong = 32,
2286 RegistrySubElementCannotBeRemoved = 33,
2287 RegistryMultipleValuesWithoutMultiString = 34,
2288 IllegalAttributeWithOtherAttribute = 35, 669 IllegalAttributeWithOtherAttribute = 35,
2289 IllegalAttributeWithOtherAttributes = 36, 670 IllegalAttributeWithOtherAttributes = 36,
2290 IllegalAttributeWithoutOtherAttributes = 37, 671 IllegalAttributeWithoutOtherAttributes = 37,
2291 IllegalAttributeValueWithoutOtherAttribute = 38, 672 IllegalAttributeValueWithoutOtherAttribute = 38,
2292 IntegralValueSentinelCollision = 39, 673 IntegralValueSentinelCollision = 39,
2293 ExampleGuid = 40,
2294 TooManyChildren = 41,
2295 ComponentMultipleKeyPaths = 42,
2296 ExpectedAttributes = 44, 674 ExpectedAttributes = 44,
2297 ExpectedAttributesWithOtherAttribute = 45, 675 ExpectedAttributesWithOtherAttribute = 45,
2298 ExpectedAttributesWithoutOtherAttribute = 46, 676 ExpectedAttributesWithoutOtherAttribute = 46,
2299 MissingTypeLibFile = 47,
2300 InvalidDocumentElement = 48, 677 InvalidDocumentElement = 48,
2301 ExpectedAttributeInElementOrParent = 49, 678 ExpectedAttributeInElementOrParent = 49,
2302 UnauthorizedAccess = 50,
2303 IllegalModuleExclusionLanguageAttributes = 51,
2304 NoFirstControlSpecified = 52,
2305 NoDataForColumn = 53,
2306 ValueAndMaskMustBeSameLength = 54,
2307 TooManySearchElements = 55,
2308 IllegalAttributeExceptOnElement = 56, 679 IllegalAttributeExceptOnElement = 56,
2309 SearchElementRequired = 57,
2310 MultipleIdentifiersFound = 58,
2311 AdvertiseStateMustMatch = 59,
2312 DuplicateContextValue = 60,
2313 RelativePathForRegistryElement = 61,
2314 IllegalAttributeWhenNested = 62, 680 IllegalAttributeWhenNested = 62,
2315 ExpectedElement = 63, 681 ExpectedElement = 63,
2316 RegistryRootInvalid = 64,
2317 IllegalYesNoDefaultValue = 65,
2318 IllegalAttributeInMergeModule = 66,
2319 GenericReadNotAllowed = 67, 682 GenericReadNotAllowed = 67,
2320 IllegalAttributeWithInnerText = 68,
2321 SearchElementRequiredWithAttribute = 69,
2322 CannotAuthorSpecialProperties = 70,
2323 NeedSequenceBeforeOrAfter = 72,
2324 ValueNotSupported = 73,
2325 TabbableControlNotAllowedInBillboard = 74,
2326 CheckBoxValueOnlyValidWithCheckBox = 75,
2327 CabFileDoesNotExist = 76,
2328 RadioButtonTypeInconsistent = 77,
2329 RadioButtonBitmapAndIconDisallowed = 78,
2330 IllegalSuppressWarningId = 79,
2331 PreprocessorIllegalForeachVariable = 80,
2332 PreprocessorMissingParameterPrefix = 81,
2333 PreprocessorExtensionForParameterMissing = 82,
2334 CannotFindFile = 83,
2335 BinderFileManagerMissingFile = 84,
2336 InvalidFileName = 85, 683 InvalidFileName = 85,
2337 ReferenceLoopDetected = 86,
2338 GuidContainsLowercaseLetters = 87,
2339 InvalidDateTimeFormat = 88,
2340 MultipleEntrySections = 89,
2341 MultipleEntrySections2 = 90,
2342 MissingEntrySection = 93,
2343 UnresolvedReference = 94,
2344 MultiplePrimaryReferences = 95,
2345 ComponentReferencedTwice = 96,
2346 DuplicateModuleFileIdentifier = 97,
2347 DuplicateModuleCaseInsensitiveFileIdentifier = 98,
2348 ImplicitComponentKeyPath = 99,
2349 DuplicateLocalizationIdentifier = 100,
2350 LocalizationVariableUnknown = 102,
2351 FileNotFound = 103, 684 FileNotFound = 103,
2352 InvalidXml = 104, 685 InvalidXml = 104,
2353 ProgIdNestedTooDeep = 105,
2354 CanNotHaveTwoParents = 106,
2355 SchemaValidationFailed = 107,
2356 IllegalVersionValue = 108, 686 IllegalVersionValue = 108,
2357 CustomTableNameTooLong = 109,
2358 CustomTableIllegalColumnWidth = 110,
2359 CustomTableMissingPrimaryKey = 111,
2360 TypeSpecificationForExtensionRequired = 113,
2361 FilePathRequired = 114, 687 FilePathRequired = 114,
2362 DirectoryPathRequired = 115,
2363 FileOrDirectoryPathRequired = 116,
2364 PathCannotContainQuote = 117,
2365 AdditionalArgumentUnexpected = 118,
2366 RegistryNameValueIncorrect = 119,
2367 FamilyNameTooLong = 120,
2368 IllegalFamilyName = 121,
2369 IllegalLongValue = 122,
2370 IntegralValueOutOfRange = 123, 688 IntegralValueOutOfRange = 123,
2371 DuplicateExtensionXmlSchemaNamespace = 125,
2372 DuplicateExtensionTable = 126,
2373 DuplicateExtensionPreprocessorType = 127,
2374 FileInUse = 128,
2375 CannotOpenMergeModule = 129,
2376 DuplicatePrimaryKey = 130, 689 DuplicatePrimaryKey = 130,
2377 FileIdentifierNotFound = 131,
2378 InvalidAssemblyFile = 132,
2379 ExpectedEndElement = 133,
2380 IllegalCodepage = 134, 690 IllegalCodepage = 134,
2381 ExpectedMediaCabinet = 135,
2382 InvalidIdt = 136, 691 InvalidIdt = 136,
2383 InvalidSequenceTable = 137,
2384 ExpectedDirectory = 138,
2385 ComponentExpectedFeature = 139,
2386 RecursiveAction = 140,
2387 VersionMismatch = 141, 692 VersionMismatch = 141,
2388 UnexpectedContentNode = 142,
2389 UnexpectedColumnCount = 143,
2390 InvalidExtension = 144,
2391 InvalidSubExpression = 145,
2392 UnmatchedPreprocessorInstruction = 146,
2393 NonterminatedPreprocessorInstruction = 147,
2394 ExpectedExpressionAfterNot = 148,
2395 InvalidPreprocessorVariable = 149,
2396 UndefinedPreprocessorVariable = 150,
2397 IllegalDefineStatement = 151,
2398 VariableDeclarationCollision = 152,
2399 CannotReundefineVariable = 153,
2400 IllegalForeach = 154,
2401 IllegalParentAttributeWhenNested = 155, 693 IllegalParentAttributeWhenNested = 155,
2402 ExpectedEndforeach = 156,
2403 UnmatchedQuotesInExpression = 158,
2404 UnmatchedParenthesisInExpression = 159,
2405 ExpectedVariable = 160,
2406 UnexpectedLiteral = 161,
2407 IllegalIntegerInExpression = 162,
2408 UnexpectedPreprocessorOperator = 163,
2409 UnexpectedEmptySubexpression = 164,
2410 UnexpectedCustomTableColumn = 165,
2411 UnknownCustomTableColumnType = 166,
2412 IllegalFileCompressionAttributes = 167, 694 IllegalFileCompressionAttributes = 167,
2413 OverridableActionCollision = 168,
2414 OverridableActionCollision2 = 169,
2415 ActionCollision = 170,
2416 ActionCollision2 = 171,
2417 SuppressNonoverridableAction = 172,
2418 SuppressNonoverridableAction2 = 173,
2419 CustomActionSequencedInModule = 174,
2420 StandardActionRelativelyScheduledInModule = 175,
2421 ActionCircularDependency = 176,
2422 ActionScheduledRelativeToTerminationAction = 177,
2423 ActionScheduledRelativeToTerminationAction2 = 178,
2424 NoUniqueActionSequenceNumber = 179,
2425 NoUniqueActionSequenceNumber2 = 180,
2426 ActionScheduledRelativeToItself = 181,
2427 MissingTableDefinition = 182, 695 MissingTableDefinition = 182,
2428 UnexpectedTableInMergeModule = 184,
2429 MergeExcludedModule = 186,
2430 MergeFeatureRequired = 187,
2431 MergeLanguageFailed = 188,
2432 MergeLanguageUnsupported = 189,
2433 TableDecompilationUnimplemented = 190,
2434 CannotDefaultMismatchedAdvertiseStates = 191,
2435 VersionIndependentProgIdsCannotHaveIcons = 192,
2436 IllegalAttributeValueWithOtherAttribute = 193, 696 IllegalAttributeValueWithOtherAttribute = 193,
2437 InvalidMergeLanguage = 194,
2438 BindVariableCollision = 195,
2439 ExpectedBindVariableValue = 196,
2440 BindVariableUnknown = 197,
2441 IllegalBindVariablePrefix = 198,
2442 InvalidWixXmlNamespace = 199, 697 InvalidWixXmlNamespace = 199,
2443 UnhandledExtensionElement = 200,
2444 UnhandledExtensionAttribute = 201,
2445 UnsupportedExtensionAttribute = 202,
2446 UnsupportedExtensionElement = 203,
2447 ValidationError = 204,
2448 IllegalRootDirectory = 205,
2449 IllegalTargetDirDefaultDir = 206,
2450 TooManyElements = 207, 698 TooManyElements = 207,
2451 ExpectedBinaryCategory = 208,
2452 RootFeatureCannotFollowParent = 209,
2453 FeatureNameTooLong = 210,
2454 SignedEmbeddedCabinet = 211,
2455 ExpectedSignedCabinetName = 212,
2456 IllegalInlineLocVariable = 213,
2457 MergeModuleExpectedFeature = 215,
2458 Win32Exception = 216, 699 Win32Exception = 216,
2459 UnexpectedExternalUIMessage = 217, 700 UnexpectedExternalUIMessage = 217,
2460 IllegalCabbingThreadCount = 218,
2461 IllegalEnvironmentVariable = 219, 701 IllegalEnvironmentVariable = 219,
2462 InvalidKeyColumn = 220,
2463 CollidingModularizationTypes = 221, 702 CollidingModularizationTypes = 221,
2464 CubeFileNotFound = 222, 703 CubeFileNotFound = 222,
2465 OutputTypeMismatch = 224,
2466 RealTableMissingPrimaryKeyColumn = 225, 704 RealTableMissingPrimaryKeyColumn = 225,
2467 IllegalColumnName = 226,
2468 NoDifferencesInTransform = 227,
2469 OutputCodepageMismatch = 228,
2470 OutputCodepageMismatch2 = 229,
2471 IllegalComponentWithAutoGeneratedGuid = 230, 705 IllegalComponentWithAutoGeneratedGuid = 230,
2472 IllegalPathForGeneratedComponentGuid = 231,
2473 IllegalTerminalServerCustomActionAttributes = 232,
2474 IllegalPropertyCustomActionAttributes = 233,
2475 InvalidPreprocessorFunction = 234,
2476 UndefinedPreprocessorFunction = 235,
2477 PreprocessorExtensionEvaluateFunctionFailed = 236,
2478 PreprocessorExtensionGetVariableValueFailed = 237,
2479 InvalidManifestContent = 238,
2480 InvalidWixTransform = 239,
2481 UnexpectedFileExtension = 240,
2482 UnexpectedTableInPatch = 241,
2483 InvalidKeypathChange = 243,
2484 MissingValidatorExtension = 244,
2485 InvalidValidatorMessageType = 245, 706 InvalidValidatorMessageType = 245,
2486 PatchWithoutTransforms = 246,
2487 SingleExtensionSupported = 247,
2488 DuplicateTransform = 248,
2489 BaselineRequired = 249,
2490 PreprocessorError = 250,
2491 ExpectedArgument = 251,
2492 PatchWithoutValidTransforms = 252,
2493 ExpectedDecompiler = 253,
2494 ExpectedTableInMergeModule = 254,
2495 UnexpectedElementWithAttributeValue = 255, 707 UnexpectedElementWithAttributeValue = 255,
2496 ExpectedPatchIdInWixMsp = 256,
2497 ExpectedMediaRowsInWixMsp = 257,
2498 WixFileNotFound = 258,
2499 ExpectedClientPatchIdInWixMsp = 259,
2500 NewRowAddedInTable = 260,
2501 PatchNotRemovable = 261,
2502 PathTooLong = 262,
2503 FileTooLarge = 263,
2504 InvalidPlatformParameter = 264, 708 InvalidPlatformParameter = 264,
2505 InvalidPlatformValue = 265,
2506 IllegalValidationArguments = 266,
2507 OrphanedComponent = 267,
2508 IllegalCommandLineArgumentValue = 268, 709 IllegalCommandLineArgumentValue = 268,
2509 ProductCodeInvalidForTransform = 269,
2510 InsertInvalidSequenceActionOrder = 270,
2511 InsertSequenceNoSpace = 271,
2512 MissingManifestForWin32Assembly = 272,
2513 UnableToOpenModule = 273,
2514 ExpectedAttributeWhenElementNotUnderElement = 274, 710 ExpectedAttributeWhenElementNotUnderElement = 274,
2515 IllegalIdentifierLooksLikeFormatted = 275,
2516 IllegalCodepageAttribute = 276,
2517 IllegalCompressionLevel = 277,
2518 TransformSchemaMismatch = 278,
2519 DatabaseSchemaMismatch = 279,
2520 ExpectedDirectoryGotFile = 280,
2521 ExpectedFileGotDirectory = 281,
2522 GacAssemblyNoStrongName = 282,
2523 FileWriteError = 283,
2524 InvalidCommandLineFileName = 284,
2525 ExpectedParentWithAttribute = 285, 711 ExpectedParentWithAttribute = 285,
2526 IllegalWarningIdAsError = 286,
2527 ExpectedAttributeOrElement = 287,
2528 DuplicateVariableDefinition = 288,
2529 InvalidVariableDefinition = 289,
2530 DuplicateCabinetName = 290,
2531 DuplicateCabinetName2 = 291,
2532 InvalidAddedFileRowWithoutSequence = 292,
2533 DuplicateFileId = 293,
2534 FullTempDirectory = 294,
2535 CreateCabAddFileFailed = 296,
2536 CreateCabInsufficientDiskSpace = 297,
2537 UnresolvedBindReference = 298,
2538 GACAssemblyIdentityWarning = 299,
2539 IllegalCharactersInPath = 300, 712 IllegalCharactersInPath = 300,
2540 ValidationFailedToOpenDatabase = 301, 713 ValidationFailedToOpenDatabase = 301,
2541 MustSpecifyOutputWithMoreThanOneInput = 302,
2542 IllegalSearchIdForParentDepth = 303,
2543 IdentifierTooLongError = 304, 714 IdentifierTooLongError = 304,
2544 InvalidRemoveComponent = 305,
2545 FinishCabFailed = 306,
2546 InvalidExtensionType = 307,
2547 ValidationFailedDueToMultilanguageMergeModule = 309, 715 ValidationFailedDueToMultilanguageMergeModule = 309,
2548 ValidationFailedDueToInvalidPackage = 310, 716 ValidationFailedDueToInvalidPackage = 310,
2549 InvalidStringForCodepage = 311,
2550 InvalidEmbeddedUIFileName = 312,
2551 UniqueFileSearchIdRequired = 313,
2552 IllegalAttributeValueWhenNested = 314, 717 IllegalAttributeValueWhenNested = 314,
2553 AdminImageRequired = 315,
2554 SamePatchBaselineId = 316,
2555 SameFileIdDifferentSource = 317,
2556 HarvestSourceNotSpecified = 318,
2557 OutputTargetNotSpecified = 319,
2558 BothUpgradeCodesRequired = 322,
2559 IllegalBinderClassName = 323,
2560 SpecifiedBinderNotFound = 324,
2561 UnableToGetAuthenticodeCertOfFile = 327,
2562 UnableToGetAuthenticodeCertOfFileDownlevelOS = 328,
2563 ReadOnlyOutputFile = 329,
2564 CannotDefaultComponentId = 330,
2565 ParentElementAttributeRequired = 331,
2566 PreprocessorExtensionPragmaFailed = 333,
2567 InvalidPreprocessorPragma = 334,
2568 InvalidStubExe = 338,
2569 StubMissingWixburnSection = 339,
2570 StubWixburnSectionTooSmall = 340,
2571 MissingBundleInformation = 341,
2572 UnexpectedGroupChild = 342,
2573 OrderingReferenceLoopDetected = 343,
2574 IdentifierNotFound = 344, 718 IdentifierNotFound = 344,
2575 MergePlatformMismatch = 345,
2576 IllegalRelativeLongFilename = 346, 719 IllegalRelativeLongFilename = 346,
2577 IllegalAttributeValueWithLegalList = 347, 720 IllegalAttributeValueWithLegalList = 347,
2578 IllegalAttributeValueWithIllegalList = 348,
2579 InvalidSummaryInfoCodePage = 349,
2580 ValidationFailedDueToLowMsiEngine = 350, 721 ValidationFailedDueToLowMsiEngine = 350,
2581 DuplicateSourcesForOutput = 351,
2582 UnableToReadPackageInformation = 352,
2583 MultipleFilesMatchedWithOutputSpecification = 353,
2584 InvalidBundle = 354,
2585 BundleTooNew = 355,
2586 MediaTableCollision = 357,
2587 InvalidCabinetTemplate = 358,
2588 MaximumUncompressedMediaSizeTooLarge = 359,
2589 ReservedNamespaceViolation = 362,
2590 PerUserButAllUsersEquals1 = 363,
2591 UnsupportedAllUsersValue = 364,
2592 DisallowedMsiProperty = 365,
2593 MissingOrInvalidModuleInstallerVersion = 366,
2594 IllegalGeneratedGuidComponentUnversionedKeypath = 367,
2595 IllegalGeneratedGuidComponentVersionedNonkeypath = 368,
2596 DuplicateComponentGuids = 369,
2597 DuplicateProviderDependencyKey = 370,
2598 MissingDependencyVersion = 371,
2599 UnexpectedElementWithAttribute = 372, 722 UnexpectedElementWithAttribute = 372,
2600 ExpectedAttributeWithElement = 373,
2601 DuplicatedUiLocalization = 374,
2602 MaximumCabinetSizeForLargeFileSplittingTooLarge = 375,
2603 SplitCabinetCopyRegistrationFailed = 376,
2604 SplitCabinetNameCollision = 377,
2605 InvalidPreprocessorFunctionAutoVersion = 379,
2606 InvalidFourPartVersion = 380,
2607 UnsupportedPlatformForElement = 381, 723 UnsupportedPlatformForElement = 381,
2608 MissingMedia = 382,
2609 IllegalYesNoAlwaysValue = 384,
2610 TooDeeplyIncluded = 385,
2611 TooManyColumnsInRealTable = 386,
2612 InlineDirectorySyntaxRequiresPath = 387,
2613 InsecureBundleFilename = 388,
2614 PayloadMustBeRelativeToCache = 389, 724 PayloadMustBeRelativeToCache = 389,
2615 MsiTransactionX86BeforeX64Package = 390,
2616 NoSourceFiles = 391,
2617 WixiplSourceFileIsExclusive = 392,
2618 UnableToConvertFieldToNumber = 393, 725 UnableToConvertFieldToNumber = 393,
2619 CouldNotDetermineProductCodeFromTransformSummaryInfo = 394,
2620 IntermediatesMustBeCompiled = 395,
2621 IntermediatesMustBeResolved = 396,
2622 MissingBundleSearch = 397,
2623 CircularSearchReference = 398,
2624 UnknownSymbolType = 399, 726 UnknownSymbolType = 399,
2625 IllegalInnerText = 400,
2626 ExpectedAttributeWithValueWithOtherAttribute = 401, 727 ExpectedAttributeWithValueWithOtherAttribute = 401,
2627 PackagePayloadUnsupported = 402,
2628 PackagePayloadUnsupported2 = 403,
2629 MultiplePackagePayloads = 404,
2630 MultiplePackagePayloads2 = 405,
2631 MultiplePackagePayloads3 = 406,
2632 MissingPackagePayload = 407,
2633 ExpectedAttributeWithoutOtherAttributes = 408, 728 ExpectedAttributeWithoutOtherAttributes = 408,
2634 InvalidBundleCondition = 409,
2635 MsiTransactionX86BeforeX64Package2 = 410,
2636 MsiTransactionInvalidPackage = 411,
2637 MsiTransactionInvalidPackage2 = 412,
2638 ExpectedAttributeOrElementWithOtherAttribute = 413, 729 ExpectedAttributeOrElementWithOtherAttribute = 413,
2639 ExpectedAttributeOrElementWithoutOtherAttribute = 414, 730 ExpectedAttributeOrElementWithoutOtherAttribute = 414,
2640 OverlengthTableNameInProductOrMergeModule = 415
2641 } 731 }
2642 } 732 }
2643} 733}
diff --git a/src/ext/Bal/wixext/BalCompiler.cs b/src/ext/Bal/wixext/BalCompiler.cs
index b7d5f679..c2959c5d 100644
--- a/src/ext/Bal/wixext/BalCompiler.cs
+++ b/src/ext/Bal/wixext/BalCompiler.cs
@@ -433,7 +433,7 @@ namespace WixToolset.BootstrapperApplications
433 // Error check the values. 433 // Error check the values.
434 if (String.IsNullOrEmpty(condition)) 434 if (String.IsNullOrEmpty(condition))
435 { 435 {
436 this.Messaging.Write(ErrorMessages.ConditionExpected(sourceLineNumbers, node.Name.LocalName)); 436 this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Condition"));
437 } 437 }
438 438
439 if (null == message) 439 if (null == message)
diff --git a/src/ext/Firewall/wixext/FirewallErrors.cs b/src/ext/Firewall/wixext/FirewallErrors.cs
index 523398e5..6e1c743a 100644
--- a/src/ext/Firewall/wixext/FirewallErrors.cs
+++ b/src/ext/Firewall/wixext/FirewallErrors.cs
@@ -36,6 +36,7 @@ namespace WixToolset.Firewall
36 { 36 {
37 return Message(sourceLineNumbers, Ids.IllegalInterfaceTypeWithInterfaceTypeAll, "The InterfaceType element cannot be specified because its parent FirewallException contains another InterfaceType element with value 'All'."); 37 return Message(sourceLineNumbers, Ids.IllegalInterfaceTypeWithInterfaceTypeAll, "The InterfaceType element cannot be specified because its parent FirewallException contains another InterfaceType element with value 'All'.");
38 } 38 }
39
39 public static Message IllegalLocalAddressWithLocalScopeAttribute(SourceLineNumber sourceLineNumbers) 40 public static Message IllegalLocalAddressWithLocalScopeAttribute(SourceLineNumber sourceLineNumbers)
40 { 41 {
41 return Message(sourceLineNumbers, Ids.IllegalLocalAddressWithLocalScopeAttribute, "The LocalAddress element cannot be specified because its parent FirewallException already specified the LocalScope attribute. To use LocalAddress elements, omit the LocalScope attribute."); 42 return Message(sourceLineNumbers, Ids.IllegalLocalAddressWithLocalScopeAttribute, "The LocalAddress element cannot be specified because its parent FirewallException already specified the LocalScope attribute. To use LocalAddress elements, omit the LocalScope attribute.");
diff --git a/src/ext/Sql/wixext/SqlErrors.cs b/src/ext/Sql/wixext/SqlErrors.cs
index f25728bd..f950e137 100644
--- a/src/ext/Sql/wixext/SqlErrors.cs
+++ b/src/ext/Sql/wixext/SqlErrors.cs
@@ -11,17 +11,17 @@ namespace WixToolset.Sql
11 { 11 {
12 return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutComponent, "The {0}/@{1} attribute cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.", elementName, attributeName); 12 return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutComponent, "The {0}/@{1} attribute cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.", elementName, attributeName);
13 } 13 }
14 14
15 public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName) 15 public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName)
16 { 16 {
17 return Message(sourceLineNumbers, Ids.IllegalElementWithoutComponent, "The {0} element cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.", elementName); 17 return Message(sourceLineNumbers, Ids.IllegalElementWithoutComponent, "The {0} element cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.", elementName);
18 } 18 }
19 19
20 public static Message OneOfAttributesRequiredUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4) 20 public static Message OneOfAttributesRequiredUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4)
21 { 21 {
22 return Message(sourceLineNumbers, Ids.OneOfAttributesRequiredUnderComponent, "When nested under a Component, the {0} element must have one of the following attributes specified: {1}, {2}, {3} or {4}.", elementName, attributeName1, attributeName2, attributeName3, attributeName4); 22 return Message(sourceLineNumbers, Ids.OneOfAttributesRequiredUnderComponent, "When nested under a Component, the {0} element must have one of the following attributes specified: {1}, {2}, {3} or {4}.", elementName, attributeName1, attributeName2, attributeName3, attributeName4);
23 } 23 }
24 24
25 public static Message DeprecatedBinaryChildElement(SourceLineNumber sourceLineNumbers, string elementName) 25 public static Message DeprecatedBinaryChildElement(SourceLineNumber sourceLineNumbers, string elementName)
26 { 26 {
27 return Message(sourceLineNumbers, Ids.DeprecatedBinaryChildElement, "The {0} element contains a deprecated child Binary element. Please move the Binary element under a Fragment, Module, or Product element and set the {0}/@BinaryKey attribute to the value of the Binary/@Id attribute.", elementName); 27 return Message(sourceLineNumbers, Ids.DeprecatedBinaryChildElement, "The {0} element contains a deprecated child Binary element. Please move the Binary element under a Fragment, Module, or Product element and set the {0}/@BinaryKey attribute to the value of the Binary/@Id attribute.", elementName);
@@ -45,4 +45,4 @@ namespace WixToolset.Sql
45 DeprecatedBinaryChildElement = 5103, 45 DeprecatedBinaryChildElement = 5103,
46 } 46 }
47 } 47 }
48} \ No newline at end of file 48}
diff --git a/src/ext/Sql/wixext/SqlExtensionFactory.cs b/src/ext/Sql/wixext/SqlExtensionFactory.cs
index 279106d3..064b68f1 100644
--- a/src/ext/Sql/wixext/SqlExtensionFactory.cs
+++ b/src/ext/Sql/wixext/SqlExtensionFactory.cs
@@ -1,4 +1,4 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. 1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 2
3namespace WixToolset.Sql 3namespace WixToolset.Sql
4{ 4{
diff --git a/src/ext/Sql/wixext/Symbols/SqlDatabaseSymbol.cs b/src/ext/Sql/wixext/Symbols/SqlDatabaseSymbol.cs
index 6f0820ac..bb31fbb2 100644
--- a/src/ext/Sql/wixext/Symbols/SqlDatabaseSymbol.cs
+++ b/src/ext/Sql/wixext/Symbols/SqlDatabaseSymbol.cs
@@ -100,4 +100,4 @@ namespace WixToolset.Sql.Symbols
100 set => this.Set((int)SqlDatabaseSymbolFields.Attributes, value); 100 set => this.Set((int)SqlDatabaseSymbolFields.Attributes, value);
101 } 101 }
102 } 102 }
103} \ No newline at end of file 103}
diff --git a/src/ext/Sql/wixext/Symbols/SqlFileSpecSymbol.cs b/src/ext/Sql/wixext/Symbols/SqlFileSpecSymbol.cs
index d9eecc62..302bae2b 100644
--- a/src/ext/Sql/wixext/Symbols/SqlFileSpecSymbol.cs
+++ b/src/ext/Sql/wixext/Symbols/SqlFileSpecSymbol.cs
@@ -76,4 +76,4 @@ namespace WixToolset.Sql.Symbols
76 set => this.Set((int)SqlFileSpecSymbolFields.GrowthSize, value); 76 set => this.Set((int)SqlFileSpecSymbolFields.GrowthSize, value);
77 } 77 }
78 } 78 }
79} \ No newline at end of file 79}
diff --git a/src/ext/Sql/wixext/Symbols/SqlScriptSymbol.cs b/src/ext/Sql/wixext/Symbols/SqlScriptSymbol.cs
index 94c70390..1676f181 100644
--- a/src/ext/Sql/wixext/Symbols/SqlScriptSymbol.cs
+++ b/src/ext/Sql/wixext/Symbols/SqlScriptSymbol.cs
@@ -84,4 +84,4 @@ namespace WixToolset.Sql.Symbols
84 set => this.Set((int)SqlScriptSymbolFields.Sequence, value); 84 set => this.Set((int)SqlScriptSymbolFields.Sequence, value);
85 } 85 }
86 } 86 }
87} \ No newline at end of file 87}
diff --git a/src/ext/Sql/wixext/Symbols/SqlStringSymbol.cs b/src/ext/Sql/wixext/Symbols/SqlStringSymbol.cs
index 73a8206e..ccf4fd0f 100644
--- a/src/ext/Sql/wixext/Symbols/SqlStringSymbol.cs
+++ b/src/ext/Sql/wixext/Symbols/SqlStringSymbol.cs
@@ -84,4 +84,4 @@ namespace WixToolset.Sql.Symbols
84 set => this.Set((int)SqlStringSymbolFields.Sequence, value); 84 set => this.Set((int)SqlStringSymbolFields.Sequence, value);
85 } 85 }
86 } 86 }
87} \ No newline at end of file 87}
diff --git a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
index 2ba1d3a2..83dfb606 100644
--- a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
@@ -309,7 +309,7 @@ namespace WixToolset.Core.Burn
309 if (0 == uxPayloadIndex) 309 if (0 == uxPayloadIndex)
310 { 310 {
311 // If we didn't get any UX payloads, it's an error! 311 // If we didn't get any UX payloads, it's an error!
312 throw new WixException(ErrorMessages.MissingBundleInformation("bootstrapper application")); 312 throw new WixException(BurnBackendErrors.MissingBundleInformation("bootstrapper application"));
313 } 313 }
314 314
315 // Give the embedded payloads without an embedded id yet an embedded id. 315 // Give the embedded payloads without an embedded id yet an embedded id.
@@ -642,7 +642,7 @@ namespace WixToolset.Core.Burn
642 642
643 if (0 == symbols.Count) 643 if (0 == symbols.Count)
644 { 644 {
645 throw new WixException(ErrorMessages.MissingBundleInformation(typeof(T).Name)); 645 throw new WixException(BurnBackendErrors.MissingBundleInformation(typeof(T).Name));
646 } 646 }
647 647
648 return symbols; 648 return symbols;
@@ -654,7 +654,7 @@ namespace WixToolset.Core.Burn
654 654
655 if (0 == symbols.Count) 655 if (0 == symbols.Count)
656 { 656 {
657 throw new WixException(ErrorMessages.MissingBundleInformation(elementName)); 657 throw new WixException(BurnBackendErrors.MissingBundleInformation(elementName));
658 } 658 }
659 else if (1 < symbols.Count) 659 else if (1 < symbols.Count)
660 { 660 {
diff --git a/src/wix/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs
index 992ce3d6..deb97820 100644
--- a/src/wix/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bind/ProcessDependencyProvidersCommand.cs
@@ -85,7 +85,7 @@ namespace WixToolset.Core.Burn.Bind
85 // If the version is still missing, a version could not be gathered from the package and was not authored. 85 // If the version is still missing, a version could not be gathered from the package and was not authored.
86 if (String.IsNullOrEmpty(dependency.Version)) 86 if (String.IsNullOrEmpty(dependency.Version))
87 { 87 {
88 this.Messaging.Write(ErrorMessages.MissingDependencyVersion(facade.PackageId)); 88 this.Messaging.Write(BurnBackendErrors.MissingDependencyVersion(facade.PackageId));
89 } 89 }
90 90
91 if (String.IsNullOrEmpty(dependency.DisplayName)) 91 if (String.IsNullOrEmpty(dependency.DisplayName))
@@ -138,7 +138,7 @@ namespace WixToolset.Core.Burn.Bind
138 dependency.Version != collision.Version || 138 dependency.Version != collision.Version ||
139 dependency.DisplayName != collision.DisplayName) 139 dependency.DisplayName != collision.DisplayName)
140 { 140 {
141 this.Messaging.Write(ErrorMessages.DuplicateProviderDependencyKey(dependency.ProviderKey, dependency.ParentRef)); 141 this.Messaging.Write(BurnBackendErrors.DuplicateProviderDependencyKey(dependency.ProviderKey, dependency.ParentRef));
142 } 142 }
143 } 143 }
144 else 144 else
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs
index f90a089b..066ef9db 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs
@@ -220,7 +220,7 @@ namespace WixToolset.Core.Burn.Bundles
220 var uint32 = BurnCommon.ReadUInt32(bytes, BURN_SECTION_OFFSET_MAGIC); 220 var uint32 = BurnCommon.ReadUInt32(bytes, BURN_SECTION_OFFSET_MAGIC);
221 if (BURN_SECTION_MAGIC != uint32) 221 if (BURN_SECTION_MAGIC != uint32)
222 { 222 {
223 this.Messaging.Write(ErrorMessages.InvalidBundle(this.fileExe)); 223 this.Messaging.Write(BurnBackendErrors.InvalidBundle(this.fileExe));
224 return false; 224 return false;
225 } 225 }
226 226
@@ -234,7 +234,7 @@ namespace WixToolset.Core.Burn.Bundles
234 uint32 = BurnCommon.ReadUInt32(bytes, BURN_SECTION_OFFSET_FORMAT); // We only know how to deal with CABs right now 234 uint32 = BurnCommon.ReadUInt32(bytes, BURN_SECTION_OFFSET_FORMAT); // We only know how to deal with CABs right now
235 if (1 != uint32) 235 if (1 != uint32)
236 { 236 {
237 this.Messaging.Write(ErrorMessages.InvalidBundle(this.fileExe)); 237 this.Messaging.Write(BurnBackendErrors.InvalidBundle(this.fileExe));
238 return false; 238 return false;
239 } 239 }
240 240
@@ -248,7 +248,7 @@ namespace WixToolset.Core.Burn.Bundles
248 uint uxSize = 0; 248 uint uxSize = 0;
249 if (this.wixburnMaxContainers < containerCount) 249 if (this.wixburnMaxContainers < containerCount)
250 { 250 {
251 this.Messaging.Write(ErrorMessages.InvalidBundle(this.fileExe)); 251 this.Messaging.Write(BurnBackendErrors.InvalidBundle(this.fileExe));
252 return false; 252 return false;
253 } 253 }
254 else if (containerCount > 0) 254 else if (containerCount > 0)
@@ -314,7 +314,7 @@ namespace WixToolset.Core.Burn.Bundles
314 314
315 if (UInt32.MaxValue == wixburnSectionOffset) 315 if (UInt32.MaxValue == wixburnSectionOffset)
316 { 316 {
317 this.Messaging.Write(ErrorMessages.StubMissingWixburnSection(this.fileExe)); 317 this.Messaging.Write(BurnBackendErrors.StubMissingWixburnSection(this.fileExe));
318 return false; 318 return false;
319 } 319 }
320 320
@@ -324,7 +324,7 @@ namespace WixToolset.Core.Burn.Bundles
324 // the smallest alignment (512 bytes), but just to be paranoid... 324 // the smallest alignment (512 bytes), but just to be paranoid...
325 if (BURN_SECTION_MIN_SIZE > this.wixburnRawDataSize) 325 if (BURN_SECTION_MIN_SIZE > this.wixburnRawDataSize)
326 { 326 {
327 this.Messaging.Write(ErrorMessages.StubWixburnSectionTooSmall(this.fileExe)); 327 this.Messaging.Write(BurnBackendErrors.StubWixburnSectionTooSmall(this.fileExe));
328 return false; 328 return false;
329 } 329 }
330 330
@@ -354,7 +354,7 @@ namespace WixToolset.Core.Burn.Bundles
354 // Verify the NT signature... 354 // Verify the NT signature...
355 if (IMAGE_NT_SIGNATURE != BurnCommon.ReadUInt32(bytes, IMAGE_NT_HEADER_OFFSET_SIGNATURE)) 355 if (IMAGE_NT_SIGNATURE != BurnCommon.ReadUInt32(bytes, IMAGE_NT_HEADER_OFFSET_SIGNATURE))
356 { 356 {
357 this.Messaging.Write(ErrorMessages.InvalidStubExe(this.fileExe)); 357 this.Messaging.Write(BurnBackendErrors.InvalidStubExe(this.fileExe));
358 return false; 358 return false;
359 } 359 }
360 360
@@ -391,7 +391,7 @@ namespace WixToolset.Core.Burn.Bundles
391 // Verify the DOS 'MZ' signature. 391 // Verify the DOS 'MZ' signature.
392 if (IMAGE_DOS_SIGNATURE != BurnCommon.ReadUInt16(bytes, IMAGE_DOS_HEADER_OFFSET_MAGIC)) 392 if (IMAGE_DOS_SIGNATURE != BurnCommon.ReadUInt16(bytes, IMAGE_DOS_HEADER_OFFSET_MAGIC))
393 { 393 {
394 this.Messaging.Write(ErrorMessages.InvalidStubExe(this.fileExe)); 394 this.Messaging.Write(BurnBackendErrors.InvalidStubExe(this.fileExe));
395 return false; 395 return false;
396 } 396 }
397 397
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
index c1dba91e..ebec667a 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs
@@ -61,7 +61,7 @@ namespace WixToolset.Core.Burn.Bundles
61 61
62 if ("setup.exe".Equals(bundleFilename, StringComparison.OrdinalIgnoreCase)) 62 if ("setup.exe".Equals(bundleFilename, StringComparison.OrdinalIgnoreCase))
63 { 63 {
64 this.Messaging.Write(ErrorMessages.InsecureBundleFilename(bundleFilename)); 64 this.Messaging.Write(BurnBackendErrors.InsecureBundleFilename(bundleFilename));
65 } 65 }
66 66
67 this.Transfer = this.BackendHelper.CreateFileTransfer(bundleTempPath, this.OutputPath, true, this.BundleSymbol.SourceLineNumbers); 67 this.Transfer = this.BackendHelper.CreateFileTransfer(bundleTempPath, this.OutputPath, true, this.BundleSymbol.SourceLineNumbers);
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs
index 8b327b6a..564dbafb 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/GetPackageFacadesCommand.cs
@@ -60,8 +60,8 @@ namespace WixToolset.Core.Burn.Bundles
60 } 60 }
61 else 61 else
62 { 62 {
63 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported(bundlePackagePayload.SourceLineNumbers, "Bundle")); 63 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported(bundlePackagePayload.SourceLineNumbers, "Bundle"));
64 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported2(package.SourceLineNumbers)); 64 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported2(package.SourceLineNumbers));
65 } 65 }
66 } 66 }
67 else if (exePackagePayloads.TryGetValue(wixGroup.ChildId, out var exePackagePayload)) 67 else if (exePackagePayloads.TryGetValue(wixGroup.ChildId, out var exePackagePayload))
@@ -72,8 +72,8 @@ namespace WixToolset.Core.Burn.Bundles
72 } 72 }
73 else 73 else
74 { 74 {
75 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported(exePackagePayload.SourceLineNumbers, "Exe")); 75 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported(exePackagePayload.SourceLineNumbers, "Exe"));
76 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported2(package.SourceLineNumbers)); 76 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported2(package.SourceLineNumbers));
77 } 77 }
78 } 78 }
79 else if (msiPackagePayloads.TryGetValue(wixGroup.ChildId, out var msiPackagePayload)) 79 else if (msiPackagePayloads.TryGetValue(wixGroup.ChildId, out var msiPackagePayload))
@@ -84,8 +84,8 @@ namespace WixToolset.Core.Burn.Bundles
84 } 84 }
85 else 85 else
86 { 86 {
87 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported(msiPackagePayload.SourceLineNumbers, "Msi")); 87 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported(msiPackagePayload.SourceLineNumbers, "Msi"));
88 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported2(package.SourceLineNumbers)); 88 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported2(package.SourceLineNumbers));
89 } 89 }
90 } 90 }
91 else if (mspPackagePayloads.TryGetValue(wixGroup.ChildId, out var mspPackagePayload)) 91 else if (mspPackagePayloads.TryGetValue(wixGroup.ChildId, out var mspPackagePayload))
@@ -96,8 +96,8 @@ namespace WixToolset.Core.Burn.Bundles
96 } 96 }
97 else 97 else
98 { 98 {
99 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported(mspPackagePayload.SourceLineNumbers, "Msp")); 99 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported(mspPackagePayload.SourceLineNumbers, "Msp"));
100 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported2(package.SourceLineNumbers)); 100 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported2(package.SourceLineNumbers));
101 } 101 }
102 } 102 }
103 else if (msuPackagePayloads.TryGetValue(wixGroup.ChildId, out var msuPackagePayload)) 103 else if (msuPackagePayloads.TryGetValue(wixGroup.ChildId, out var msuPackagePayload))
@@ -108,8 +108,8 @@ namespace WixToolset.Core.Burn.Bundles
108 } 108 }
109 else 109 else
110 { 110 {
111 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported(msuPackagePayload.SourceLineNumbers, "Msu")); 111 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported(msuPackagePayload.SourceLineNumbers, "Msu"));
112 this.Messaging.Write(ErrorMessages.PackagePayloadUnsupported2(package.SourceLineNumbers)); 112 this.Messaging.Write(BurnBackendErrors.PackagePayloadUnsupported2(package.SourceLineNumbers));
113 } 113 }
114 } 114 }
115 else 115 else
@@ -125,9 +125,9 @@ namespace WixToolset.Core.Burn.Bundles
125 } 125 }
126 else 126 else
127 { 127 {
128 this.Messaging.Write(ErrorMessages.MultiplePackagePayloads(tempPackagePayload.SourceLineNumbers, id, packagePayload.Id.Id, tempPackagePayload.Id.Id)); 128 this.Messaging.Write(BurnBackendErrors.MultiplePackagePayloads(tempPackagePayload.SourceLineNumbers, id, packagePayload.Id.Id, tempPackagePayload.Id.Id));
129 this.Messaging.Write(ErrorMessages.MultiplePackagePayloads2(packagePayload.SourceLineNumbers)); 129 this.Messaging.Write(BurnBackendErrors.MultiplePackagePayloads2(packagePayload.SourceLineNumbers));
130 this.Messaging.Write(ErrorMessages.MultiplePackagePayloads3(package.SourceLineNumbers)); 130 this.Messaging.Write(BurnBackendErrors.MultiplePackagePayloads3(package.SourceLineNumbers));
131 } 131 }
132 } 132 }
133 } 133 }
@@ -135,7 +135,7 @@ namespace WixToolset.Core.Burn.Bundles
135 135
136 if (packagePayload == null) 136 if (packagePayload == null)
137 { 137 {
138 this.Messaging.Write(ErrorMessages.MissingPackagePayload(package.SourceLineNumbers, id, package.Type.ToString())); 138 this.Messaging.Write(BurnBackendErrors.MissingPackagePayload(package.SourceLineNumbers, id, package.Type.ToString()));
139 continue; 139 continue;
140 } 140 }
141 else 141 else
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
index 13aa60e3..18227ad7 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/OrderPackagesAndRollbackBoundariesCommand.cs
@@ -80,8 +80,8 @@ namespace WixToolset.Core.Burn.Bundles
80 { 80 {
81 if (facade.PackageSymbol.Type != WixBundlePackageType.Msi && facade.PackageSymbol.Type != WixBundlePackageType.Msp) 81 if (facade.PackageSymbol.Type != WixBundlePackageType.Msi && facade.PackageSymbol.Type != WixBundlePackageType.Msp)
82 { 82 {
83 this.Messaging.Write(ErrorMessages.MsiTransactionInvalidPackage(facade.PackageSymbol.SourceLineNumbers, facade.PackageId, facade.PackageSymbol.Type.ToString())); 83 this.Messaging.Write(BurnBackendErrors.MsiTransactionInvalidPackage(facade.PackageSymbol.SourceLineNumbers, facade.PackageId, facade.PackageSymbol.Type.ToString()));
84 this.Messaging.Write(ErrorMessages.MsiTransactionInvalidPackage2(lastRollbackBoundary.SourceLineNumbers)); 84 this.Messaging.Write(BurnBackendErrors.MsiTransactionInvalidPackage2(lastRollbackBoundary.SourceLineNumbers));
85 } 85 }
86 // Not possible to tell the bitness of Msp. 86 // Not possible to tell the bitness of Msp.
87 else if (facade.PackageSymbol.Type == WixBundlePackageType.Msi) 87 else if (facade.PackageSymbol.Type == WixBundlePackageType.Msi)
@@ -93,8 +93,8 @@ namespace WixToolset.Core.Burn.Bundles
93 // Error if MSI transaction has x86 package preceding x64 packages 93 // Error if MSI transaction has x86 package preceding x64 packages
94 else if (msiTransactionX86Package != null && facade.PackageSymbol.Win64) 94 else if (msiTransactionX86Package != null && facade.PackageSymbol.Win64)
95 { 95 {
96 this.Messaging.Write(ErrorMessages.MsiTransactionX86BeforeX64Package(facade.PackageSymbol.SourceLineNumbers, facade.PackageId, msiTransactionX86Package.PackageId)); 96 this.Messaging.Write(BurnBackendErrors.MsiTransactionX86BeforeX64Package(facade.PackageSymbol.SourceLineNumbers, facade.PackageId, msiTransactionX86Package.PackageId));
97 this.Messaging.Write(ErrorMessages.MsiTransactionX86BeforeX64Package2(msiTransactionX86Package.PackageSymbol.SourceLineNumbers)); 97 this.Messaging.Write(BurnBackendErrors.MsiTransactionX86BeforeX64Package2(msiTransactionX86Package.PackageSymbol.SourceLineNumbers));
98 } 98 }
99 } 99 }
100 } 100 }
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs
index 60f375e5..7fd91900 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs
@@ -109,7 +109,7 @@ namespace WixToolset.Core.Burn.Bundles
109 // We will show a separate message for every ID that's in 109 // We will show a separate message for every ID that's in
110 // the loop. We could bail after the first one, but then 110 // the loop. We could bail after the first one, but then
111 // we wouldn't catch disjoint loops in a single run. 111 // we wouldn't catch disjoint loops in a single run.
112 this.Messaging.Write(ErrorMessages.CircularSearchReference(chain)); 112 this.Messaging.Write(BurnBackendErrors.CircularSearchReference(chain));
113 } 113 }
114 } 114 }
115 } 115 }
@@ -357,7 +357,7 @@ namespace WixToolset.Core.Burn.Bundles
357 } 357 }
358 else 358 else
359 { 359 {
360 this.Messaging.Write(ErrorMessages.MissingBundleSearch(searchSymbol.SourceLineNumbers, searchId)); 360 this.Messaging.Write(BurnBackendErrors.MissingBundleSearch(searchSymbol.SourceLineNumbers, searchId));
361 } 361 }
362 } 362 }
363 363
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
index 0b78c545..783c9f6b 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs
@@ -223,7 +223,7 @@ namespace WixToolset.Core.Burn.Bundles
223 } 223 }
224 catch (MsiException e) 224 catch (MsiException e)
225 { 225 {
226 this.Messaging.Write(ErrorMessages.UnableToReadPackageInformation(this.PackagePayload.SourceLineNumbers, sourcePath, e.Message)); 226 this.Messaging.Write(BurnBackendErrors.UnableToReadPackageInformation(this.PackagePayload.SourceLineNumbers, sourcePath, e.Message));
227 return null; 227 return null;
228 } 228 }
229 229
@@ -316,7 +316,7 @@ namespace WixToolset.Core.Burn.Bundles
316 { 316 {
317 if (!perMachine) 317 if (!perMachine)
318 { 318 {
319 this.Messaging.Write(ErrorMessages.PerUserButAllUsersEquals1(this.ChainPackage.SourceLineNumbers, this.PackageId)); 319 this.Messaging.Write(BurnBackendErrors.PerUserButAllUsersEquals1(this.ChainPackage.SourceLineNumbers, this.PackageId));
320 } 320 }
321 } 321 }
322 else if (allusers.Equals("2", StringComparison.Ordinal)) 322 else if (allusers.Equals("2", StringComparison.Ordinal))
@@ -325,7 +325,7 @@ namespace WixToolset.Core.Burn.Bundles
325 } 325 }
326 else 326 else
327 { 327 {
328 this.Messaging.Write(ErrorMessages.UnsupportedAllUsersValue(this.ChainPackage.SourceLineNumbers, this.PackageId, allusers)); 328 this.Messaging.Write(BurnBackendErrors.UnsupportedAllUsersValue(this.ChainPackage.SourceLineNumbers, this.PackageId, allusers));
329 } 329 }
330 } 330 }
331 } 331 }
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs
index 8d1e9c39..4aee311e 100644
--- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMspPackageCommand.cs
@@ -119,7 +119,7 @@ namespace WixToolset.Core.Burn.Bundles
119 } 119 }
120 catch (MsiException e) 120 catch (MsiException e)
121 { 121 {
122 this.Messaging.Write(ErrorMessages.UnableToReadPackageInformation(this.PackagePayload.SourceLineNumbers, sourcePath, e.Message)); 122 this.Messaging.Write(BurnBackendErrors.UnableToReadPackageInformation(this.PackagePayload.SourceLineNumbers, sourcePath, e.Message));
123 return null; 123 return null;
124 } 124 }
125 125
diff --git a/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs b/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs
index 2daf376f..45fba11a 100644
--- a/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs
+++ b/src/wix/WixToolset.Core.Burn/BurnBackendErrors.cs
@@ -118,6 +118,121 @@ namespace WixToolset.Core.Burn
118 return Message(sourceLineNumbers, Ids.BundleMissingBootstrapperApplicationContainer, "Bundle is invalid. The BootstrapperApplication attached container is missing from the file: {0}", path); 118 return Message(sourceLineNumbers, Ids.BundleMissingBootstrapperApplicationContainer, "Bundle is invalid. The BootstrapperApplication attached container is missing from the file: {0}", path);
119 } 119 }
120 120
121 public static Message CircularSearchReference(string chain)
122 {
123 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);
124 }
125
126 public static Message DuplicateProviderDependencyKey(string providerKey, string packageId)
127 {
128 return Message(null, Ids.DuplicateProviderDependencyKey, "The provider dependency key '{0}' was already imported from the package with Id '{1}'. Please remove the Provides element with the key '{0}' from the package authoring.", providerKey, packageId);
129 }
130
131 public static Message InsecureBundleFilename(string filename)
132 {
133 return Message(null, Ids.InsecureBundleFilename, "The file name '{0}' creates an insecure bundle. Windows will load unnecessary compatibility shims into a bundle with that file name. These compatibility shims can be DLL hijacked allowing attackers to compromise your customers' computer. Choose a different bundle file name.", filename);
134 }
135
136 public static Message InvalidBundle(string bundleExecutable)
137 {
138 return Message(null, Ids.InvalidBundle, "Unable to read bundle executable '{0}'. This is not a valid WiX bundle.", bundleExecutable);
139 }
140
141 public static Message InvalidStubExe(string filename)
142 {
143 return Message(null, Ids.InvalidStubExe, "Stub executable '{0}' is not a valid Win32 executable.", filename);
144 }
145
146 public static Message MissingBundleInformation(string friendlyName)
147 {
148 return Message(null, Ids.MissingBundleInformation, "The Bundle is missing {0} data, and cannot continue.", friendlyName);
149 }
150
151 public static Message MissingBundleSearch(SourceLineNumber sourceLineNumbers, string searchId)
152 {
153 return Message(sourceLineNumbers, Ids.MissingBundleSearch, "Bundle Search with id '{0}' has no corresponding implementation symbol.", searchId);
154 }
155
156 public static Message MissingDependencyVersion(string packageId)
157 {
158 return Message(null, Ids.MissingDependencyVersion, "The provider dependency version was not authored for the package with Id '{0}'. Please author the Provides/@Version attribute for this package.", packageId);
159 }
160
161 public static Message MissingPackagePayload(SourceLineNumber sourceLineNumbers, string packageId, string packageType)
162 {
163 return Message(sourceLineNumbers, Ids.MissingPackagePayload, "There is no payload defined for package '{0}'. This is specified on the {1}Package element or a child {1}PackagePayload element.", packageId, packageType);
164 }
165
166 public static Message MsiTransactionInvalidPackage(SourceLineNumber sourceLineNumbers, string packageId, string packageType)
167 {
168 return Message(sourceLineNumbers, Ids.MsiTransactionInvalidPackage, "Invalid package '{0}' in MSI transaction. It is type '{1}' but must be Msi or Msp.", packageId, packageType);
169 }
170
171 public static Message MsiTransactionInvalidPackage2(SourceLineNumber sourceLineNumbers)
172 {
173 return Message(sourceLineNumbers, Ids.MsiTransactionInvalidPackage2, "Location of rollback boundary related to previous error.");
174 }
175
176 public static Message MsiTransactionX86BeforeX64Package(SourceLineNumber sourceLineNumbers, string x64PackageId, string x86PackageId)
177 {
178 return Message(sourceLineNumbers, Ids.MsiTransactionX86BeforeX64Package, "Package '{0}' is x64 but Package '{1}' is x86. MSI transactions must install all x64 packages before any x86 package.", x64PackageId, x86PackageId);
179 }
180
181 public static Message MsiTransactionX86BeforeX64Package2(SourceLineNumber sourceLineNumbers)
182 {
183 return Message(sourceLineNumbers, Ids.MsiTransactionX86BeforeX64Package2, "Location of x86 package related to previous error.");
184 }
185
186 public static Message MultiplePackagePayloads(SourceLineNumber sourceLineNumbers, string packageId, string packagePayloadId1, string packagePayloadId2)
187 {
188 return Message(sourceLineNumbers, Ids.MultiplePackagePayloads, "The package '{0}' has multiple PackagePayloads: '{1}' and '{2}'. This normally happens when the payload is defined on the package element and a child PackagePayload element.", packageId, packagePayloadId1, packagePayloadId2);
189 }
190
191 public static Message MultiplePackagePayloads2(SourceLineNumber sourceLineNumbers)
192 {
193 return Message(sourceLineNumbers, Ids.MultiplePackagePayloads2, "The location of the package payload related to previous error.");
194 }
195
196 public static Message MultiplePackagePayloads3(SourceLineNumber sourceLineNumbers)
197 {
198 return Message(sourceLineNumbers, Ids.MultiplePackagePayloads3, "The location of the package related to previous error.");
199 }
200
201 public static Message PackagePayloadUnsupported(SourceLineNumber sourceLineNumbers, string packageType)
202 {
203 return Message(sourceLineNumbers, Ids.PackagePayloadUnsupported, "The {0}PackagePayload element can only be used for {0}Packages.", packageType);
204 }
205
206 public static Message PackagePayloadUnsupported2(SourceLineNumber sourceLineNumbers)
207 {
208 return Message(sourceLineNumbers, Ids.PackagePayloadUnsupported2, "The location of the package related to previous error.");
209 }
210
211 public static Message PerUserButAllUsersEquals1(SourceLineNumber sourceLineNumbers, string path)
212 {
213 return Message(sourceLineNumbers, Ids.PerUserButAllUsersEquals1, "The MSI '{0}' is explicitly marked to not elevate so it must be a per-user package but the ALLUSERS Property is set to '1' creating a per-machine package. Remove the Property with Id='ALLUSERS' and use Package/@Scope attribute to be explicit instead.", path);
214 }
215
216 public static Message StubMissingWixburnSection(string filename)
217 {
218 return Message(null, Ids.StubMissingWixburnSection, "Stub executable '{0}' does not contain a .wixburn data section.", filename);
219 }
220
221 public static Message StubWixburnSectionTooSmall(string filename)
222 {
223 return Message(null, Ids.StubWixburnSectionTooSmall, "Stub executable '{0}' .wixburn data section is too small to store the Burn container header.", filename);
224 }
225
226 public static Message UnableToReadPackageInformation(SourceLineNumber sourceLineNumbers, string packagePath, string detailedErrorMessage)
227 {
228 return Message(sourceLineNumbers, Ids.UnableToReadPackageInformation, "Unable to read package '{0}'. {1}", packagePath, detailedErrorMessage);
229 }
230
231 public static Message UnsupportedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string value)
232 {
233 return Message(sourceLineNumbers, Ids.UnsupportedAllUsersValue, "The MSI '{0}' set the ALLUSERS Property to '{0}' which is not supported. Remove the Property with Id='ALLUSERS' and use Package/@Scope attribute instead.", path, value);
234 }
235
121 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 236 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
122 { 237 {
123 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); 238 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
@@ -125,6 +240,29 @@ namespace WixToolset.Core.Burn
125 240
126 public enum Ids 241 public enum Ids
127 { 242 {
243 InvalidStubExe = 338,
244 StubMissingWixburnSection = 339,
245 StubWixburnSectionTooSmall = 340,
246 MissingBundleInformation = 341,
247 UnableToReadPackageInformation = 352,
248 InvalidBundle = 354,
249 PerUserButAllUsersEquals1 = 363,
250 UnsupportedAllUsersValue = 364,
251 DuplicateProviderDependencyKey = 370,
252 MissingDependencyVersion = 371,
253 InsecureBundleFilename = 388,
254 MsiTransactionX86BeforeX64Package = 390,
255 MissingBundleSearch = 397,
256 CircularSearchReference = 398,
257 PackagePayloadUnsupported = 402,
258 PackagePayloadUnsupported2 = 403,
259 MultiplePackagePayloads = 404,
260 MultiplePackagePayloads2 = 405,
261 MultiplePackagePayloads3 = 406,
262 MissingPackagePayload = 407,
263 MsiTransactionX86BeforeX64Package2 = 410,
264 MsiTransactionInvalidPackage = 411,
265 MsiTransactionInvalidPackage2 = 412,
128 DuplicateCacheIds = 8000, 266 DuplicateCacheIds = 8000,
129 DuplicateCacheIds2 = 8001, 267 DuplicateCacheIds2 = 8001,
130 BAContainerPayloadCollision = 8002, 268 BAContainerPayloadCollision = 8002,
diff --git a/src/wix/WixToolset.Core.Native/Msm/IMsmErrors.cs b/src/wix/WixToolset.Core.Native/Msm/IMsmErrors.cs
index e1472376..a637ef07 100644
--- a/src/wix/WixToolset.Core.Native/Msm/IMsmErrors.cs
+++ b/src/wix/WixToolset.Core.Native/Msm/IMsmErrors.cs
@@ -1,4 +1,4 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. 1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 2
3namespace WixToolset.Core.Native.Msm 3namespace WixToolset.Core.Native.Msm
4{ 4{
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssemblyNameReader.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssemblyNameReader.cs
index 838a6fe1..20aa2dd1 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssemblyNameReader.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssemblyNameReader.cs
@@ -56,7 +56,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
56 } 56 }
57 catch (Exception e) when (e is FileNotFoundException || e is BadImageFormatException || e is InvalidOperationException) 57 catch (Exception e) when (e is FileNotFoundException || e is BadImageFormatException || e is InvalidOperationException)
58 { 58 {
59 throw new WixException(ErrorMessages.InvalidAssemblyFile(sourceLineNumbers, assemblyPath, $"{e.GetType().Name}: {e.Message}")); 59 throw new WixException(WindowsInstallerBackendErrors.InvalidAssemblyFile(sourceLineNumbers, assemblyPath, $"{e.GetType().Name}: {e.Message}"));
60 } 60 }
61 } 61 }
62 62
@@ -97,7 +97,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
97 97
98 if (!hasNextSibling) 98 if (!hasNextSibling)
99 { 99 {
100 throw new WixException(ErrorMessages.InvalidManifestContent(sourceLineNumbers, manifestPath)); 100 throw new WixException(WindowsInstallerBackendErrors.InvalidManifestContent(sourceLineNumbers, manifestPath));
101 } 101 }
102 102
103 if (nav.MoveToAttribute("type", String.Empty)) 103 if (nav.MoveToAttribute("type", String.Empty))
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs
index 975a4cef..5a56e0d9 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs
@@ -56,7 +56,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
56 // If both symbols are authored, it is an error. 56 // If both symbols are authored, it is an error.
57 if (mediaTemplateSymbols.Count > 0 && mediaSymbols.Count > 1) 57 if (mediaTemplateSymbols.Count > 0 && mediaSymbols.Count > 1)
58 { 58 {
59 throw new WixException(ErrorMessages.MediaTableCollision(null)); 59 throw new WixException(WindowsInstallerBackendErrors.MediaTableCollision(null));
60 } 60 }
61 61
62 // If neither symbol is authored, default to a media template. 62 // If neither symbol is authored, default to a media template.
@@ -157,7 +157,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
157 } 157 }
158 catch (OverflowException) 158 catch (OverflowException)
159 { 159 {
160 throw new WixException(ErrorMessages.MaximumUncompressedMediaSizeTooLarge(null, maxPreCabSizeInMB)); 160 throw new WixException(WindowsInstallerBackendErrors.MaximumUncompressedMediaSizeTooLarge(null, maxPreCabSizeInMB));
161 } 161 }
162 162
163 var mediaSymbolsByDiskId = new Dictionary<int, MediaSymbol>(); 163 var mediaSymbolsByDiskId = new Dictionary<int, MediaSymbol>();
@@ -238,8 +238,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
238 { 238 {
239 if (cabinetMediaSymbols.TryGetValue(mediaSymbol.Cabinet, out var existingRow)) 239 if (cabinetMediaSymbols.TryGetValue(mediaSymbol.Cabinet, out var existingRow))
240 { 240 {
241 this.Messaging.Write(ErrorMessages.DuplicateCabinetName(mediaSymbol.SourceLineNumbers, mediaSymbol.Cabinet)); 241 this.Messaging.Write(WindowsInstallerBackendErrors.DuplicateCabinetName(mediaSymbol.SourceLineNumbers, mediaSymbol.Cabinet));
242 this.Messaging.Write(ErrorMessages.DuplicateCabinetName2(existingRow.SourceLineNumbers, existingRow.Cabinet)); 242 this.Messaging.Write(WindowsInstallerBackendErrors.DuplicateCabinetName2(existingRow.SourceLineNumbers, existingRow.Cabinet));
243 } 243 }
244 else 244 else
245 { 245 {
@@ -257,7 +257,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
257 { 257 {
258 if (!mediaSymbolsByDiskId.TryGetValue(facade.DiskId, out var mediaSymbol)) 258 if (!mediaSymbolsByDiskId.TryGetValue(facade.DiskId, out var mediaSymbol))
259 { 259 {
260 this.Messaging.Write(ErrorMessages.MissingMedia(facade.SourceLineNumber, facade.DiskId)); 260 this.Messaging.Write(WindowsInstallerBackendErrors.MissingMedia(facade.SourceLineNumber, facade.DiskId));
261 continue; 261 continue;
262 } 262 }
263 263
@@ -277,7 +277,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
277 } 277 }
278 else 278 else
279 { 279 {
280 this.Messaging.Write(ErrorMessages.ExpectedMediaCabinet(facade.SourceLineNumber, facade.Id, facade.DiskId)); 280 this.Messaging.Write(WindowsInstallerBackendErrors.ExpectedMediaCabinet(facade.SourceLineNumber, facade.Id, facade.DiskId));
281 } 281 }
282 } 282 }
283 } 283 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
index 5c05bdea..ad0b2425 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs
@@ -135,7 +135,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
135 { 135 {
136 if (!this.Intermediate.HasLevel(Data.IntermediateLevels.Linked) || !this.Intermediate.HasLevel(Data.IntermediateLevels.Resolved)) 136 if (!this.Intermediate.HasLevel(Data.IntermediateLevels.Linked) || !this.Intermediate.HasLevel(Data.IntermediateLevels.Resolved))
137 { 137 {
138 this.Messaging.Write(ErrorMessages.IntermediatesMustBeResolved(this.Intermediate.Id)); 138 this.Messaging.Write(WindowsInstallerBackendErrors.IntermediatesMustBeResolved(this.Intermediate.Id));
139 } 139 }
140 140
141 var section = this.Intermediate.Sections.Single(); 141 var section = this.Intermediate.Sections.Single();
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs
index f327081a..cf2a772a 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs
@@ -217,7 +217,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
217 if (((int)TransformFlags.ValidateUpgradeCode & transformFlags) != 0 && 217 if (((int)TransformFlags.ValidateUpgradeCode & transformFlags) != 0 &&
218 (String.IsNullOrEmpty(targetUpgradeCode) || String.IsNullOrEmpty(updatedUpgradeCode))) 218 (String.IsNullOrEmpty(targetUpgradeCode) || String.IsNullOrEmpty(updatedUpgradeCode)))
219 { 219 {
220 this.Messaging.Write(ErrorMessages.BothUpgradeCodesRequired()); 220 this.Messaging.Write(WindowsInstallerBackendErrors.BothUpgradeCodesRequired());
221 } 221 }
222 222
223 string emptyFile = null; 223 string emptyFile = null;
@@ -297,7 +297,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
297 { 297 {
298 if (RowOperation.Add == fileRow.Operation) 298 if (RowOperation.Add == fileRow.Operation)
299 { 299 {
300 this.Messaging.Write(ErrorMessages.InvalidAddedFileRowWithoutSequence(fileRow.SourceLineNumbers, (string)fileRow[0])); 300 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidAddedFileRowWithoutSequence(fileRow.SourceLineNumbers, (string)fileRow[0]));
301 break; 301 break;
302 } 302 }
303 303
@@ -427,7 +427,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
427 } 427 }
428 else 428 else
429 { 429 {
430 this.Messaging.Write(ErrorMessages.NoDifferencesInTransform(this.Transform.SourceLineNumbers)); 430 this.Messaging.Write(WindowsInstallerBackendErrors.NoDifferencesInTransform(this.Transform.SourceLineNumbers));
431 } 431 }
432 } 432 }
433 } 433 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs
index cc052510..9385d486 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs
@@ -215,10 +215,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
215 switch (win32Exception.NativeErrorCode) 215 switch (win32Exception.NativeErrorCode)
216 { 216 {
217 case 0x4005: 217 case 0x4005:
218 this.Messaging.Write(ErrorMessages.CreateCabAddFileFailed()); 218 this.Messaging.Write(WindowsInstallerBackendErrors.CreateCabAddFileFailed());
219 return null; 219 return null;
220 case 0x0070: 220 case 0x0070:
221 this.Messaging.Write(ErrorMessages.CreateCabInsufficientDiskSpace()); 221 this.Messaging.Write(WindowsInstallerBackendErrors.CreateCabInsufficientDiskSpace());
222 return null; 222 return null;
223 default: 223 default:
224 throw; 224 throw;
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
index e4815572..acfaa793 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
@@ -217,7 +217,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
217 } 217 }
218 catch (OverflowException) 218 catch (OverflowException)
219 { 219 {
220 throw new WixException(ErrorMessages.MaximumCabinetSizeForLargeFileSplittingTooLarge(null, maxCabSizeForLargeFileInMB, MaxValueOfMaxCabSizeForLargeFileSplitting)); 220 throw new WixException(WindowsInstallerBackendErrors.MaximumCabinetSizeForLargeFileSplittingTooLarge(null, maxCabSizeForLargeFileInMB, MaxValueOfMaxCabSizeForLargeFileSplitting));
221 } 221 }
222 222
223 var maxPreCompressedSizeInMB = 0; 223 var maxPreCompressedSizeInMB = 0;
@@ -235,7 +235,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
235 } 235 }
236 catch (OverflowException) 236 catch (OverflowException)
237 { 237 {
238 throw new WixException(ErrorMessages.MaximumUncompressedMediaSizeTooLarge(null, maxPreCompressedSizeInMB)); 238 throw new WixException(WindowsInstallerBackendErrors.MaximumUncompressedMediaSizeTooLarge(null, maxPreCompressedSizeInMB));
239 } 239 }
240 } 240 }
241 else 241 else
@@ -271,7 +271,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
271 if (!fileTransfersByName.TryGetValue(cabinet.CabinetName, out var transfer) || 271 if (!fileTransfersByName.TryGetValue(cabinet.CabinetName, out var transfer) ||
272 !mediaRowsByOriginalDiskId.TryGetValue(completedCabinetSpanned.DiskId, out var mediaRow)) 272 !mediaRowsByOriginalDiskId.TryGetValue(completedCabinetSpanned.DiskId, out var mediaRow))
273 { 273 {
274 throw new WixException(ErrorMessages.SplitCabinetCopyRegistrationFailed(spannedCabinets.First().CabinetName, cabinet.CabinetName)); 274 throw new WixException(WindowsInstallerBackendErrors.SplitCabinetCopyRegistrationFailed(spannedCabinets.First().CabinetName, cabinet.CabinetName));
275 } 275 }
276 276
277 var lastDiskId = mediaRow.DiskId; 277 var lastDiskId = mediaRow.DiskId;
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs
index 28bcfd4a..32729db2 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateIdtFileCommand.cs
@@ -55,7 +55,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
55 55
56 if (TableDefinition.MaxColumnsInRealTable < table.Definition.Columns.Length) 56 if (TableDefinition.MaxColumnsInRealTable < table.Definition.Columns.Length)
57 { 57 {
58 throw new WixException(ErrorMessages.TooManyColumnsInRealTable(table.Definition.Name, table.Definition.Columns.Length, TableDefinition.MaxColumnsInRealTable)); 58 throw new WixException(WindowsInstallerBackendErrors.TooManyColumnsInRealTable(table.Definition.Name, table.Definition.Columns.Length, TableDefinition.MaxColumnsInRealTable));
59 } 59 }
60 60
61 // Tack on the table header, and flush before we start writing bytes directly to the stream. 61 // Tack on the table header, and flush before we start writing bytes directly to the stream.
@@ -81,7 +81,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
81 } 81 }
82 catch (EncoderFallbackException) 82 catch (EncoderFallbackException)
83 { 83 {
84 this.Messaging.Write(ErrorMessages.InvalidStringForCodepage(row.SourceLineNumbers, Convert.ToString(writer.Encoding.CodePage, CultureInfo.InvariantCulture))); 84 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidStringForCodepage(row.SourceLineNumbers, Convert.ToString(writer.Encoding.CodePage, CultureInfo.InvariantCulture)));
85 85
86 rowBytes = convertEncoding.GetBytes(rowString); 86 rowBytes = convertEncoding.GetBytes(rowString);
87 } 87 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs
index db121137..8b77a8bc 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreatePatchSubStoragesCommand.cs
@@ -80,7 +80,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
80 80
81 if (this.Transforms == null || !this.Transforms.Any()) 81 if (this.Transforms == null || !this.Transforms.Any())
82 { 82 {
83 this.Messaging.Write(ErrorMessages.PatchWithoutTransforms()); 83 this.Messaging.Write(WindowsInstallerBackendErrors.PatchWithoutTransforms());
84 return subStorages; 84 return subStorages;
85 } 85 }
86 86
@@ -95,13 +95,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
95 95
96 if (String.IsNullOrEmpty(patchSymbol.Id?.Id)) 96 if (String.IsNullOrEmpty(patchSymbol.Id?.Id))
97 { 97 {
98 this.Messaging.Write(ErrorMessages.ExpectedPatchIdInWixMsp()); 98 this.Messaging.Write(WindowsInstallerBackendErrors.ExpectedPatchIdInWixMsp());
99 return subStorages; 99 return subStorages;
100 } 100 }
101 101
102 if (String.IsNullOrEmpty(patchSymbol.ClientPatchId)) 102 if (String.IsNullOrEmpty(patchSymbol.ClientPatchId))
103 { 103 {
104 this.Messaging.Write(ErrorMessages.ExpectedClientPatchIdInWixMsp()); 104 this.Messaging.Write(WindowsInstallerBackendErrors.ExpectedClientPatchIdInWixMsp());
105 return subStorages; 105 return subStorages;
106 } 106 }
107 107
@@ -110,7 +110,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
110 110
111 if (patchMediaByDiskId.Count == 0) 111 if (patchMediaByDiskId.Count == 0)
112 { 112 {
113 this.Messaging.Write(ErrorMessages.ExpectedMediaRowsInWixMsp()); 113 this.Messaging.Write(WindowsInstallerBackendErrors.ExpectedMediaRowsInWixMsp());
114 return subStorages; 114 return subStorages;
115 } 115 }
116 116
@@ -186,7 +186,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
186 186
187 if (validTransform.Count == 0) 187 if (validTransform.Count == 0)
188 { 188 {
189 this.Messaging.Write(ErrorMessages.PatchWithoutValidTransforms()); 189 this.Messaging.Write(WindowsInstallerBackendErrors.PatchWithoutValidTransforms());
190 return subStorages; 190 return subStorages;
191 } 191 }
192 192
@@ -202,7 +202,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
202 202
203 if (!uninstallable) 203 if (!uninstallable)
204 { 204 {
205 this.Messaging.Write(ErrorMessages.PatchNotRemovable()); 205 this.Messaging.Write(WindowsInstallerBackendErrors.PatchNotRemovable());
206 return subStorages; 206 return subStorages;
207 } 207 }
208 } 208 }
@@ -364,7 +364,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
364 364
365 var primaryKey = row.GetPrimaryKey('/') ?? String.Empty; 365 var primaryKey = row.GetPrimaryKey('/') ?? String.Empty;
366 366
367 this.Messaging.Write(ErrorMessages.NewRowAddedInTable(row.SourceLineNumbers, productCode, table.Name, primaryKey)); 367 this.Messaging.Write(WindowsInstallerBackendErrors.NewRowAddedInTable(row.SourceLineNumbers, productCode, table.Name, primaryKey));
368 } 368 }
369 } 369 }
370 } 370 }
@@ -432,7 +432,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
432 // If the keypath is modified its an error 432 // If the keypath is modified its an error
433 if (row.Fields[5].Modified) 433 if (row.Fields[5].Modified)
434 { 434 {
435 this.Messaging.Write(ErrorMessages.InvalidKeypathChange(row.SourceLineNumbers, id, transformPath)); 435 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidKeypathChange(row.SourceLineNumbers, id, transformPath));
436 } 436 }
437 } 437 }
438 } 438 }
@@ -457,7 +457,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
457 if (row.Fields[2].Modified) 457 if (row.Fields[2].Modified)
458 { 458 {
459 // You can't change the filename of a file that is the keypath of a component. 459 // You can't change the filename of a file that is the keypath of a component.
460 this.Messaging.Write(ErrorMessages.InvalidKeypathChange(row.SourceLineNumbers, componentId, transformPath)); 460 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidKeypathChange(row.SourceLineNumbers, componentId, transformPath));
461 } 461 }
462 462
463 if (!componentWithChangedKeyPath.ContainsKey(componentId)) 463 if (!componentWithChangedKeyPath.ContainsKey(componentId))
@@ -546,7 +546,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
546 if (!featureOps.TryGetValue(featureId, out var op) || op != RowOperation.Delete) 546 if (!featureOps.TryGetValue(featureId, out var op) || op != RowOperation.Delete)
547 { 547 {
548 // The feature was not deleted. 548 // The feature was not deleted.
549 this.Messaging.Write(ErrorMessages.InvalidRemoveComponent(((Row)entry.Value).SourceLineNumbers, entry.Key.ToString(), featureId, transformPath)); 549 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidRemoveComponent(((Row)entry.Value).SourceLineNumbers, entry.Key.ToString(), featureId, transformPath));
550 } 550 }
551 } 551 }
552 } 552 }
@@ -639,7 +639,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
639 639
640 if (productCode == null) 640 if (productCode == null)
641 { 641 {
642 this.Messaging.Write(ErrorMessages.CouldNotDetermineProductCodeFromTransformSummaryInfo()); 642 this.Messaging.Write(WindowsInstallerBackendErrors.CouldNotDetermineProductCodeFromTransformSummaryInfo());
643 return null; 643 return null;
644 } 644 }
645 645
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
index 1665ced3..e565bbb5 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
@@ -1227,7 +1227,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1227 } 1227 }
1228 else 1228 else
1229 { 1229 {
1230 this.Messaging.Write(ErrorMessages.UnexpectedCustomTableColumn(cell.SourceLineNumbers, cell.ColumnRef)); 1230 this.Messaging.Write(WindowsInstallerBackendErrors.UnexpectedCustomTableColumn(cell.SourceLineNumbers, cell.ColumnRef));
1231 } 1231 }
1232 } 1232 }
1233 1233
@@ -1235,7 +1235,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1235 { 1235 {
1236 if (!customTableDefinition.Columns[i].Nullable && (null == customRow.Fields[i].Data || 0 == customRow.Fields[i].Data.ToString().Length)) 1236 if (!customTableDefinition.Columns[i].Nullable && (null == customRow.Fields[i].Data || 0 == customRow.Fields[i].Data.ToString().Length))
1237 { 1237 {
1238 this.Messaging.Write(ErrorMessages.NoDataForColumn(firstCellSymbol.SourceLineNumbers, customTableDefinition.Columns[i].Name, customTableDefinition.Name)); 1238 this.Messaging.Write(WindowsInstallerBackendErrors.NoDataForColumn(firstCellSymbol.SourceLineNumbers, customTableDefinition.Columns[i].Name, customTableDefinition.Name));
1239 } 1239 }
1240 } 1240 }
1241 } 1241 }
@@ -1423,7 +1423,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1423 { 1423 {
1424 foreach (var row in table.Rows) 1424 foreach (var row in table.Rows)
1425 { 1425 {
1426 this.Messaging.Write(ErrorMessages.UnexpectedTableInMergeModule(row.SourceLineNumbers, table.Name)); 1426 this.Messaging.Write(WindowsInstallerBackendErrors.UnexpectedTableInMergeModule(row.SourceLineNumbers, table.Name));
1427 } 1427 }
1428 } 1428 }
1429 else if ("Error" == table.Name) 1429 else if ("Error" == table.Name)
@@ -1437,7 +1437,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1437 { 1437 {
1438 foreach (var row in table.Rows) 1438 foreach (var row in table.Rows)
1439 { 1439 {
1440 this.Messaging.Write(ErrorMessages.OverlengthTableNameInProductOrMergeModule(row.SourceLineNumbers, table.Name)); 1440 this.Messaging.Write(WindowsInstallerBackendErrors.OverlengthTableNameInProductOrMergeModule(row.SourceLineNumbers, table.Name));
1441 } 1441 }
1442 } 1442 }
1443 break; 1443 break;
@@ -1452,7 +1452,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1452 { 1452 {
1453 foreach (var row in table.Rows) 1453 foreach (var row in table.Rows)
1454 { 1454 {
1455 this.Messaging.Write(ErrorMessages.UnexpectedTableInPatch(row.SourceLineNumbers, table.Name)); 1455 this.Messaging.Write(WindowsInstallerBackendErrors.UnexpectedTableInPatch(row.SourceLineNumbers, table.Name));
1456 } 1456 }
1457 } 1457 }
1458 break; 1458 break;
@@ -1481,7 +1481,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1481 { 1481 {
1482 foreach (var row in table.Rows) 1482 foreach (var row in table.Rows)
1483 { 1483 {
1484 this.Messaging.Write(ErrorMessages.OverlengthTableNameInProductOrMergeModule(row.SourceLineNumbers, table.Name)); 1484 this.Messaging.Write(WindowsInstallerBackendErrors.OverlengthTableNameInProductOrMergeModule(row.SourceLineNumbers, table.Name));
1485 } 1485 }
1486 } 1486 }
1487 break; 1487 break;
@@ -1504,7 +1504,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
1504 1504
1505 if (keyColumnIndex <= 0 || keyColumnIndex > keyTableDefinition.Columns.Length) 1505 if (keyColumnIndex <= 0 || keyColumnIndex > keyTableDefinition.Columns.Length)
1506 { 1506 {
1507 this.Messaging.Write(ErrorMessages.InvalidKeyColumn(tableDefinition.Name, columnDefinition.Name, columnDefinition.KeyTable, keyColumnIndex)); 1507 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidKeyColumn(tableDefinition.Name, columnDefinition.Name, columnDefinition.KeyTable, keyColumnIndex));
1508 } 1508 }
1509 else if (keyTableDefinition.Columns[keyColumnIndex - 1].ModularizeType != columnDefinition.ModularizeType && ColumnModularizeType.CompanionFile != columnDefinition.ModularizeType) 1509 else if (keyTableDefinition.Columns[keyColumnIndex - 1].ModularizeType != columnDefinition.ModularizeType && ColumnModularizeType.CompanionFile != columnDefinition.ModularizeType)
1510 { 1510 {
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
index 117923e5..5e360329 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ExtractMergeModuleFilesCommand.cs
@@ -120,11 +120,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
120 // If case-sensitive collision with another merge module or a user-authored file identifier. 120 // If case-sensitive collision with another merge module or a user-authored file identifier.
121 if (indexedFileFacades.TryGetValue(mergeModuleFileFacade.Id, out var collidingFacade)) 121 if (indexedFileFacades.TryGetValue(mergeModuleFileFacade.Id, out var collidingFacade))
122 { 122 {
123 this.Messaging.Write(ErrorMessages.DuplicateModuleFileIdentifier(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, collidingFacade.Id)); 123 this.Messaging.Write(WindowsInstallerBackendErrors.DuplicateModuleFileIdentifier(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, collidingFacade.Id));
124 } 124 }
125 else if (uniqueModuleFileIdentifiers.TryGetValue(mergeModuleFileFacade.Id, out collidingFacade)) // case-insensitive collision with another file identifier in the same merge module 125 else if (uniqueModuleFileIdentifiers.TryGetValue(mergeModuleFileFacade.Id, out collidingFacade)) // case-insensitive collision with another file identifier in the same merge module
126 { 126 {
127 this.Messaging.Write(ErrorMessages.DuplicateModuleCaseInsensitiveFileIdentifier(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, mergeModuleFileFacade.Id, collidingFacade.Id)); 127 this.Messaging.Write(WindowsInstallerBackendErrors.DuplicateModuleCaseInsensitiveFileIdentifier(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, mergeModuleFileFacade.Id, collidingFacade.Id));
128 } 128 }
129 else // no collision 129 else // no collision
130 { 130 {
@@ -156,7 +156,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
156 } 156 }
157 catch (FormatException) 157 catch (FormatException)
158 { 158 {
159 throw new WixException(ErrorMessages.MissingOrInvalidModuleInstallerVersion(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, wixMergeRow.SourceFile, moduleInstallerVersionString)); 159 throw new WixException(WindowsInstallerBackendErrors.MissingOrInvalidModuleInstallerVersion(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, wixMergeRow.SourceFile, moduleInstallerVersionString));
160 } 160 }
161 } 161 }
162 } 162 }
@@ -167,7 +167,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
167 } 167 }
168 catch (Win32Exception) 168 catch (Win32Exception)
169 { 169 {
170 throw new WixException(ErrorMessages.CannotOpenMergeModule(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, wixMergeRow.SourceFile)); 170 throw new WixException(WindowsInstallerBackendErrors.CannotOpenMergeModule(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, wixMergeRow.SourceFile));
171 } 171 }
172 172
173 return trackedFiles; 173 return trackedFiles;
@@ -186,7 +186,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
186 } 186 }
187 catch (FormatException) 187 catch (FormatException)
188 { 188 {
189 this.Messaging.Write(ErrorMessages.InvalidMergeLanguage(wixMergeRow.SourceLineNumbers, mergeId, wixMergeRow.Language.ToString())); 189 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidMergeLanguage(wixMergeRow.SourceLineNumbers, mergeId, wixMergeRow.Language.ToString()));
190 return; 190 return;
191 } 191 }
192 192
@@ -209,16 +209,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind
209 } 209 }
210 catch (FileNotFoundException) 210 catch (FileNotFoundException)
211 { 211 {
212 throw new WixException(ErrorMessages.CabFileDoesNotExist(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath)); 212 throw new WixException(WindowsInstallerBackendErrors.CabFileDoesNotExist(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath));
213 } 213 }
214 catch 214 catch
215 { 215 {
216 throw new WixException(ErrorMessages.CabExtractionFailed(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath)); 216 throw new WixException(WindowsInstallerBackendErrors.CabExtractionFailed(moduleCabPath, wixMergeRow.SourceFile, mergeIdPath));
217 } 217 }
218 } 218 }
219 catch (COMException ce) 219 catch (COMException ce)
220 { 220 {
221 throw new WixException(ErrorMessages.UnableToOpenModule(wixMergeRow.SourceLineNumbers, wixMergeRow.SourceFile, ce.Message)); 221 throw new WixException(WindowsInstallerBackendErrors.UnableToOpenModule(wixMergeRow.SourceLineNumbers, wixMergeRow.SourceFile, ce.Message));
222 } 222 }
223 finally 223 finally
224 { 224 {
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs
index fe6e322c..180ab3d6 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/FinalizeComponentGuids.cs
@@ -156,13 +156,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind
156 path.StartsWith(@"StartMenuFolder\programs", StringComparison.Ordinal) || 156 path.StartsWith(@"StartMenuFolder\programs", StringComparison.Ordinal) ||
157 path.StartsWith(@"WindowsFolder\fonts", StringComparison.Ordinal)) 157 path.StartsWith(@"WindowsFolder\fonts", StringComparison.Ordinal))
158 { 158 {
159 this.Messaging.Write(ErrorMessages.IllegalPathForGeneratedComponentGuid(componentSymbol.SourceLineNumbers, fileSymbol.ComponentRef, path)); 159 this.Messaging.Write(WindowsInstallerBackendErrors.IllegalPathForGeneratedComponentGuid(componentSymbol.SourceLineNumbers, fileSymbol.ComponentRef, path));
160 } 160 }
161 161
162 // if component has more than one file, the key path must be versioned 162 // if component has more than one file, the key path must be versioned
163 if (1 < numFilesInComponent && String.IsNullOrEmpty(fileSymbol.Version)) 163 if (1 < numFilesInComponent && String.IsNullOrEmpty(fileSymbol.Version))
164 { 164 {
165 this.Messaging.Write(ErrorMessages.IllegalGeneratedGuidComponentUnversionedKeypath(componentSymbol.SourceLineNumbers)); 165 this.Messaging.Write(WindowsInstallerBackendErrors.IllegalGeneratedGuidComponentUnversionedKeypath(componentSymbol.SourceLineNumbers));
166 } 166 }
167 } 167 }
168 else 168 else
@@ -170,7 +170,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
170 // not a key path, so it must be an unversioned file if component has more than one file 170 // not a key path, so it must be an unversioned file if component has more than one file
171 if (1 < numFilesInComponent && !String.IsNullOrEmpty(fileSymbol.Version)) 171 if (1 < numFilesInComponent && !String.IsNullOrEmpty(fileSymbol.Version))
172 { 172 {
173 this.Messaging.Write(ErrorMessages.IllegalGeneratedGuidComponentVersionedNonkeypath(componentSymbol.SourceLineNumbers)); 173 this.Messaging.Write(WindowsInstallerBackendErrors.IllegalGeneratedGuidComponentVersionedNonkeypath(componentSymbol.SourceLineNumbers));
174 } 174 }
175 } 175 }
176 } 176 }
@@ -234,7 +234,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
234 } 234 }
235 else 235 else
236 { 236 {
237 this.Messaging.Write(ErrorMessages.DuplicateComponentGuids(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId, type, path)); 237 this.Messaging.Write(WindowsInstallerBackendErrors.DuplicateComponentGuids(componentSymbol.SourceLineNumbers, componentSymbol.Id.Id, componentSymbol.ComponentId, type, path));
238 } 238 }
239 } 239 }
240 } 240 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs
index 4efc6a11..33ac6f69 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs
@@ -69,17 +69,17 @@ namespace WixToolset.Core.WindowsInstaller
69 // Compare the codepages. 69 // Compare the codepages.
70 if (targetOutput.Codepage != updatedOutput.Codepage && 0 == (TransformFlags.ErrorChangeCodePage & validationFlags)) 70 if (targetOutput.Codepage != updatedOutput.Codepage && 0 == (TransformFlags.ErrorChangeCodePage & validationFlags))
71 { 71 {
72 this.messaging.Write(ErrorMessages.OutputCodepageMismatch(targetOutput.SourceLineNumbers, targetOutput.Codepage, updatedOutput.Codepage)); 72 this.messaging.Write(WindowsInstallerBackendErrors.OutputCodepageMismatch(targetOutput.SourceLineNumbers, targetOutput.Codepage, updatedOutput.Codepage));
73 if (null != updatedOutput.SourceLineNumbers) 73 if (null != updatedOutput.SourceLineNumbers)
74 { 74 {
75 this.messaging.Write(ErrorMessages.OutputCodepageMismatch2(updatedOutput.SourceLineNumbers)); 75 this.messaging.Write(WindowsInstallerBackendErrors.OutputCodepageMismatch2(updatedOutput.SourceLineNumbers));
76 } 76 }
77 } 77 }
78 78
79 // Compare the output types. 79 // Compare the output types.
80 if (targetOutput.Type != updatedOutput.Type) 80 if (targetOutput.Type != updatedOutput.Type)
81 { 81 {
82 throw new WixException(ErrorMessages.OutputTypeMismatch(targetOutput.SourceLineNumbers, targetOutput.Type.ToString(), updatedOutput.Type.ToString())); 82 throw new WixException(WindowsInstallerBackendErrors.OutputTypeMismatch(targetOutput.SourceLineNumbers, targetOutput.Type.ToString(), updatedOutput.Type.ToString()));
83 } 83 }
84 84
85 // Compare the contents of the tables. 85 // Compare the contents of the tables.
@@ -309,7 +309,7 @@ namespace WixToolset.Core.WindowsInstaller
309 if (0 != targetTable.Definition.CompareTo(updatedTable.Definition)) 309 if (0 != targetTable.Definition.CompareTo(updatedTable.Definition))
310 { 310 {
311 // continue to the next table; may be more mismatches 311 // continue to the next table; may be more mismatches
312 this.messaging.Write(ErrorMessages.DatabaseSchemaMismatch(targetOutput.SourceLineNumbers, targetTable.Name)); 312 this.messaging.Write(WindowsInstallerBackendErrors.DatabaseSchemaMismatch(targetOutput.SourceLineNumbers, targetTable.Name));
313 } 313 }
314 else 314 else
315 { 315 {
@@ -369,7 +369,7 @@ namespace WixToolset.Core.WindowsInstaller
369 369
370 if ("*" == this.transformSummaryInfo.TargetProductCode) 370 if ("*" == this.transformSummaryInfo.TargetProductCode)
371 { 371 {
372 this.messaging.Write(ErrorMessages.ProductCodeInvalidForTransform(row.SourceLineNumbers)); 372 this.messaging.Write(WindowsInstallerBackendErrors.ProductCodeInvalidForTransform(row.SourceLineNumbers));
373 } 373 }
374 } 374 }
375 else if ("ProductVersion" == id) 375 else if ("ProductVersion" == id)
@@ -415,7 +415,7 @@ namespace WixToolset.Core.WindowsInstaller
415 415
416 if ("*" == this.transformSummaryInfo.UpdatedProductCode) 416 if ("*" == this.transformSummaryInfo.UpdatedProductCode)
417 { 417 {
418 this.messaging.Write(ErrorMessages.ProductCodeInvalidForTransform(row.SourceLineNumbers)); 418 this.messaging.Write(WindowsInstallerBackendErrors.ProductCodeInvalidForTransform(row.SourceLineNumbers));
419 } 419 }
420 } 420 }
421 else if ("ProductVersion" == id) 421 else if ("ProductVersion" == id)
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesFromTransforms.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesFromTransforms.cs
index 7c71e238..71f63ec9 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesFromTransforms.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/GetFileFacadesFromTransforms.cs
@@ -154,7 +154,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
154 // make sure Source is same. Otherwise we are silently ignoring a file. 154 // make sure Source is same. Otherwise we are silently ignoring a file.
155 if (0 != String.Compare(patchFileRow.Source, mainFileRow.Source, StringComparison.OrdinalIgnoreCase)) 155 if (0 != String.Compare(patchFileRow.Source, mainFileRow.Source, StringComparison.OrdinalIgnoreCase))
156 { 156 {
157 this.Messaging.Write(ErrorMessages.SameFileIdDifferentSource(mainFileRow.SourceLineNumbers, mainFileId, patchFileRow.Source, mainFileRow.Source)); 157 this.Messaging.Write(WindowsInstallerBackendErrors.SameFileIdDifferentSource(mainFileRow.SourceLineNumbers, mainFileId, patchFileRow.Source, mainFileRow.Source));
158 } 158 }
159 159
160#if TODO_PATCHING_DELTA 160#if TODO_PATCHING_DELTA
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs
index 475a88f9..dddb3264 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs
@@ -47,7 +47,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
47 { 47 {
48 if (tableDefinitions.Contains(tableDefinition.Name)) 48 if (tableDefinitions.Contains(tableDefinition.Name))
49 { 49 {
50 this.Messaging.Write(ErrorMessages.DuplicateExtensionTable(backendExtension.GetType().Assembly.Location, tableDefinition.Name)); 50 this.Messaging.Write(WindowsInstallerBackendErrors.DuplicateExtensionTable(backendExtension.GetType().Assembly.Location, tableDefinition.Name));
51 } 51 }
52 52
53 tableDefinitions.Add(tableDefinition); 53 tableDefinitions.Add(tableDefinition);
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
index 71a2e367..24837d39 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/MergeModulesCommand.cs
@@ -93,7 +93,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
93 } 93 }
94 catch (FormatException) 94 catch (FormatException)
95 { 95 {
96 this.Messaging.Write(ErrorMessages.InvalidMergeLanguage(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, wixMergeRow.Language.ToString())); 96 this.Messaging.Write(WindowsInstallerBackendErrors.InvalidMergeLanguage(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, wixMergeRow.Language.ToString()));
97 continue; 97 continue;
98 } 98 }
99 99
@@ -163,16 +163,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind
163 switch (mergeError.Type) 163 switch (mergeError.Type)
164 { 164 {
165 case MsmErrorType.msmErrorExclusion: 165 case MsmErrorType.msmErrorExclusion:
166 this.Messaging.Write(ErrorMessages.MergeExcludedModule(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, moduleKeys.ToString())); 166 this.Messaging.Write(WindowsInstallerBackendErrors.MergeExcludedModule(wixMergeRow.SourceLineNumbers, wixMergeRow.Id.Id, moduleKeys.ToString()));
167 break; 167 break;
168 case MsmErrorType.msmErrorFeatureRequired: 168 case MsmErrorType.msmErrorFeatureRequired:
169 this.Messaging.Write(ErrorMessages.MergeFeatureRequired(wixMergeRow.SourceLineNumbers, mergeError.ModuleTable, moduleKeys.ToString(), wixMergeRow.SourceFile, wixMergeRow.Id.Id)); 169 this.Messaging.Write(WindowsInstallerBackendErrors.MergeFeatureRequired(wixMergeRow.SourceLineNumbers, mergeError.ModuleTable, moduleKeys.ToString(), wixMergeRow.SourceFile, wixMergeRow.Id.Id));
170 break; 170 break;
171 case MsmErrorType.msmErrorLanguageFailed: 171 case MsmErrorType.msmErrorLanguageFailed:
172 this.Messaging.Write(ErrorMessages.MergeLanguageFailed(wixMergeRow.SourceLineNumbers, mergeError.Language, wixMergeRow.SourceFile)); 172 this.Messaging.Write(WindowsInstallerBackendErrors.MergeLanguageFailed(wixMergeRow.SourceLineNumbers, mergeError.Language, wixMergeRow.SourceFile));
173 break; 173 break;
174 case MsmErrorType.msmErrorLanguageUnsupported: 174 case MsmErrorType.msmErrorLanguageUnsupported:
175 this.Messaging.Write(ErrorMessages.MergeLanguageUnsupported(wixMergeRow.SourceLineNumbers, mergeError.Language, wixMergeRow.SourceFile)); 175 this.Messaging.Write(WindowsInstallerBackendErrors.MergeLanguageUnsupported(wixMergeRow.SourceLineNumbers, mergeError.Language, wixMergeRow.SourceFile));
176 break; 176 break;
177 case MsmErrorType.msmErrorResequenceMerge: 177 case MsmErrorType.msmErrorResequenceMerge:
178 this.Messaging.Write(WarningMessages.MergeRescheduledAction(wixMergeRow.SourceLineNumbers, mergeError.DatabaseTable, databaseKeys.ToString(), wixMergeRow.SourceFile)); 178 this.Messaging.Write(WarningMessages.MergeRescheduledAction(wixMergeRow.SourceLineNumbers, mergeError.DatabaseTable, databaseKeys.ToString(), wixMergeRow.SourceFile));
@@ -184,7 +184,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
184 } 184 }
185 break; 185 break;
186 case MsmErrorType.msmErrorPlatformMismatch: 186 case MsmErrorType.msmErrorPlatformMismatch:
187 this.Messaging.Write(ErrorMessages.MergePlatformMismatch(wixMergeRow.SourceLineNumbers, wixMergeRow.SourceFile)); 187 this.Messaging.Write(WindowsInstallerBackendErrors.MergePlatformMismatch(wixMergeRow.SourceLineNumbers, wixMergeRow.SourceFile));
188 break; 188 break;
189 default: 189 default:
190 this.Messaging.Write(ErrorMessages.UnexpectedException(String.Format(CultureInfo.CurrentUICulture, "Encountered an unexpected merge error of type '{0}' for which there is currently no error message to display. More information about the merge and the failure can be found in the merge log: '{1}'", Enum.GetName(typeof(MsmErrorType), mergeError.Type), logPath), "InvalidOperationException", Environment.StackTrace)); 190 this.Messaging.Write(ErrorMessages.UnexpectedException(String.Format(CultureInfo.CurrentUICulture, "Encountered an unexpected merge error of type '{0}' for which there is currently no error message to display. More information about the merge and the failure can be found in the merge log: '{1}'", Enum.GetName(typeof(MsmErrorType), mergeError.Type), logPath), "InvalidOperationException", Environment.StackTrace));
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
index ff7c6579..7f8452bd 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
@@ -100,7 +100,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
100 { 100 {
101 if (null == fileRecord) 101 if (null == fileRecord)
102 { 102 {
103 throw new WixException(ErrorMessages.FileIdentifierNotFound(facade.SourceLineNumber, facade.Id)); 103 throw new WixException(WindowsInstallerBackendErrors.FileIdentifierNotFound(facade.SourceLineNumber, facade.Id));
104 } 104 }
105 105
106 relativeFileLayoutPath = this.PathResolver.GetFileSourcePath(directories, fileRecord[1], fileRecord[2], this.Compressed, this.LongNamesInImage); 106 relativeFileLayoutPath = this.PathResolver.GetFileSourcePath(directories, fileRecord[1], fileRecord[2], this.Compressed, this.LongNamesInImage);
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
index 4f739420..28fa0533 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
@@ -78,10 +78,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
78 { 78 {
79 if (collidingActionSymbol.Overridable) 79 if (collidingActionSymbol.Overridable)
80 { 80 {
81 this.Messaging.Write(ErrorMessages.OverridableActionCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action)); 81 this.Messaging.Write(WindowsInstallerBackendErrors.OverridableActionCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
82 if (null != collidingActionSymbol.SourceLineNumbers) 82 if (null != collidingActionSymbol.SourceLineNumbers)
83 { 83 {
84 this.Messaging.Write(ErrorMessages.OverridableActionCollision2(collidingActionSymbol.SourceLineNumbers)); 84 this.Messaging.Write(WindowsInstallerBackendErrors.OverridableActionCollision2(collidingActionSymbol.SourceLineNumbers));
85 } 85 }
86 } 86 }
87 } 87 }
@@ -108,10 +108,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
108 108
109 if (requiredActionSymbols.TryGetValue(actionSymbol.Id.Id, out var collidingActionSymbol) && !collidingActionSymbol.Overridable) 109 if (requiredActionSymbols.TryGetValue(actionSymbol.Id.Id, out var collidingActionSymbol) && !collidingActionSymbol.Overridable)
110 { 110 {
111 this.Messaging.Write(ErrorMessages.ActionCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action)); 111 this.Messaging.Write(WindowsInstallerBackendErrors.ActionCollision(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
112 if (null != collidingActionSymbol.SourceLineNumbers) 112 if (null != collidingActionSymbol.SourceLineNumbers)
113 { 113 {
114 this.Messaging.Write(ErrorMessages.ActionCollision2(collidingActionSymbol.SourceLineNumbers)); 114 this.Messaging.Write(WindowsInstallerBackendErrors.ActionCollision2(collidingActionSymbol.SourceLineNumbers));
115 } 115 }
116 } 116 }
117 else 117 else
@@ -155,10 +155,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
155 } 155 }
156 else // suppressing a non-overridable action symbol 156 else // suppressing a non-overridable action symbol
157 { 157 {
158 this.Messaging.Write(ErrorMessages.SuppressNonoverridableAction(suppressActionSymbol.SourceLineNumbers, suppressActionSymbol.SequenceTable.ToString(), suppressActionSymbol.Action)); 158 this.Messaging.Write(WindowsInstallerBackendErrors.SuppressNonoverridableAction(suppressActionSymbol.SourceLineNumbers, suppressActionSymbol.SequenceTable.ToString(), suppressActionSymbol.Action));
159 if (null != requiredActionSymbol.SourceLineNumbers) 159 if (null != requiredActionSymbol.SourceLineNumbers)
160 { 160 {
161 this.Messaging.Write(ErrorMessages.SuppressNonoverridableAction2(requiredActionSymbol.SourceLineNumbers)); 161 this.Messaging.Write(WindowsInstallerBackendErrors.SuppressNonoverridableAction2(requiredActionSymbol.SourceLineNumbers));
162 } 162 }
163 } 163 }
164 } 164 }
@@ -177,14 +177,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind
177 // check for standard actions that don't have a sequence number in a merge module 177 // check for standard actions that don't have a sequence number in a merge module
178 if (SectionType.Module == this.Section.Type && WindowsInstallerStandard.IsStandardAction(actionSymbol.Action)) 178 if (SectionType.Module == this.Section.Type && WindowsInstallerStandard.IsStandardAction(actionSymbol.Action))
179 { 179 {
180 this.Messaging.Write(ErrorMessages.StandardActionRelativelyScheduledInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action)); 180 this.Messaging.Write(WindowsInstallerBackendErrors.StandardActionRelativelyScheduledInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
181 } 181 }
182 182
183 this.SequenceActionSymbol(actionSymbol, requiredActionSymbols, firstReference); 183 this.SequenceActionSymbol(actionSymbol, requiredActionSymbols, firstReference);
184 } 184 }
185 else if (SectionType.Module == this.Section.Type && 0 < actionSymbol.Sequence && !WindowsInstallerStandard.IsStandardAction(actionSymbol.Action)) // check for custom actions and dialogs that have a sequence number 185 else if (SectionType.Module == this.Section.Type && 0 < actionSymbol.Sequence && !WindowsInstallerStandard.IsStandardAction(actionSymbol.Action)) // check for custom actions and dialogs that have a sequence number
186 { 186 {
187 this.Messaging.Write(ErrorMessages.CustomActionSequencedInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action)); 187 this.Messaging.Write(WindowsInstallerBackendErrors.CustomActionSequencedInModule(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action));
188 } 188 }
189 } 189 }
190 190
@@ -289,19 +289,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind
289 // Create errors for all the before actions. 289 // Create errors for all the before actions.
290 foreach (var actionSymbol in relativeActions.PreviousActions) 290 foreach (var actionSymbol in relativeActions.PreviousActions)
291 { 291 {
292 this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, absoluteActionSymbol.Action)); 292 this.Messaging.Write(WindowsInstallerBackendErrors.ActionScheduledRelativeToTerminationAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, absoluteActionSymbol.Action));
293 } 293 }
294 294
295 // Create errors for all the after actions. 295 // Create errors for all the after actions.
296 foreach (var actionSymbol in relativeActions.NextActions) 296 foreach (var actionSymbol in relativeActions.NextActions)
297 { 297 {
298 this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, absoluteActionSymbol.Action)); 298 this.Messaging.Write(WindowsInstallerBackendErrors.ActionScheduledRelativeToTerminationAction(actionSymbol.SourceLineNumbers, actionSymbol.SequenceTable.ToString(), actionSymbol.Action, absoluteActionSymbol.Action));
299 } 299 }
300 300
301 // If there is source line information for the absolutely scheduled action display it 301 // If there is source line information for the absolutely scheduled action display it
302 if (absoluteActionSymbol.SourceLineNumbers != null) 302 if (absoluteActionSymbol.SourceLineNumbers != null)
303 { 303 {
304 this.Messaging.Write(ErrorMessages.ActionScheduledRelativeToTerminationAction2(absoluteActionSymbol.SourceLineNumbers)); 304 this.Messaging.Write(WindowsInstallerBackendErrors.ActionScheduledRelativeToTerminationAction2(absoluteActionSymbol.SourceLineNumbers));
305 } 305 }
306 306
307 continue; 307 continue;
@@ -316,10 +316,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
316 // look for collisions 316 // look for collisions
317 if (unusedSequence == previousUsedSequence) 317 if (unusedSequence == previousUsedSequence)
318 { 318 {
319 this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber(relativeActionSymbol.SourceLineNumbers, relativeActionSymbol.SequenceTable.ToString(), relativeActionSymbol.Action, absoluteActionSymbol.Action)); 319 this.Messaging.Write(WindowsInstallerBackendErrors.NoUniqueActionSequenceNumber(relativeActionSymbol.SourceLineNumbers, relativeActionSymbol.SequenceTable.ToString(), relativeActionSymbol.Action, absoluteActionSymbol.Action));
320 if (absoluteActionSymbol.SourceLineNumbers != null) 320 if (absoluteActionSymbol.SourceLineNumbers != null)
321 { 321 {
322 this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber2(absoluteActionSymbol.SourceLineNumbers)); 322 this.Messaging.Write(WindowsInstallerBackendErrors.NoUniqueActionSequenceNumber2(absoluteActionSymbol.SourceLineNumbers));
323 } 323 }
324 324
325 unusedSequence++; 325 unusedSequence++;
@@ -346,10 +346,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
346 346
347 if (unusedSequence == nextUsedSequence) 347 if (unusedSequence == nextUsedSequence)
348 { 348 {
349 this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber(relativeActionSymbol.SourceLineNumbers, relativeActionSymbol.SequenceTable.ToString(), relativeActionSymbol.Action, absoluteActionSymbol.Action)); 349 this.Messaging.Write(WindowsInstallerBackendErrors.NoUniqueActionSequenceNumber(relativeActionSymbol.SourceLineNumbers, relativeActionSymbol.SequenceTable.ToString(), relativeActionSymbol.Action, absoluteActionSymbol.Action));
350 if (absoluteActionSymbol.SourceLineNumbers != null) 350 if (absoluteActionSymbol.SourceLineNumbers != null)
351 { 351 {
352 this.Messaging.Write(ErrorMessages.NoUniqueActionSequenceNumber2(absoluteActionSymbol.SourceLineNumbers)); 352 this.Messaging.Write(WindowsInstallerBackendErrors.NoUniqueActionSequenceNumber2(absoluteActionSymbol.SourceLineNumbers));
353 } 353 }
354 354
355 unusedSequence--; 355 unusedSequence--;
@@ -681,7 +681,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
681 } 681 }
682 else if (existingInitialActionSymbol == actionSymbol) 682 else if (existingInitialActionSymbol == actionSymbol)
683 { 683 {
684 this.Messaging.Write(ErrorMessages.ActionCircularDependency(currentActionSymbol.SourceLineNumbers, currentActionSymbol.SequenceTable.ToString(), currentActionSymbol.Action, previousActionSymbol.Action)); 684 this.Messaging.Write(WindowsInstallerBackendErrors.ActionCircularDependency(currentActionSymbol.SourceLineNumbers, currentActionSymbol.SequenceTable.ToString(), currentActionSymbol.Action, previousActionSymbol.Action));
685 } 685 }
686 686
687 parentActionSymbol = this.GetParentActionSymbol(currentActionSymbol, requiredActionSymbols); 687 parentActionSymbol = this.GetParentActionSymbol(currentActionSymbol, requiredActionSymbols);
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
index 75e536c2..b6ff5fbd 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFileFacadesCommand.cs
@@ -191,7 +191,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
191 191
192 if (!fileInfo.Exists) 192 if (!fileInfo.Exists)
193 { 193 {
194 this.Messaging.Write(ErrorMessages.CannotFindFile(facade.SourceLineNumber, facade.Id, facade.FileName, facade.SourcePath)); 194 this.Messaging.Write(WindowsInstallerBackendErrors.CannotFindFile(facade.SourceLineNumber, facade.Id, facade.FileName, facade.SourcePath));
195 return; 195 return;
196 } 196 }
197 197
@@ -199,7 +199,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
199 { 199 {
200 if (Int32.MaxValue < fileStream.Length) 200 if (Int32.MaxValue < fileStream.Length)
201 { 201 {
202 throw new WixException(ErrorMessages.FileTooLarge(facade.SourceLineNumber, facade.SourcePath)); 202 throw new WixException(WindowsInstallerBackendErrors.FileTooLarge(facade.SourceLineNumber, facade.SourcePath));
203 } 203 }
204 204
205 facade.FileSize = Convert.ToInt32(fileStream.Length, CultureInfo.InvariantCulture); 205 facade.FileSize = Convert.ToInt32(fileStream.Length, CultureInfo.InvariantCulture);
@@ -348,7 +348,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
348 } 348 }
349 else if (assemblySymbol.ApplicationFileRef == null) 349 else if (assemblySymbol.ApplicationFileRef == null)
350 { 350 {
351 throw new WixException(ErrorMessages.GacAssemblyNoStrongName(facade.SourceLineNumber, fileInfo.FullName, facade.ComponentRef)); 351 throw new WixException(WindowsInstallerBackendErrors.GacAssemblyNoStrongName(facade.SourceLineNumber, fileInfo.FullName, facade.ComponentRef));
352 } 352 }
353 353
354 if (!String.IsNullOrEmpty(assemblyName.FileVersion)) 354 if (!String.IsNullOrEmpty(assemblyName.FileVersion))
@@ -375,7 +375,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
375 var fileManifest = this.AllFileFacades.FirstOrDefault(r => r.Id.Equals(assemblySymbol.ManifestFileRef, StringComparison.Ordinal)); 375 var fileManifest = this.AllFileFacades.FirstOrDefault(r => r.Id.Equals(assemblySymbol.ManifestFileRef, StringComparison.Ordinal));
376 if (null == fileManifest) 376 if (null == fileManifest)
377 { 377 {
378 this.Messaging.Write(ErrorMessages.MissingManifestForWin32Assembly(facade.SourceLineNumber, facade.Id, assemblySymbol.ManifestFileRef)); 378 this.Messaging.Write(WindowsInstallerBackendErrors.MissingManifestForWin32Assembly(facade.SourceLineNumber, facade.Id, assemblySymbol.ManifestFileRef));
379 } 379 }
380 380
381 try 381 try
@@ -429,7 +429,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
429 String.IsNullOrEmpty(assemblySymbol.ApplicationFileRef) && 429 String.IsNullOrEmpty(assemblySymbol.ApplicationFileRef) &&
430 !String.Equals(Path.GetFileNameWithoutExtension(facade.FileName), value, StringComparison.OrdinalIgnoreCase)) 430 !String.Equals(Path.GetFileNameWithoutExtension(facade.FileName), value, StringComparison.OrdinalIgnoreCase))
431 { 431 {
432 this.Messaging.Write(ErrorMessages.GACAssemblyIdentityWarning(facade.SourceLineNumber, Path.GetFileNameWithoutExtension(facade.FileName), value)); 432 this.Messaging.Write(WindowsInstallerBackendErrors.GACAssemblyIdentityWarning(facade.SourceLineNumber, Path.GetFileNameWithoutExtension(facade.FileName), value));
433 } 433 }
434 434
435 // Override directly authored value, otherwise remember the gathered information on the facade for use later. 435 // Override directly authored value, otherwise remember the gathered information on the facade for use later.
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFromTextFilesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFromTextFilesCommand.cs
index 66a648cc..fec1302f 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFromTextFilesCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateFromTextFilesCommand.cs
@@ -56,15 +56,15 @@ namespace WixToolset.Core.WindowsInstaller.Bind
56 } 56 }
57 catch (DirectoryNotFoundException e) 57 catch (DirectoryNotFoundException e)
58 { 58 {
59 this.Messaging.Write(ErrorMessages.BinderFileManagerMissingFile(sourceLineNumbers, e.Message)); 59 this.Messaging.Write(WindowsInstallerBackendErrors.BinderFileManagerMissingFile(sourceLineNumbers, e.Message));
60 } 60 }
61 catch (FileNotFoundException e) 61 catch (FileNotFoundException e)
62 { 62 {
63 this.Messaging.Write(ErrorMessages.BinderFileManagerMissingFile(sourceLineNumbers, e.Message)); 63 this.Messaging.Write(WindowsInstallerBackendErrors.BinderFileManagerMissingFile(sourceLineNumbers, e.Message));
64 } 64 }
65 catch (IOException e) 65 catch (IOException e)
66 { 66 {
67 this.Messaging.Write(ErrorMessages.BinderFileManagerMissingFile(sourceLineNumbers, e.Message)); 67 this.Messaging.Write(WindowsInstallerBackendErrors.BinderFileManagerMissingFile(sourceLineNumbers, e.Message));
68 } 68 }
69 catch (NotSupportedException) 69 catch (NotSupportedException)
70 { 70 {
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
index 209ab550..56f32308 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
@@ -301,14 +301,14 @@ namespace WixToolset.Core.WindowsInstaller.Bind
301 { 301 {
302 if (duplicateFilesSequence < installFilesSequence) 302 if (duplicateFilesSequence < installFilesSequence)
303 { 303 {
304 throw new WixException(ErrorMessages.InsertInvalidSequenceActionOrder(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action)); 304 throw new WixException(WindowsInstallerBackendErrors.InsertInvalidSequenceActionOrder(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action));
305 } 305 }
306 else 306 else
307 { 307 {
308 sequence = (duplicateFilesSequence + installFilesSequence) / 2; 308 sequence = (duplicateFilesSequence + installFilesSequence) / 2;
309 if (installFilesSequence == sequence || duplicateFilesSequence == sequence) 309 if (installFilesSequence == sequence || duplicateFilesSequence == sequence)
310 { 310 {
311 throw new WixException(ErrorMessages.InsertSequenceNoSpace(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action)); 311 throw new WixException(WindowsInstallerBackendErrors.InsertSequenceNoSpace(mainFileRow.SourceLineNumbers, tableName, "InstallFiles", "DuplicateFiles", patchFilesActionSymbol.Action));
312 } 312 }
313 } 313 }
314 } 314 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs
index 373cd2d4..f5e6f1de 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/CommandLine/TransformSubcommand.cs
@@ -325,7 +325,7 @@ namespace WixToolset.Core.WindowsInstaller.CommandLine
325 325
326 if (null == transform.Tables || 0 >= transform.Tables.Count) 326 if (null == transform.Tables || 0 >= transform.Tables.Count)
327 { 327 {
328 this.Messaging.Write(ErrorMessages.NoDifferencesInTransform(new SourceLineNumber(this.OutputPath))); 328 this.Messaging.Write(WindowsInstallerBackendErrors.NoDifferencesInTransform(new SourceLineNumber(this.OutputPath)));
329 } 329 }
330 } 330 }
331 331
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
index 8f23a886..dc3ee06d 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
@@ -199,7 +199,7 @@ namespace WixToolset.Core.WindowsInstaller.Decompile
199 } 199 }
200 else 200 else
201 { 201 {
202 this.Messaging.Write(ErrorMessages.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name)); 202 this.Messaging.Write(WindowsInstallerBackendErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
203 } 203 }
204 } 204 }
205 } 205 }
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs b/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs
index e4cfe22d..dff24d1a 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Differ.cs
@@ -66,17 +66,17 @@ namespace WixToolset.Core.WindowsInstaller
66 // compare the codepages 66 // compare the codepages
67 if (targetOutput.Codepage != updatedOutput.Codepage && 0 == (TransformFlags.ErrorChangeCodePage & validationFlags)) 67 if (targetOutput.Codepage != updatedOutput.Codepage && 0 == (TransformFlags.ErrorChangeCodePage & validationFlags))
68 { 68 {
69 this.messaging.Write(ErrorMessages.OutputCodepageMismatch(targetOutput.SourceLineNumbers, targetOutput.Codepage, updatedOutput.Codepage)); 69 this.messaging.Write(WindowsInstallerBackendErrors.OutputCodepageMismatch(targetOutput.SourceLineNumbers, targetOutput.Codepage, updatedOutput.Codepage));
70 if (null != updatedOutput.SourceLineNumbers) 70 if (null != updatedOutput.SourceLineNumbers)
71 { 71 {
72 this.messaging.Write(ErrorMessages.OutputCodepageMismatch2(updatedOutput.SourceLineNumbers)); 72 this.messaging.Write(WindowsInstallerBackendErrors.OutputCodepageMismatch2(updatedOutput.SourceLineNumbers));
73 } 73 }
74 } 74 }
75 75
76 // compare the output types 76 // compare the output types
77 if (targetOutput.Type != updatedOutput.Type) 77 if (targetOutput.Type != updatedOutput.Type)
78 { 78 {
79 throw new WixException(ErrorMessages.OutputTypeMismatch(targetOutput.SourceLineNumbers, targetOutput.Type.ToString(), updatedOutput.Type.ToString())); 79 throw new WixException(WindowsInstallerBackendErrors.OutputTypeMismatch(targetOutput.SourceLineNumbers, targetOutput.Type.ToString(), updatedOutput.Type.ToString()));
80 } 80 }
81 81
82 // compare the contents of the tables 82 // compare the contents of the tables
@@ -328,7 +328,7 @@ namespace WixToolset.Core.WindowsInstaller
328 if (0 != targetTable.Definition.CompareTo(updatedTable.Definition)) 328 if (0 != targetTable.Definition.CompareTo(updatedTable.Definition))
329 { 329 {
330 // continue to the next table; may be more mismatches 330 // continue to the next table; may be more mismatches
331 this.messaging.Write(ErrorMessages.DatabaseSchemaMismatch(targetOutput.SourceLineNumbers, targetTable.Name)); 331 this.messaging.Write(WindowsInstallerBackendErrors.DatabaseSchemaMismatch(targetOutput.SourceLineNumbers, targetTable.Name));
332 } 332 }
333 else 333 else
334 { 334 {
@@ -380,7 +380,7 @@ namespace WixToolset.Core.WindowsInstaller
380 this.transformSummaryInfo.TargetProductCode = (string)row[1]; 380 this.transformSummaryInfo.TargetProductCode = (string)row[1];
381 if ("*" == this.transformSummaryInfo.TargetProductCode) 381 if ("*" == this.transformSummaryInfo.TargetProductCode)
382 { 382 {
383 this.messaging.Write(ErrorMessages.ProductCodeInvalidForTransform(row.SourceLineNumbers)); 383 this.messaging.Write(WindowsInstallerBackendErrors.ProductCodeInvalidForTransform(row.SourceLineNumbers));
384 } 384 }
385 } 385 }
386 else if ("ProductVersion" == (string)row[0]) 386 else if ("ProductVersion" == (string)row[0])
@@ -421,7 +421,7 @@ namespace WixToolset.Core.WindowsInstaller
421 this.transformSummaryInfo.UpdatedProductCode = (string)row[1]; 421 this.transformSummaryInfo.UpdatedProductCode = (string)row[1];
422 if ("*" == this.transformSummaryInfo.UpdatedProductCode) 422 if ("*" == this.transformSummaryInfo.UpdatedProductCode)
423 { 423 {
424 this.messaging.Write(ErrorMessages.ProductCodeInvalidForTransform(row.SourceLineNumbers)); 424 this.messaging.Write(WindowsInstallerBackendErrors.ProductCodeInvalidForTransform(row.SourceLineNumbers));
425 } 425 }
426 } 426 }
427 else if ("ProductVersion" == (string)row[0]) 427 else if ("ProductVersion" == (string)row[0])
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs
index 344cccb8..bd1b31e0 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs
@@ -57,7 +57,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe
57 var attributes = File.GetAttributes(databasePath); 57 var attributes = File.GetAttributes(databasePath);
58 if (FileAttributes.ReadOnly == (attributes & FileAttributes.ReadOnly)) 58 if (FileAttributes.ReadOnly == (attributes & FileAttributes.ReadOnly))
59 { 59 {
60 this.Messaging.Write(ErrorMessages.ReadOnlyOutputFile(databasePath)); 60 this.Messaging.Write(WindowsInstallerBackendErrors.ReadOnlyOutputFile(databasePath));
61 return shouldCommit; 61 return shouldCommit;
62 } 62 }
63 63
@@ -175,7 +175,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe
175 // If the cabs aren't there, throw an error but continue to catch the other errors 175 // If the cabs aren't there, throw an error but continue to catch the other errors
176 if (!File.Exists(cabPath)) 176 if (!File.Exists(cabPath))
177 { 177 {
178 this.Messaging.Write(ErrorMessages.WixFileNotFound(cabPath)); 178 this.Messaging.Write(WindowsInstallerBackendErrors.WixFileNotFound(cabPath));
179 continue; 179 continue;
180 } 180 }
181 181
@@ -201,11 +201,11 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe
201 if ((5 == Environment.OSVersion.Version.Major && 2 == Environment.OSVersion.Version.Minor) || // W2K3 201 if ((5 == Environment.OSVersion.Version.Major && 2 == Environment.OSVersion.Version.Minor) || // W2K3
202 (5 == Environment.OSVersion.Version.Major && 1 == Environment.OSVersion.Version.Minor)) // XP 202 (5 == Environment.OSVersion.Version.Major && 1 == Environment.OSVersion.Version.Minor)) // XP
203 { 203 {
204 this.Messaging.Write(ErrorMessages.UnableToGetAuthenticodeCertOfFileDownlevelOS(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); 204 this.Messaging.Write(WindowsInstallerBackendErrors.UnableToGetAuthenticodeCertOfFileDownlevelOS(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult)));
205 } 205 }
206 else // otherwise, generic error 206 else // otherwise, generic error
207 { 207 {
208 this.Messaging.Write(ErrorMessages.UnableToGetAuthenticodeCertOfFile(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); 208 this.Messaging.Write(WindowsInstallerBackendErrors.UnableToGetAuthenticodeCertOfFile(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult)));
209 } 209 }
210 } 210 }
211 211
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindTransformCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindTransformCommand.cs
index 5df38db3..5b92fa91 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindTransformCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Unbind/UnbindTransformCommand.cs
@@ -290,7 +290,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
290 // this commonly happens when the transform was built 290 // this commonly happens when the transform was built
291 // against a database schema different from the internal 291 // against a database schema different from the internal
292 // table definitions 292 // table definitions
293 throw new WixException(ErrorMessages.TransformSchemaMismatch()); 293 throw new WixException(WindowsInstallerBackendErrors.TransformSchemaMismatch());
294 } 294 }
295 } 295 }
296 296
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs
index a9f03171..169a1e29 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Validate/ValidateDatabaseCommand.cs
@@ -116,7 +116,7 @@ namespace WixToolset.Core.WindowsInstaller.Validate
116 { 116 {
117 case ValidationMessageType.InternalFailure: 117 case ValidationMessageType.InternalFailure:
118 case ValidationMessageType.Error: 118 case ValidationMessageType.Error:
119 this.Messaging.Write(ErrorMessages.ValidationError(messageSourceLineNumbers, message.IceName, message.Description)); 119 this.Messaging.Write(WindowsInstallerBackendErrors.ValidationError(messageSourceLineNumbers, message.IceName, message.Description));
120 break; 120 break;
121 case ValidationMessageType.Warning: 121 case ValidationMessageType.Warning:
122 this.Messaging.Write(WarningMessages.ValidationWarning(messageSourceLineNumbers, message.IceName, message.Description)); 122 this.Messaging.Write(WarningMessages.ValidationWarning(messageSourceLineNumbers, message.IceName, message.Description));
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs
index 0935d964..ae9a03f4 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs
@@ -54,6 +54,441 @@ namespace WixToolset.Core.WindowsInstaller
54 return Message(null, Ids.UnknownValidationTargetFileExtension, "Unknown file extension: {0}. Use the -cub switch to specify the path to the ICE CUBe file", fileExtension); 54 return Message(null, Ids.UnknownValidationTargetFileExtension, "Unknown file extension: {0}. Use the -cub switch to specify the path to the ICE CUBe file", fileExtension);
55 } 55 }
56 56
57 public static Message ActionCircularDependency(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
58 {
59 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);
60 }
61
62 public static Message ActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
63 {
64 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);
65 }
66
67 public static Message ActionCollision2(SourceLineNumber sourceLineNumbers)
68 {
69 return Message(sourceLineNumbers, Ids.ActionCollision2, "The location of the action related to previous error.");
70 }
71
72 public static Message ActionScheduledRelativeToTerminationAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
73 {
74 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);
75 }
76
77 public static Message ActionScheduledRelativeToTerminationAction2(SourceLineNumber sourceLineNumbers)
78 {
79 return Message(sourceLineNumbers, Ids.ActionScheduledRelativeToTerminationAction2, "The location of the special termination action related to previous error(s).");
80 }
81
82 public static Message BinderFileManagerMissingFile(SourceLineNumber sourceLineNumbers, string exceptionMessage)
83 {
84 return Message(sourceLineNumbers, Ids.BinderFileManagerMissingFile, "{0}", exceptionMessage);
85 }
86
87 public static Message BothUpgradeCodesRequired()
88 {
89 return Message(null, Ids.BothUpgradeCodesRequired, "Both the target and updated package authoring must define the Package/@UpgradeCode attribute if the transform validates the UpgradeCode (default). Either define the Package/@UpgradeCode attribute in both the target and updated authoring, or set the Validate/@UpgradeCode attribute to 'no' in the patch authoring.");
90 }
91
92 public static Message CabExtractionFailed(string cabName, string directoryName)
93 {
94 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);
95 }
96
97 public static Message CabExtractionFailed(string cabName, string mergeModulePath, string directoryName)
98 {
99 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);
100 }
101
102 public static Message CabFileDoesNotExist(string cabName, string mergeModulePath, string directoryName)
103 {
104 return Message(null, Ids.CabFileDoesNotExist, "Attempted to extract cab '{0}' from merge module '{1}' to directory '{2}'. The cab file was not found. This usually means that you have a merge module without a cabinet inside it.", cabName, mergeModulePath, directoryName);
105 }
106
107 public static Message CannotFindFile(SourceLineNumber sourceLineNumbers, string fileId, string fileName, string filePath)
108 {
109 return Message(sourceLineNumbers, Ids.CannotFindFile, "The file with id '{0}' and name '{1}' could not be found with source path: '{2}'.", fileId, fileName, filePath);
110 }
111
112 public static Message CannotOpenMergeModule(SourceLineNumber sourceLineNumbers, string mergeModuleIdentifier, string mergeModuleFile)
113 {
114 return Message(sourceLineNumbers, Ids.CannotOpenMergeModule, "Cannot open the merge module '{0}' from file '{1}'.", mergeModuleIdentifier, mergeModuleFile);
115 }
116
117 public static Message CouldNotDetermineProductCodeFromTransformSummaryInfo()
118 {
119 return Message(null, Ids.CouldNotDetermineProductCodeFromTransformSummaryInfo, "Could not determine ProductCode from transform summary information.");
120 }
121
122 public static Message CreateCabAddFileFailed()
123 {
124 return Message(null, Ids.CreateCabAddFileFailed, "An error (E_FAIL) was returned while creating a CAB file. The most common cause of this error is attempting to create a CAB file larger than 2GB. You can reduce the size of your installation package, use a higher compression level, or split your files into more than one CAB file.");
125 }
126
127 public static Message CreateCabInsufficientDiskSpace()
128 {
129 return Message(null, Ids.CreateCabInsufficientDiskSpace, "An error (ERROR_DISK_FULL) was returned while creating a CAB file. This means you have insufficient disk space. Clear disk space and try again.");
130 }
131
132 public static Message CustomActionSequencedInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
133 {
134 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);
135 }
136
137 public static Message DatabaseSchemaMismatch(SourceLineNumber sourceLineNumbers, string tableName)
138 {
139 return Message(sourceLineNumbers, Ids.DatabaseSchemaMismatch, "The table definition of '{0}' in the target database does not match the table definition in the updated database. A transform requires that the target database schema match the updated database schema.", tableName);
140 }
141
142 public static Message DuplicateCabinetName(SourceLineNumber sourceLineNumbers, string cabinetName)
143 {
144 return Message(sourceLineNumbers, Ids.DuplicateCabinetName, "Duplicate cabinet name '{0}' found.", cabinetName);
145 }
146
147 public static Message DuplicateCabinetName2(SourceLineNumber sourceLineNumbers, string cabinetName)
148 {
149 return Message(sourceLineNumbers, Ids.DuplicateCabinetName2, "Duplicate cabinet name '{0}' error related to previous error.", cabinetName);
150 }
151
152 public static Message DuplicateComponentGuids(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
153 {
154 return Message(sourceLineNumbers, Ids.DuplicateComponentGuids, "Component/@Id='{0}' with {2} '{3}' has a @Guid value '{1}' that duplicates another component in this package. It is recommended to give each component its own unique GUID.", componentId, guid, type, keyPath);
155 }
156
157 public static Message DuplicateExtensionTable(string extension, string tableName)
158 {
159 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);
160 }
161
162 public static Message DuplicateModuleCaseInsensitiveFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId1, string fileId2)
163 {
164 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);
165 }
166
167 public static Message DuplicateModuleFileIdentifier(SourceLineNumber sourceLineNumbers, string moduleId, string fileId)
168 {
169 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);
170 }
171
172 public static Message ExpectedClientPatchIdInWixMsp()
173 {
174 return Message(null, Ids.ExpectedClientPatchIdInWixMsp, "The WixMsp is missing the client patch ID. Recompile the patch source files with the latest WiX toolset.");
175 }
176
177 public static Message ExpectedMediaCabinet(SourceLineNumber sourceLineNumbers, string fileId, int diskId)
178 {
179 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);
180 }
181
182 public static Message ExpectedMediaRowsInWixMsp()
183 {
184 return Message(null, Ids.ExpectedMediaRowsInWixMsp, "The WixMsp has no media rows defined.");
185 }
186
187 public static Message ExpectedPatchIdInWixMsp()
188 {
189 return Message(null, Ids.ExpectedPatchIdInWixMsp, "The WixMsp is missing the patch ID.");
190 }
191
192 public static Message FileIdentifierNotFound(SourceLineNumber sourceLineNumbers, string fileIdentifier)
193 {
194 return Message(sourceLineNumbers, Ids.FileIdentifierNotFound, "The file row with identifier '{0}' could not be found.", fileIdentifier);
195 }
196
197 public static Message FileTooLarge(SourceLineNumber sourceLineNumbers, string fileName)
198 {
199 return Message(sourceLineNumbers, Ids.FileTooLarge, "'{0}' is too large, file size must be less than 2147483648.", fileName);
200 }
201
202 public static Message GACAssemblyIdentityWarning(SourceLineNumber sourceLineNumbers, string fileName, string assemblyName)
203 {
204 return Message(sourceLineNumbers, Ids.GACAssemblyIdentityWarning, "The destination name of file '{0}' does not match its assembly name '{1}' in your authoring. This will cause an installation failure for this assembly, because it will be installed to the Global Assembly Cache. To fix this error, update File/@Name of file '{0}' to be the actual name of the assembly.", fileName, assemblyName);
205 }
206
207 public static Message GacAssemblyNoStrongName(SourceLineNumber sourceLineNumbers, string assemblyName, string componentName)
208 {
209 return Message(sourceLineNumbers, Ids.GacAssemblyNoStrongName, "Assembly {0} in component {1} has no strong name and has been marked to be placed in the GAC. All assemblies installed to the GAC must have a valid strong name.", assemblyName, componentName);
210 }
211
212 public static Message IllegalGeneratedGuidComponentUnversionedKeypath(SourceLineNumber sourceLineNumbers)
213 {
214 return Message(sourceLineNumbers, Ids.IllegalGeneratedGuidComponentUnversionedKeypath, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with more than one file cannot use an automatically generated guid unless a versioned file is the keypath and the other files are unversioned. This component's keypath is not versioned. Create multiple components to use automatically generated guids.");
215 }
216
217 public static Message IllegalGeneratedGuidComponentVersionedNonkeypath(SourceLineNumber sourceLineNumbers)
218 {
219 return Message(sourceLineNumbers, Ids.IllegalGeneratedGuidComponentVersionedNonkeypath, "The Component/@Guid attribute's value '*' is not valid for this component because it does not meet the criteria for having an automatically generated guid. Components with more than one file cannot use an automatically generated guid unless a versioned file is the keypath and the other files are unversioned. This component has a non-keypath file that is versioned. Create multiple components to use automatically generated guids.");
220 }
221
222 public static Message IllegalPathForGeneratedComponentGuid(SourceLineNumber sourceLineNumbers, string componentName, string keyFilePath)
223 {
224 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);
225 }
226
227 public static Message InsertInvalidSequenceActionOrder(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionNameBefore, string actionNameAfter, string actionNameNew)
228 {
229 return Message(sourceLineNumbers, Ids.InsertInvalidSequenceActionOrder, "Invalid order of actions {1} and {2} in sequence table {0}. Action {3} must occur after {1} and before {2}, but {2} is currently sequenced after {1}. Please fix the ordering or explicitly supply a location for the action {3}.", sequenceTableName, actionNameBefore, actionNameAfter, actionNameNew);
230 }
231
232 public static Message InsertSequenceNoSpace(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionNameBefore, string actionNameAfter, string actionNameNew)
233 {
234 return Message(sourceLineNumbers, Ids.InsertSequenceNoSpace, "Not enough space exists to sequence action {3} in table {0}. It must be sequenced after {1} and before {2}, but those two actions are currently sequenced next to each other. Please move one of those actions to allow {3} to be inserted between them.", sequenceTableName, actionNameBefore, actionNameAfter, actionNameNew);
235 }
236
237 public static Message IntermediatesMustBeResolved(string invalidIntermediate)
238 {
239 return Message(null, Ids.IntermediatesMustBeResolved, "Intermediates being bound must have been resolved. This intermediate was not resolved: {0}", invalidIntermediate);
240 }
241
242 public static Message InvalidAddedFileRowWithoutSequence(SourceLineNumber sourceLineNumbers, string fileRowId)
243 {
244 return Message(sourceLineNumbers, Ids.InvalidAddedFileRowWithoutSequence, "A row has been added to the File table with id '{1}' that does not have a sequence number assigned to it. Create your transform from a pair of msi's instead of xml outputs to get sequences assigned to your File table's rows.", fileRowId);
245 }
246
247 public static Message InvalidAssemblyFile(SourceLineNumber sourceLineNumbers, string assemblyFile, string moreInformation)
248 {
249 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);
250 }
251
252 public static Message InvalidKeyColumn(string tableName, string columnName, string foreignTableName, int foreignColumnNumber)
253 {
254 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);
255 }
256
257 public static Message InvalidKeypathChange(SourceLineNumber sourceLineNumbers, string component, string transformPath)
258 {
259 return Message(sourceLineNumbers, Ids.InvalidKeypathChange, "Component '{0}' has a changed keypath in the transform '{1}'. Patches cannot change the keypath of a component.", component, transformPath);
260 }
261
262 public static Message InvalidManifestContent(SourceLineNumber sourceLineNumbers, string fileName)
263 {
264 return Message(sourceLineNumbers, Ids.InvalidManifestContent, "The manifest '{0}' does not have the required assembly/assemblyIdentity element.", fileName);
265 }
266
267 public static Message InvalidMergeLanguage(SourceLineNumber sourceLineNumbers, string mergeId, string mergeLanguage)
268 {
269 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);
270 }
271
272 public static Message InvalidRemoveComponent(SourceLineNumber sourceLineNumbers, string component, string feature, string transformPath)
273 {
274 return Message(sourceLineNumbers, Ids.InvalidRemoveComponent, "Removing component '{0}' from feature '{1}' is not supported. Either the component was removed or the guid changed in the transform '{2}'. Add the component back, undo the change to the component guid, or remove the entire feature.", component, feature, transformPath);
275 }
276
277 public static Message InvalidStringForCodepage(SourceLineNumber sourceLineNumbers, string codepage)
278 {
279 return Message(sourceLineNumbers, Ids.InvalidStringForCodepage, "A string was provided with characters that are not available in the specified database code page '{0}'. Either change these characters to ones that exist in the database's code page, or update the database's code page by modifying one of the following attributes: Package/@Codepage, Module/@Codepage, Patch/@Codepage, or WixLocalization/@Codepage.", codepage);
280 }
281
282 public static Message MaximumCabinetSizeForLargeFileSplittingTooLarge(SourceLineNumber sourceLineNumbers, int maximumCabinetSizeForLargeFileSplitting, int maxValueOfMaxCabSizeForLargeFileSplitting)
283 {
284 return Message(sourceLineNumbers, Ids.MaximumCabinetSizeForLargeFileSplittingTooLarge, "'{0}' is too large. Reduce the size of maximum cabinet size for large file splitting. The maximum permitted value is '{1}' MB.", maximumCabinetSizeForLargeFileSplitting, maxValueOfMaxCabSizeForLargeFileSplitting);
285 }
286
287 public static Message MaximumUncompressedMediaSizeTooLarge(SourceLineNumber sourceLineNumbers, int maximumUncompressedMediaSize)
288 {
289 return Message(sourceLineNumbers, Ids.MaximumUncompressedMediaSizeTooLarge, "'{0}' is too large. Reduce the size of maximum uncompressed media size.", maximumUncompressedMediaSize);
290 }
291
292 public static Message MediaTableCollision(SourceLineNumber sourceLineNumbers)
293 {
294 return Message(sourceLineNumbers, Ids.MediaTableCollision, "Only one of Media and MediaTemplate tables should be authored.");
295 }
296
297 public static Message MergeExcludedModule(SourceLineNumber sourceLineNumbers, string mergeId, string otherMergeId)
298 {
299 return Message(sourceLineNumbers, Ids.MergeExcludedModule, "The module '{0}' cannot be merged because it excludes or is excluded by the merge module with signature '{1}'.", mergeId, otherMergeId);
300 }
301
302 public static Message MergeFeatureRequired(SourceLineNumber sourceLineNumbers, string tableName, string primaryKeys, string mergeModuleFile, string mergeId)
303 {
304 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);
305 }
306
307 public static Message MergeLanguageFailed(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile)
308 {
309 return Message(sourceLineNumbers, Ids.MergeLanguageFailed, "The language '{0}' is supported but uses an invalid language transform in the merge module '{1}'.", language, mergeModuleFile);
310 }
311
312 public static Message MergeLanguageUnsupported(SourceLineNumber sourceLineNumbers, short language, string mergeModuleFile)
313 {
314 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);
315 }
316
317 public static Message MergePlatformMismatch(SourceLineNumber sourceLineNumbers, string mergeModuleFile)
318 {
319 return Message(sourceLineNumbers, Ids.MergePlatformMismatch, "'{0}' is a 64-bit merge module but the product consuming it is 32-bit. 32-bit products can consume only 32-bit merge modules.", mergeModuleFile);
320 }
321
322 public static Message MissingManifestForWin32Assembly(SourceLineNumber sourceLineNumbers, string file, string manifest)
323 {
324 return Message(sourceLineNumbers, Ids.MissingManifestForWin32Assembly, "File '{0}' is marked as a Win32 assembly but it refers to assembly manifest '{1}' that is not present in this product.", file, manifest);
325 }
326
327 public static Message MissingMedia(SourceLineNumber sourceLineNumbers, int diskId)
328 {
329 return Message(sourceLineNumbers, Ids.MissingMedia, "There is no media defined for disk id '{0}'. You must author either <Media Id='{0}' ...> or <MediaTemplate ...>.", diskId);
330 }
331
332 public static Message MissingOrInvalidModuleInstallerVersion(SourceLineNumber sourceLineNumbers, string moduleId, string mergeModuleFile, string productInstallerVersion)
333 {
334 return Message(sourceLineNumbers, Ids.MissingOrInvalidModuleInstallerVersion, "The merge module '{0}' from file '{1}' is either missing or has an invalid installer version. The value read from the installer version in module's summary information was '{2}'. This should be a numeric value representing a valid installer version such as 200 or 301.", moduleId, mergeModuleFile, productInstallerVersion);
335 }
336
337 public static Message NewRowAddedInTable(SourceLineNumber sourceLineNumbers, string productCode, string tableName, string rowId)
338 {
339 return Message(sourceLineNumbers, Ids.NewRowAddedInTable, "Product '{0}': Table '{1}' has a new row '{2}' added. This makes the patch not uninstallable.", productCode, tableName, rowId);
340 }
341
342 public static Message NoDataForColumn(SourceLineNumber sourceLineNumbers, string columnName, string tableName)
343 {
344 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);
345 }
346
347 public static Message NoDifferencesInTransform(SourceLineNumber sourceLineNumbers)
348 {
349 return Message(sourceLineNumbers, Ids.NoDifferencesInTransform, "The transform being built did not contain any differences so it could not be created.");
350 }
351
352 public static Message NoUniqueActionSequenceNumber(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName1, string actionName2)
353 {
354 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);
355 }
356
357 public static Message NoUniqueActionSequenceNumber2(SourceLineNumber sourceLineNumbers)
358 {
359 return Message(sourceLineNumbers, Ids.NoUniqueActionSequenceNumber2, "The location of the sequenced action related to previous error.");
360 }
361
362 public static Message OutputCodepageMismatch(SourceLineNumber sourceLineNumbers, int beforeCodepage, int afterCodepage)
363 {
364 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);
365 }
366
367 public static Message OutputCodepageMismatch2(SourceLineNumber sourceLineNumbers)
368 {
369 return Message(sourceLineNumbers, Ids.OutputCodepageMismatch2, "The location of the mismatched code page related to the previous warning.");
370 }
371
372 public static Message OutputTypeMismatch(SourceLineNumber sourceLineNumbers, string beforeOutputType, string afterOutputType)
373 {
374 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);
375 }
376
377 public static Message OverlengthTableNameInProductOrMergeModule(SourceLineNumber sourceLineNumbers, string tableName)
378 {
379 return Message(sourceLineNumbers, Ids.OverlengthTableNameInProductOrMergeModule, "The table name '{0}' is invalid because the table name exceeds 31 characters in length. For more information, see: https://learn.microsoft.com/en-au/windows/win32/msi/table-names", tableName);
380 }
381
382 public static Message OverridableActionCollision(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
383 {
384 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);
385 }
386
387 public static Message OverridableActionCollision2(SourceLineNumber sourceLineNumbers)
388 {
389 return Message(sourceLineNumbers, Ids.OverridableActionCollision2, "The location of the action related to previous error.");
390 }
391
392 public static Message PatchNotRemovable()
393 {
394 return Message(null, Ids.PatchNotRemovable, "This patch is not uninstallable. The 'Patch' element's attribute 'AllowRemoval' should be set to 'no'.");
395 }
396
397 public static Message PatchWithoutTransforms()
398 {
399 return Message(null, Ids.PatchWithoutTransforms, "No transforms were provided to attach to the patch.");
400 }
401
402 public static Message PatchWithoutValidTransforms()
403 {
404 return Message(null, Ids.PatchWithoutValidTransforms, "No valid transforms were provided to attach to the patch. Check to make sure the transforms you passed on the command line have a matching baseline authored in the patch. Also, make sure there are differences between your target and upgrade.");
405 }
406
407 public static Message ProductCodeInvalidForTransform(SourceLineNumber sourceLineNumbers)
408 {
409 return Message(sourceLineNumbers, Ids.ProductCodeInvalidForTransform, "The value '*' is not valid for the ProductCode when used in a transform or in a patch. Copy the ProductCode from your target product MSI into the Package/@ProductCode attribute value for your product authoring.");
410 }
411
412 public static Message ReadOnlyOutputFile(string filePath)
413 {
414 return Message(null, Ids.ReadOnlyOutputFile, "Unable to output to file '{0}' because it is marked as read-only.", filePath);
415 }
416
417 public static Message SameFileIdDifferentSource(SourceLineNumber sourceLineNumbers, string fileId, string sourcePath1, string sourcePath2)
418 {
419 return Message(sourceLineNumbers, Ids.SameFileIdDifferentSource, "Two different source paths '{1}' and '{2}' were detected for the same file identifier '{0}'. You must either author these under Media elements with different Id attribute values or in different patches.", fileId, sourcePath1, sourcePath2);
420 }
421
422 public static Message SplitCabinetCopyRegistrationFailed(string newCabName, string firstCabName)
423 {
424 return Message(null, Ids.SplitCabinetCopyRegistrationFailed, "Failed to register the copy command for cabinet '{0}' formed by splitting cabinet '{1}'.", newCabName, firstCabName);
425 }
426
427 public static Message StandardActionRelativelyScheduledInModule(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
428 {
429 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);
430 }
431
432 public static Message SuppressNonoverridableAction(SourceLineNumber sourceLineNumbers, string sequenceTableName, string actionName)
433 {
434 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);
435 }
436
437 public static Message SuppressNonoverridableAction2(SourceLineNumber sourceLineNumbers)
438 {
439 return Message(sourceLineNumbers, Ids.SuppressNonoverridableAction2, "The location of the non-overridable definition of the action related to previous error.");
440 }
441
442 public static Message TooManyColumnsInRealTable(string tableName, int columnCount, int supportedColumnCount)
443 {
444 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);
445 }
446
447 public static Message TransformSchemaMismatch()
448 {
449 return Message(null, Ids.TransformSchemaMismatch, "The transform schema does not match the database schema. The transform may have been generated from a different database.");
450 }
451
452 public static Message UnableToGetAuthenticodeCertOfFile(string filePath, string moreInformation)
453 {
454 return Message(null, Ids.UnableToGetAuthenticodeCertOfFile, "Unable to get the authenticode certificate of '{0}'. More information: {1}", filePath, moreInformation);
455 }
456
457 public static Message UnableToGetAuthenticodeCertOfFileDownlevelOS(string filePath, string moreInformation)
458 {
459 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);
460 }
461
462 public static Message UnableToOpenModule(SourceLineNumber sourceLineNumbers, string modulePath, string message)
463 {
464 return Message(sourceLineNumbers, Ids.UnableToOpenModule, "Unable to open merge module '{0}'. Check to make sure the module language is correct. '{1}'", modulePath, message);
465 }
466
467 public static Message UnexpectedCustomTableColumn(SourceLineNumber sourceLineNumbers, string column)
468 {
469 return Message(sourceLineNumbers, Ids.UnexpectedCustomTableColumn, "The custom table column '{0}' is unknown.", column);
470 }
471
472 public static Message UnexpectedTableInMergeModule(SourceLineNumber sourceLineNumbers, string tableName)
473 {
474 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);
475 }
476
477 public static Message UnexpectedTableInPatch(SourceLineNumber sourceLineNumbers, string tableName)
478 {
479 return Message(sourceLineNumbers, Ids.UnexpectedTableInPatch, "An unexpected row in the '{0}' table was found in this patch. Patches cannot contain the '{0}' table.", tableName);
480 }
481
482 public static Message ValidationError(SourceLineNumber sourceLineNumbers, string ice, string message)
483 {
484 return Message(sourceLineNumbers, Ids.ValidationError, "{0}: {1}", ice, message);
485 }
486
487 public static Message WixFileNotFound(string file)
488 {
489 return Message(null, Ids.WixFileNotFound, "The file '{0}' cannot be found.", file);
490 }
491
57 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 492 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
58 { 493 {
59 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); 494 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
@@ -61,8 +496,93 @@ namespace WixToolset.Core.WindowsInstaller
61 496
62 public enum Ids 497 public enum Ids
63 { 498 {
499 CabExtractionFailed = 17,
500 NoDataForColumn = 53,
501 CabFileDoesNotExist = 76,
502 CannotFindFile = 83,
503 BinderFileManagerMissingFile = 84,
504 DuplicateModuleFileIdentifier = 97,
505 DuplicateModuleCaseInsensitiveFileIdentifier = 98,
506 DuplicateExtensionTable = 126,
507 CannotOpenMergeModule = 129,
508 FileIdentifierNotFound = 131,
509 InvalidAssemblyFile = 132,
510 ExpectedMediaCabinet = 135,
511 UnexpectedCustomTableColumn = 165,
512 OverridableActionCollision = 168,
513 OverridableActionCollision2 = 169,
514 ActionCollision = 170,
515 ActionCollision2 = 171,
516 SuppressNonoverridableAction = 172,
517 SuppressNonoverridableAction2 = 173,
518 CustomActionSequencedInModule = 174,
519 StandardActionRelativelyScheduledInModule = 175,
520 ActionCircularDependency = 176,
521 ActionScheduledRelativeToTerminationAction = 177,
522 ActionScheduledRelativeToTerminationAction2 = 178,
523 NoUniqueActionSequenceNumber = 179,
524 NoUniqueActionSequenceNumber2 = 180,
525 UnexpectedTableInMergeModule = 184,
526 MergeExcludedModule = 186,
527 MergeFeatureRequired = 187,
528 MergeLanguageFailed = 188,
529 MergeLanguageUnsupported = 189,
530 InvalidMergeLanguage = 194,
531 ValidationError = 204,
532 InvalidKeyColumn = 220,
64 OpenDatabaseFailed = 223, 533 OpenDatabaseFailed = 223,
65 534 OutputTypeMismatch = 224,
535 NoDifferencesInTransform = 227,
536 OutputCodepageMismatch = 228,
537 OutputCodepageMismatch2 = 229,
538 IllegalPathForGeneratedComponentGuid = 231,
539 InvalidManifestContent = 238,
540 UnexpectedTableInPatch = 241,
541 InvalidKeypathChange = 243,
542 PatchWithoutTransforms = 246,
543 PatchWithoutValidTransforms = 252,
544 ExpectedPatchIdInWixMsp = 256,
545 ExpectedMediaRowsInWixMsp = 257,
546 WixFileNotFound = 258,
547 ExpectedClientPatchIdInWixMsp = 259,
548 NewRowAddedInTable = 260,
549 PatchNotRemovable = 261,
550 FileTooLarge = 263,
551 ProductCodeInvalidForTransform = 269,
552 InsertInvalidSequenceActionOrder = 270,
553 InsertSequenceNoSpace = 271,
554 MissingManifestForWin32Assembly = 272,
555 UnableToOpenModule = 273,
556 TransformSchemaMismatch = 278,
557 DatabaseSchemaMismatch = 279,
558 GacAssemblyNoStrongName = 282,
559 DuplicateCabinetName = 290,
560 DuplicateCabinetName2 = 291,
561 InvalidAddedFileRowWithoutSequence = 292,
562 CreateCabAddFileFailed = 296,
563 CreateCabInsufficientDiskSpace = 297,
564 GACAssemblyIdentityWarning = 299,
565 InvalidRemoveComponent = 305,
566 InvalidStringForCodepage = 311,
567 SameFileIdDifferentSource = 317,
568 BothUpgradeCodesRequired = 322,
569 UnableToGetAuthenticodeCertOfFile = 327,
570 UnableToGetAuthenticodeCertOfFileDownlevelOS = 328,
571 ReadOnlyOutputFile = 329,
572 MergePlatformMismatch = 345,
573 MediaTableCollision = 357,
574 MaximumUncompressedMediaSizeTooLarge = 359,
575 MissingOrInvalidModuleInstallerVersion = 366,
576 IllegalGeneratedGuidComponentUnversionedKeypath = 367,
577 IllegalGeneratedGuidComponentVersionedNonkeypath = 368,
578 DuplicateComponentGuids = 369,
579 MaximumCabinetSizeForLargeFileSplittingTooLarge = 375,
580 SplitCabinetCopyRegistrationFailed = 376,
581 MissingMedia = 382,
582 TooManyColumnsInRealTable = 386,
583 CouldNotDetermineProductCodeFromTransformSummaryInfo = 394,
584 IntermediatesMustBeResolved = 396,
585 OverlengthTableNameInProductOrMergeModule = 415,
66 CannotLoadWixoutAsTransform = 7500, 586 CannotLoadWixoutAsTransform = 7500,
67 InvalidModuleVersion = 7501, 587 InvalidModuleVersion = 7501,
68 ExceededMaximumAllowedComponentsInMsi = 7502, 588 ExceededMaximumAllowedComponentsInMsi = 7502,
diff --git a/src/wix/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs b/src/wix/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs
index 4ad8f764..96bedcb9 100644
--- a/src/wix/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs
+++ b/src/wix/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs
@@ -6,6 +6,7 @@ namespace WixToolset.Core.Bind
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Globalization; 7 using System.Globalization;
8 using System.Text; 8 using System.Text;
9 using WixToolset.Core;
9 using WixToolset.Data; 10 using WixToolset.Data;
10 using WixToolset.Extensibility.Data; 11 using WixToolset.Extensibility.Data;
11 using WixToolset.Extensibility.Services; 12 using WixToolset.Extensibility.Services;
@@ -148,7 +149,7 @@ namespace WixToolset.Core.Bind
148 } 149 }
149 else 150 else
150 { 151 {
151 this.Messaging.Write(ErrorMessages.UnresolvedBindReference(sourceLineNumbers, value)); 152 this.Messaging.Write(CoreErrors.UnresolvedBindReference(sourceLineNumbers, value));
152 break; 153 break;
153 } 154 }
154 } 155 }
diff --git a/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs b/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs
index 28ca6b49..e1ee0ef2 100644
--- a/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs
+++ b/src/wix/WixToolset.Core/Bind/TransferFilesCommand.cs
@@ -6,6 +6,7 @@ namespace WixToolset.Core.Bind
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.IO; 7 using System.IO;
8 using System.Security.AccessControl; 8 using System.Security.AccessControl;
9 using WixToolset.Core;
9 using WixToolset.Data; 10 using WixToolset.Data;
10 using WixToolset.Extensibility; 11 using WixToolset.Extensibility;
11 using WixToolset.Extensibility.Data; 12 using WixToolset.Extensibility.Data;
@@ -101,7 +102,7 @@ namespace WixToolset.Core.Bind
101 } 102 }
102 catch (ArgumentException) // thrown for unauthorized access errors 103 catch (ArgumentException) // thrown for unauthorized access errors
103 { 104 {
104 throw new WixException(ErrorMessages.UnauthorizedAccess(fileTransfer.Destination)); 105 throw new WixException(CoreErrors.UnauthorizedAccess(fileTransfer.Destination));
105 } 106 }
106 107
107 // try to delete the file 108 // try to delete the file
@@ -111,7 +112,7 @@ namespace WixToolset.Core.Bind
111 } 112 }
112 catch (IOException) 113 catch (IOException)
113 { 114 {
114 throw new WixException(ErrorMessages.FileInUse(null, fileTransfer.Destination)); 115 throw new WixException(CoreErrors.FileInUse(null, fileTransfer.Destination));
115 } 116 }
116 117
117 retry = true; 118 retry = true;
@@ -142,7 +143,7 @@ namespace WixToolset.Core.Bind
142 } 143 }
143 catch (IOException) 144 catch (IOException)
144 { 145 {
145 throw new WixException(ErrorMessages.FileInUse(null, fileTransfer.Destination)); 146 throw new WixException(CoreErrors.FileInUse(null, fileTransfer.Destination));
146 } 147 }
147 148
148 retry = true; 149 retry = true;
diff --git a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
index d45b9301..4883932a 100644
--- a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -9,6 +9,7 @@ namespace WixToolset.Core.CommandLine
9 using System.Threading; 9 using System.Threading;
10 using System.Threading.Tasks; 10 using System.Threading.Tasks;
11 using System.Xml.Linq; 11 using System.Xml.Linq;
12 using WixToolset.Core;
12 using WixToolset.Data; 13 using WixToolset.Data;
13 using WixToolset.Extensibility; 14 using WixToolset.Extensibility;
14 using WixToolset.Extensibility.Data; 15 using WixToolset.Extensibility.Data;
@@ -836,7 +837,7 @@ namespace WixToolset.Core.CommandLine
836 837
837 if (variables.ContainsKey(value[0])) 838 if (variables.ContainsKey(value[0]))
838 { 839 {
839 this.Messaging.Write(ErrorMessages.DuplicateVariableDefinition(value[0], (1 == value.Length) ? String.Empty : value[1], variables[value[0]])); 840 this.Messaging.Write(CoreErrors.DuplicateVariableDefinition(value[0], (1 == value.Length) ? String.Empty : value[1], variables[value[0]]));
840 continue; 841 continue;
841 } 842 }
842 843
@@ -903,12 +904,12 @@ namespace WixToolset.Core.CommandLine
903 { 904 {
904 if (wixipls.Count > 1 || codePaths.Count > 0 || libraryPaths.Count > 0) 905 if (wixipls.Count > 1 || codePaths.Count > 0 || libraryPaths.Count > 0)
905 { 906 {
906 this.Messaging.Write(ErrorMessages.WixiplSourceFileIsExclusive()); 907 this.Messaging.Write(CoreErrors.WixiplSourceFileIsExclusive());
907 } 908 }
908 } 909 }
909 else if (codePaths.Count == 0 && libraryPaths.Count == 0) 910 else if (codePaths.Count == 0 && libraryPaths.Count == 0)
910 { 911 {
911 this.Messaging.Write(ErrorMessages.NoSourceFiles()); 912 this.Messaging.Write(CoreErrors.NoSourceFiles());
912 } 913 }
913 914
914 if (!this.Messaging.EncounteredError && String.IsNullOrEmpty(outputPath)) 915 if (!this.Messaging.EncounteredError && String.IsNullOrEmpty(outputPath))
@@ -917,7 +918,7 @@ namespace WixToolset.Core.CommandLine
917 918
918 if (String.IsNullOrEmpty(singleInputPath)) 919 if (String.IsNullOrEmpty(singleInputPath))
919 { 920 {
920 this.Messaging.Write(ErrorMessages.MustSpecifyOutputWithMoreThanOneInput()); 921 this.Messaging.Write(CoreErrors.MustSpecifyOutputWithMoreThanOneInput());
921 } 922 }
922 else 923 else
923 { 924 {
@@ -947,7 +948,7 @@ namespace WixToolset.Core.CommandLine
947 948
948 if (File.Exists(bp.Path)) 949 if (File.Exists(bp.Path))
949 { 950 {
950 this.Messaging.Write(ErrorMessages.ExpectedDirectoryGotFile(argument, bp.Path)); 951 this.Messaging.Write(CoreErrors.ExpectedDirectoryGotFile(argument, bp.Path));
951 return false; 952 return false;
952 } 953 }
953 954
diff --git a/src/wix/WixToolset.Core/CommandLine/CommandLine.cs b/src/wix/WixToolset.Core/CommandLine/CommandLine.cs
index d6e0e0ae..eff693c1 100644
--- a/src/wix/WixToolset.Core/CommandLine/CommandLine.cs
+++ b/src/wix/WixToolset.Core/CommandLine/CommandLine.cs
@@ -4,7 +4,7 @@ namespace WixToolset.Core.CommandLine
4{ 4{
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using WixToolset.Data; 7 using WixToolset.Core;
8 using WixToolset.Extensibility; 8 using WixToolset.Extensibility;
9 using WixToolset.Extensibility.Data; 9 using WixToolset.Extensibility.Data;
10 using WixToolset.Extensibility.Services; 10 using WixToolset.Extensibility.Services;
@@ -252,7 +252,7 @@ namespace WixToolset.Core.CommandLine
252 } 252 }
253 else 253 else
254 { 254 {
255 parser.ReportErrorArgument(parameter, ErrorMessages.IllegalSuppressWarningId(paramArg)); 255 parser.ReportErrorArgument(parameter, CoreErrors.IllegalSuppressWarningId(paramArg));
256 } 256 }
257 } 257 }
258 258
@@ -269,7 +269,7 @@ namespace WixToolset.Core.CommandLine
269 } 269 }
270 else 270 else
271 { 271 {
272 parser.ReportErrorArgument(parameter, ErrorMessages.IllegalWarningIdAsError(paramArg)); 272 parser.ReportErrorArgument(parameter, CoreErrors.IllegalWarningIdAsError(paramArg));
273 } 273 }
274 } 274 }
275 } 275 }
diff --git a/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs b/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs
index ed0936a8..0e56fe4f 100644
--- a/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs
+++ b/src/wix/WixToolset.Core/CommandLine/CommandLineParser.cs
@@ -6,6 +6,7 @@ namespace WixToolset.Core.CommandLine
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.IO; 7 using System.IO;
8 using System.Linq; 8 using System.Linq;
9 using WixToolset.Core;
9 using WixToolset.Data; 10 using WixToolset.Data;
10 using WixToolset.Extensibility.Services; 11 using WixToolset.Extensibility.Services;
11 12
@@ -61,7 +62,7 @@ namespace WixToolset.Core.CommandLine
61 return argument; 62 return argument;
62 } 63 }
63 64
64 this.Messaging.Write(ErrorMessages.ExpectedArgument(commandLineSwitch)); 65 this.Messaging.Write(CoreErrors.ExpectedArgument(commandLineSwitch));
65 return null; 66 return null;
66 } 67 }
67 68
@@ -73,7 +74,7 @@ namespace WixToolset.Core.CommandLine
73 return true; 74 return true;
74 } 75 }
75 76
76 this.Messaging.Write(ErrorMessages.ExpectedArgument(commandLineSwitch)); 77 this.Messaging.Write(CoreErrors.ExpectedArgument(commandLineSwitch));
77 return false; 78 return false;
78 } 79 }
79 80
@@ -84,7 +85,7 @@ namespace WixToolset.Core.CommandLine
84 return directory; 85 return directory;
85 } 86 }
86 87
87 this.Messaging.Write(ErrorMessages.ExpectedArgument(commandLineSwitch)); 88 this.Messaging.Write(CoreErrors.ExpectedArgument(commandLineSwitch));
88 return null; 89 return null;
89 } 90 }
90 91
@@ -96,7 +97,7 @@ namespace WixToolset.Core.CommandLine
96 return true; 97 return true;
97 } 98 }
98 99
99 this.Messaging.Write(ErrorMessages.ExpectedArgument(commandLineSwitch)); 100 this.Messaging.Write(CoreErrors.ExpectedArgument(commandLineSwitch));
100 return false; 101 return false;
101 } 102 }
102 103
@@ -107,7 +108,7 @@ namespace WixToolset.Core.CommandLine
107 return path; 108 return path;
108 } 109 }
109 110
110 this.Messaging.Write(ErrorMessages.ExpectedArgument(commandLineSwitch)); 111 this.Messaging.Write(CoreErrors.ExpectedArgument(commandLineSwitch));
111 return null; 112 return null;
112 } 113 }
113 114
@@ -123,13 +124,13 @@ namespace WixToolset.Core.CommandLine
123 return true; 124 return true;
124 } 125 }
125 126
126 this.Messaging.Write(ErrorMessages.ExpectedArgument(commandLineSwitch)); 127 this.Messaging.Write(CoreErrors.ExpectedArgument(commandLineSwitch));
127 return false; 128 return false;
128 } 129 }
129 130
130 public void ReportErrorArgument(string argument, Message message = null) 131 public void ReportErrorArgument(string argument, Message message = null)
131 { 132 {
132 this.Messaging.Write(message ?? ErrorMessages.AdditionalArgumentUnexpected(argument)); 133 this.Messaging.Write(message ?? CoreErrors.AdditionalArgumentUnexpected(argument));
133 this.ErrorArgument = argument; 134 this.ErrorArgument = argument;
134 } 135 }
135 136
@@ -181,7 +182,7 @@ namespace WixToolset.Core.CommandLine
181 182
182 if (File.Exists(arg)) 183 if (File.Exists(arg))
183 { 184 {
184 this.Messaging.Write(ErrorMessages.ExpectedDirectoryGotFile(commandlineSwitch, arg)); 185 this.Messaging.Write(CoreErrors.ExpectedDirectoryGotFile(commandlineSwitch, arg));
185 return false; 186 return false;
186 } 187 }
187 188
@@ -199,7 +200,7 @@ namespace WixToolset.Core.CommandLine
199 } 200 }
200 else if (Directory.Exists(arg)) 201 else if (Directory.Exists(arg))
201 { 202 {
202 this.Messaging.Write(ErrorMessages.ExpectedFileGotDirectory(commandlineSwitch, arg)); 203 this.Messaging.Write(CoreErrors.ExpectedFileGotDirectory(commandlineSwitch, arg));
203 } 204 }
204 else 205 else
205 { 206 {
@@ -272,7 +273,7 @@ namespace WixToolset.Core.CommandLine
272 273
273 if (0 <= path.IndexOf('\"')) 274 if (0 <= path.IndexOf('\"'))
274 { 275 {
275 this.Messaging.Write(ErrorMessages.PathCannotContainQuote(path)); 276 this.Messaging.Write(CoreErrors.PathCannotContainQuote(path));
276 return null; 277 return null;
277 } 278 }
278 279
@@ -282,7 +283,7 @@ namespace WixToolset.Core.CommandLine
282 } 283 }
283 catch (Exception e) 284 catch (Exception e)
284 { 285 {
285 this.Messaging.Write(ErrorMessages.InvalidCommandLineFileName(path, e.Message)); 286 this.Messaging.Write(CoreErrors.InvalidCommandLineFileName(path, e.Message));
286 return null; 287 return null;
287 } 288 }
288 289
diff --git a/src/wix/WixToolset.Core/Common.cs b/src/wix/WixToolset.Core/Common.cs
index b1821195..b4b734c8 100644
--- a/src/wix/WixToolset.Core/Common.cs
+++ b/src/wix/WixToolset.Core/Common.cs
@@ -5,7 +5,6 @@ namespace WixToolset.Core
5 using System; 5 using System;
6 using System.Diagnostics; 6 using System.Diagnostics;
7 using System.Globalization; 7 using System.Globalization;
8 using System.IO;
9 using System.Linq; 8 using System.Linq;
10 using System.Security.Cryptography; 9 using System.Security.Cryptography;
11 using System.Text; 10 using System.Text;
@@ -76,7 +75,7 @@ namespace WixToolset.Core
76 codePage = encoding.CodePage; 75 codePage = encoding.CodePage;
77 if (0 > codePage || Int16.MaxValue < codePage) 76 if (0 > codePage || Int16.MaxValue < codePage)
78 { 77 {
79 throw new WixException(ErrorMessages.InvalidSummaryInfoCodePage(sourceLineNumbers, codePage)); 78 throw new WixException(CoreErrors.InvalidSummaryInfoCodePage(sourceLineNumbers, codePage));
80 } 79 }
81 } 80 }
82 81
@@ -593,7 +592,7 @@ namespace WixToolset.Core
593 { 592 {
594 if (value.StartsWith("[", StringComparison.Ordinal) && value.EndsWith("]", StringComparison.Ordinal)) 593 if (value.StartsWith("[", StringComparison.Ordinal) && value.EndsWith("]", StringComparison.Ordinal))
595 { 594 {
596 messaging.Write(ErrorMessages.IllegalIdentifierLooksLikeFormatted(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 595 messaging.Write(CoreErrors.IllegalIdentifierLooksLikeFormatted(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
597 } 596 }
598 else 597 else
599 { 598 {
@@ -717,11 +716,11 @@ namespace WixToolset.Core
717 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(element); 716 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(element);
718 if (attributeName == null) 717 if (attributeName == null)
719 { 718 {
720 messaging.Write(ErrorMessages.IllegalInnerText(sourceLineNumbers, element.Name.LocalName, innerText)); 719 messaging.Write(CoreErrors.IllegalInnerText(sourceLineNumbers, element.Name.LocalName, innerText));
721 } 720 }
722 else 721 else
723 { 722 {
724 messaging.Write(ErrorMessages.IllegalInnerText(sourceLineNumbers, element.Name.LocalName, innerText, attributeName)); 723 messaging.Write(CoreErrors.IllegalInnerText(sourceLineNumbers, element.Name.LocalName, innerText, attributeName));
725 } 724 }
726 } 725 }
727 } 726 }
@@ -834,7 +833,7 @@ namespace WixToolset.Core
834 if (!((String.IsNullOrEmpty(extensionAttribute.Name.NamespaceName) && extensionAttribute.Name.LocalName.Equals("xmlns", StringComparison.Ordinal)) || 833 if (!((String.IsNullOrEmpty(extensionAttribute.Name.NamespaceName) && extensionAttribute.Name.LocalName.Equals("xmlns", StringComparison.Ordinal)) ||
835 extensionAttribute.Name.NamespaceName.StartsWith(CompilerCore.W3SchemaPrefix.NamespaceName, StringComparison.Ordinal))) 834 extensionAttribute.Name.NamespaceName.StartsWith(CompilerCore.W3SchemaPrefix.NamespaceName, StringComparison.Ordinal)))
836 { 835 {
837 messaging.Write(ErrorMessages.UnsupportedExtensionAttribute(sourceLineNumbers, extensionAttribute.Parent.Name.LocalName, extensionAttribute.Name.LocalName)); 836 messaging.Write(CoreErrors.UnsupportedExtensionAttribute(sourceLineNumbers, extensionAttribute.Parent.Name.LocalName, extensionAttribute.Name.LocalName));
838 } 837 }
839 } 838 }
840 839
diff --git a/src/wix/WixToolset.Core/Compile/CompilerPackagePayload.cs b/src/wix/WixToolset.Core/Compile/CompilerPackagePayload.cs
index 6b95de5f..4f8d5fe2 100644
--- a/src/wix/WixToolset.Core/Compile/CompilerPackagePayload.cs
+++ b/src/wix/WixToolset.Core/Compile/CompilerPackagePayload.cs
@@ -3,8 +3,6 @@
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using System; 5 using System;
6 using System.Collections.Generic;
7 using System.Text;
8 using System.Xml.Linq; 6 using System.Xml.Linq;
9 using WixToolset.Data; 7 using WixToolset.Data;
10 using WixToolset.Data.Symbols; 8 using WixToolset.Data.Symbols;
diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs
index 3a703fb7..82ab0e1e 100644
--- a/src/wix/WixToolset.Core/Compiler.cs
+++ b/src/wix/WixToolset.Core/Compiler.cs
@@ -108,7 +108,7 @@ namespace WixToolset.Core
108 } 108 }
109 else 109 else
110 { 110 {
111 this.Messaging.Write(ErrorMessages.DuplicateExtensionXmlSchemaNamespace(extension.GetType().ToString(), extension.Namespace.NamespaceName, collidingExtension.GetType().ToString())); 111 this.Messaging.Write(CoreErrors.DuplicateExtensionXmlSchemaNamespace(extension.GetType().ToString(), extension.Namespace.NamespaceName, collidingExtension.GetType().ToString()));
112 } 112 }
113 113
114 extension.PreCompile(this.Context); 114 extension.PreCompile(this.Context);
@@ -330,7 +330,7 @@ namespace WixToolset.Core
330 { 330 {
331 if (propertyId.Id != propertyId.Id.ToUpperInvariant()) 331 if (propertyId.Id != propertyId.Id.ToUpperInvariant())
332 { 332 {
333 this.Core.Write(ErrorMessages.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", propertyId.Id)); 333 this.Core.Write(CoreErrors.SearchPropertyNotUppercase(sourceLineNumbers, "Property", "Id", propertyId.Id));
334 } 334 }
335 335
336 this.Core.AddSymbol(new AppSearchSymbol(sourceLineNumbers, new Identifier(propertyId.Access, propertyId.Id, signature)) 336 this.Core.AddSymbol(new AppSearchSymbol(sourceLineNumbers, new Identifier(propertyId.Access, propertyId.Id, signature))
@@ -413,7 +413,7 @@ namespace WixToolset.Core
413 { 413 {
414 if (secure && property.Id != property.Id.ToUpperInvariant()) 414 if (secure && property.Id != property.Id.ToUpperInvariant())
415 { 415 {
416 this.Core.Write(ErrorMessages.SecurePropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id)); 416 this.Core.Write(CoreErrors.SecurePropertyNotUppercase(sourceLineNumbers, "Property", "Id", property.Id));
417 } 417 }
418 418
419 if (null == section) 419 if (null == section)
@@ -517,7 +517,7 @@ namespace WixToolset.Core
517 517
518 if ((YesNoType.No == advertise && YesNoType.Yes == appIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == appIdAdvertise)) 518 if ((YesNoType.No == advertise && YesNoType.Yes == appIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == appIdAdvertise))
519 { 519 {
520 this.Core.Write(ErrorMessages.AppIdIncompatibleAdvertiseState(sourceLineNumbers, node.Name.LocalName, "Advertise", appIdAdvertise.ToString(), advertise.ToString())); 520 this.Core.Write(CoreErrors.AppIdIncompatibleAdvertiseState(sourceLineNumbers, node.Name.LocalName, "Advertise", appIdAdvertise.ToString(), advertise.ToString()));
521 } 521 }
522 else if (appIdAdvertise != YesNoType.NotSet) 522 else if (appIdAdvertise != YesNoType.NotSet)
523 { 523 {
@@ -554,7 +554,7 @@ namespace WixToolset.Core
554 { 554 {
555 if (null != description) 555 if (null != description)
556 { 556 {
557 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Description")); 557 this.Core.Write(CoreErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "Description"));
558 } 558 }
559 559
560 if (!this.Core.EncounteredError) 560 if (!this.Core.EncounteredError)
@@ -1142,7 +1142,7 @@ namespace WixToolset.Core
1142 { 1142 {
1143 if (uniqueContexts.Contains(context)) 1143 if (uniqueContexts.Contains(context))
1144 { 1144 {
1145 this.Core.Write(ErrorMessages.DuplicateContextValue(sourceLineNumbers, context)); 1145 this.Core.Write(CoreErrors.DuplicateContextValue(sourceLineNumbers, context));
1146 } 1146 }
1147 else 1147 else
1148 { 1148 {
@@ -1161,7 +1161,7 @@ namespace WixToolset.Core
1161 1161
1162 if ((YesNoType.No == advertise && YesNoType.Yes == classAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == classAdvertise)) 1162 if ((YesNoType.No == advertise && YesNoType.Yes == classAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == classAdvertise))
1163 { 1163 {
1164 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, classAdvertise.ToString(), advertise.ToString())); 1164 this.Core.Write(CoreErrors.AdvertiseStateMustMatch(sourceLineNumbers, classAdvertise.ToString(), advertise.ToString()));
1165 } 1165 }
1166 else 1166 else
1167 { 1167 {
@@ -1412,7 +1412,7 @@ namespace WixToolset.Core
1412 1412
1413 if (YesNoType.NotSet != relativePath) // ClassId's RelativePath 1413 if (YesNoType.NotSet != relativePath) // ClassId's RelativePath
1414 { 1414 {
1415 this.Core.Write(ErrorMessages.RelativePathForRegistryElement(sourceLineNumbers)); 1415 this.Core.Write(CoreErrors.RelativePathForRegistryElement(sourceLineNumbers));
1416 } 1416 }
1417 } 1417 }
1418 1418
@@ -1626,7 +1626,7 @@ namespace WixToolset.Core
1626 { 1626 {
1627 if (mask.Length != value.Length) 1627 if (mask.Length != value.Length)
1628 { 1628 {
1629 this.Core.Write(ErrorMessages.ValueAndMaskMustBeSameLength(sourceLineNumbers)); 1629 this.Core.Write(CoreErrors.ValueAndMaskMustBeSameLength(sourceLineNumbers));
1630 } 1630 }
1631 cb = mask.Length / 2; 1631 cb = mask.Length / 2;
1632 } 1632 }
@@ -1827,7 +1827,7 @@ namespace WixToolset.Core
1827 case "DirectorySearch": 1827 case "DirectorySearch":
1828 if (oneChild) 1828 if (oneChild)
1829 { 1829 {
1830 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1830 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1831 } 1831 }
1832 oneChild = true; 1832 oneChild = true;
1833 1833
@@ -1837,7 +1837,7 @@ namespace WixToolset.Core
1837 case "DirectorySearchRef": 1837 case "DirectorySearchRef":
1838 if (oneChild) 1838 if (oneChild)
1839 { 1839 {
1840 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1840 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1841 } 1841 }
1842 oneChild = true; 1842 oneChild = true;
1843 signature = this.ParseDirectorySearchRefElement(child, id.Id); 1843 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -1845,7 +1845,7 @@ namespace WixToolset.Core
1845 case "FileSearch": 1845 case "FileSearch":
1846 if (oneChild) 1846 if (oneChild)
1847 { 1847 {
1848 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1848 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1849 } 1849 }
1850 oneChild = true; 1850 oneChild = true;
1851 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 1851 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -1854,7 +1854,7 @@ namespace WixToolset.Core
1854 case "FileSearchRef": 1854 case "FileSearchRef":
1855 if (oneChild) 1855 if (oneChild)
1856 { 1856 {
1857 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 1857 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
1858 } 1858 }
1859 oneChild = true; 1859 oneChild = true;
1860 var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures 1860 var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures
@@ -2009,7 +2009,7 @@ namespace WixToolset.Core
2009 case "DirectorySearch": 2009 case "DirectorySearch":
2010 if (oneChild) 2010 if (oneChild)
2011 { 2011 {
2012 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 2012 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
2013 } 2013 }
2014 oneChild = true; 2014 oneChild = true;
2015 signature = this.ParseDirectorySearchElement(child, "CCP_DRIVE"); 2015 signature = this.ParseDirectorySearchElement(child, "CCP_DRIVE");
@@ -2017,7 +2017,7 @@ namespace WixToolset.Core
2017 case "DirectorySearchRef": 2017 case "DirectorySearchRef":
2018 if (oneChild) 2018 if (oneChild)
2019 { 2019 {
2020 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 2020 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
2021 } 2021 }
2022 oneChild = true; 2022 oneChild = true;
2023 signature = this.ParseDirectorySearchRefElement(child, "CCP_DRIVE"); 2023 signature = this.ParseDirectorySearchRefElement(child, "CCP_DRIVE");
@@ -2035,7 +2035,7 @@ namespace WixToolset.Core
2035 2035
2036 if (null == signature) 2036 if (null == signature)
2037 { 2037 {
2038 this.Core.Write(ErrorMessages.SearchElementRequired(sourceLineNumbers, node.Name.LocalName)); 2038 this.Core.Write(CoreErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
2039 } 2039 }
2040 2040
2041 return signature; 2041 return signature;
@@ -2081,13 +2081,13 @@ namespace WixToolset.Core
2081 else if (signature != sig) 2081 else if (signature != sig)
2082 { 2082 {
2083 // all signatures under a ComplianceCheck must be the same 2083 // all signatures under a ComplianceCheck must be the same
2084 this.Core.Write(ErrorMessages.MultipleIdentifiersFound(sourceLineNumbers, node.Name.LocalName, sig, signature)); 2084 this.Core.Write(CoreErrors.MultipleIdentifiersFound(sourceLineNumbers, node.Name.LocalName, sig, signature));
2085 } 2085 }
2086 } 2086 }
2087 2087
2088 if (null == signature) 2088 if (null == signature)
2089 { 2089 {
2090 this.Core.Write(ErrorMessages.SearchElementRequired(sourceLineNumbers, node.Name.LocalName)); 2090 this.Core.Write(CoreErrors.SearchElementRequired(sourceLineNumbers, node.Name.LocalName));
2091 } 2091 }
2092 2092
2093 if (!this.Core.EncounteredError) 2093 if (!this.Core.EncounteredError)
@@ -2280,7 +2280,7 @@ namespace WixToolset.Core
2280 { 2280 {
2281 if (this.compilingModule) 2281 if (this.compilingModule)
2282 { 2282 {
2283 this.Core.Write(ErrorMessages.IllegalAttributeInMergeModule(sourceLineNumbers, node.Name.LocalName, "Feature")); 2283 this.Core.Write(CoreErrors.IllegalAttributeInMergeModule(sourceLineNumbers, node.Name.LocalName, "Feature"));
2284 } 2284 }
2285 else 2285 else
2286 { 2286 {
@@ -2466,7 +2466,7 @@ namespace WixToolset.Core
2466 2466
2467 if (keyFound && YesNoType.Yes == keyPathSet) 2467 if (keyFound && YesNoType.Yes == keyPathSet)
2468 { 2468 {
2469 this.Core.Write(ErrorMessages.ComponentMultipleKeyPaths(sourceLineNumbers, node.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource")); 2469 this.Core.Write(CoreErrors.ComponentMultipleKeyPaths(sourceLineNumbers, node.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
2470 } 2470 }
2471 2471
2472 // if a possible KeyPath has been found and that value was explicitly set as 2472 // if a possible KeyPath has been found and that value was explicitly set as
@@ -2503,7 +2503,7 @@ namespace WixToolset.Core
2503 // Check for implicit KeyPath which can easily be accidentally changed 2503 // Check for implicit KeyPath which can easily be accidentally changed
2504 if (this.ShowPedanticMessages && !keyFound && !allowImplicitIds) 2504 if (this.ShowPedanticMessages && !keyFound && !allowImplicitIds)
2505 { 2505 {
2506 this.Core.Write(ErrorMessages.ImplicitComponentKeyPath(sourceLineNumbers, id.Id)); 2506 this.Core.Write(CoreErrors.ImplicitComponentKeyPath(sourceLineNumbers, id.Id));
2507 } 2507 }
2508 2508
2509 // If there isn't an @Id attribute value, replace the placeholder with the id of the keypath. 2509 // If there isn't an @Id attribute value, replace the placeholder with the id of the keypath.
@@ -2519,7 +2519,7 @@ namespace WixToolset.Core
2519 } 2519 }
2520 else 2520 else
2521 { 2521 {
2522 this.Core.Write(ErrorMessages.CannotDefaultComponentId(sourceLineNumbers)); 2522 this.Core.Write(CoreErrors.CannotDefaultComponentId(sourceLineNumbers));
2523 } 2523 }
2524 } 2524 }
2525 2525
@@ -2852,7 +2852,7 @@ namespace WixToolset.Core
2852 case "DirectorySearch": 2852 case "DirectorySearch":
2853 if (oneChild) 2853 if (oneChild)
2854 { 2854 {
2855 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2855 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2856 } 2856 }
2857 oneChild = true; 2857 oneChild = true;
2858 2858
@@ -2862,7 +2862,7 @@ namespace WixToolset.Core
2862 case "DirectorySearchRef": 2862 case "DirectorySearchRef":
2863 if (oneChild) 2863 if (oneChild)
2864 { 2864 {
2865 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2865 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2866 } 2866 }
2867 oneChild = true; 2867 oneChild = true;
2868 signature = this.ParseDirectorySearchRefElement(child, id.Id); 2868 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -2870,7 +2870,7 @@ namespace WixToolset.Core
2870 case "FileSearch": 2870 case "FileSearch":
2871 if (oneChild) 2871 if (oneChild)
2872 { 2872 {
2873 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2873 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2874 } 2874 }
2875 oneChild = true; 2875 oneChild = true;
2876 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 2876 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -2879,7 +2879,7 @@ namespace WixToolset.Core
2879 case "FileSearchRef": 2879 case "FileSearchRef":
2880 if (oneChild) 2880 if (oneChild)
2881 { 2881 {
2882 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 2882 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
2883 } 2883 }
2884 oneChild = true; 2884 oneChild = true;
2885 var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures 2885 var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures
@@ -3209,7 +3209,7 @@ namespace WixToolset.Core
3209 case "BinaryRef": 3209 case "BinaryRef":
3210 if (null != source) 3210 if (null != source)
3211 { 3211 {
3212 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script")); 3212 this.Core.Write(CoreErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3213 } 3213 }
3214 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 3214 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3215 sourceType = CustomActionSourceType.Binary; 3215 sourceType = CustomActionSourceType.Binary;
@@ -3238,7 +3238,7 @@ namespace WixToolset.Core
3238 case "Directory": 3238 case "Directory":
3239 if (null != source) 3239 if (null != source)
3240 { 3240 {
3241 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileRef", "Property", "Script")); 3241 this.Core.Write(CoreErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileRef", "Property", "Script"));
3242 } 3242 }
3243 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 3243 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3244 sourceType = CustomActionSourceType.Directory; 3244 sourceType = CustomActionSourceType.Directory;
@@ -3247,7 +3247,7 @@ namespace WixToolset.Core
3247 case "DllEntry": 3247 case "DllEntry":
3248 if (null != target) 3248 if (null != target)
3249 { 3249 {
3250 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3250 this.Core.Write(CoreErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3251 } 3251 }
3252 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3252 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3253 targetType = CustomActionTargetType.Dll; 3253 targetType = CustomActionTargetType.Dll;
@@ -3255,7 +3255,7 @@ namespace WixToolset.Core
3255 case "Error": 3255 case "Error":
3256 if (null != target) 3256 if (null != target)
3257 { 3257 {
3258 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3258 this.Core.Write(CoreErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3259 } 3259 }
3260 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3260 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3261 sourceType = CustomActionSourceType.File; 3261 sourceType = CustomActionSourceType.File;
@@ -3272,7 +3272,7 @@ namespace WixToolset.Core
3272 case "ExeCommand": 3272 case "ExeCommand":
3273 if (null != target) 3273 if (null != target)
3274 { 3274 {
3275 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3275 this.Core.Write(CoreErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3276 } 3276 }
3277 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3277 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3278 targetType = CustomActionTargetType.Exe; 3278 targetType = CustomActionTargetType.Exe;
@@ -3310,7 +3310,7 @@ namespace WixToolset.Core
3310 case "FileRef": 3310 case "FileRef":
3311 if (null != source) 3311 if (null != source)
3312 { 3312 {
3313 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script")); 3313 this.Core.Write(CoreErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3314 } 3314 }
3315 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); 3315 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3316 sourceType = CustomActionSourceType.File; 3316 sourceType = CustomActionSourceType.File;
@@ -3325,7 +3325,7 @@ namespace WixToolset.Core
3325 case "JScriptCall": 3325 case "JScriptCall":
3326 if (null != target) 3326 if (null != target)
3327 { 3327 {
3328 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3328 this.Core.Write(CoreErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3329 } 3329 }
3330 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3330 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3331 targetType = CustomActionTargetType.JScript; 3331 targetType = CustomActionTargetType.JScript;
@@ -3336,7 +3336,7 @@ namespace WixToolset.Core
3336 case "Property": 3336 case "Property":
3337 if (null != source) 3337 if (null != source)
3338 { 3338 {
3339 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script")); 3339 this.Core.Write(CoreErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3340 } 3340 }
3341 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib); 3341 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3342 sourceType = CustomActionSourceType.Property; 3342 sourceType = CustomActionSourceType.Property;
@@ -3367,12 +3367,12 @@ namespace WixToolset.Core
3367 case "Script": 3367 case "Script":
3368 if (null != source) 3368 if (null != source)
3369 { 3369 {
3370 this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script")); 3370 this.Core.Write(CoreErrors.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3371 } 3371 }
3372 3372
3373 if (null != target) 3373 if (null != target)
3374 { 3374 {
3375 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3375 this.Core.Write(CoreErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3376 } 3376 }
3377 3377
3378 // set the source and target to empty string for error messages when the user sets multiple sources or targets 3378 // set the source and target to empty string for error messages when the user sets multiple sources or targets
@@ -3414,7 +3414,7 @@ namespace WixToolset.Core
3414 case "Value": 3414 case "Value":
3415 if (null != target) 3415 if (null != target)
3416 { 3416 {
3417 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3417 this.Core.Write(CoreErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3418 } 3418 }
3419 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3419 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3420 targetType = CustomActionTargetType.TextData; 3420 targetType = CustomActionTargetType.TextData;
@@ -3422,7 +3422,7 @@ namespace WixToolset.Core
3422 case "VBScriptCall": 3422 case "VBScriptCall":
3423 if (null != target) 3423 if (null != target)
3424 { 3424 {
3425 this.Core.Write(ErrorMessages.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall")); 3425 this.Core.Write(CoreErrors.CustomActionMultipleTargets(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "DllEntry", "Error", "ExeCommand", "JScriptCall", "Script", "Value", "VBScriptCall"));
3426 } 3426 }
3427 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid 3427 target = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty); // one of the few cases where an empty string value is valid
3428 targetType = CustomActionTargetType.VBScript; 3428 targetType = CustomActionTargetType.VBScript;
@@ -3529,7 +3529,7 @@ namespace WixToolset.Core
3529 CustomActionExecutionType.Rollback != executionType && 3529 CustomActionExecutionType.Rollback != executionType &&
3530 CustomActionExecutionType.Commit != executionType) 3530 CustomActionExecutionType.Commit != executionType)
3531 { 3531 {
3532 this.Core.Write(ErrorMessages.IllegalTerminalServerCustomActionAttributes(sourceLineNumbers)); 3532 this.Core.Write(CoreErrors.IllegalTerminalServerCustomActionAttributes(sourceLineNumbers));
3533 } 3533 }
3534 3534
3535 // MSI doesn't support in-script property setting, so disallow it 3535 // MSI doesn't support in-script property setting, so disallow it
@@ -3539,7 +3539,7 @@ namespace WixToolset.Core
3539 CustomActionExecutionType.Rollback == executionType || 3539 CustomActionExecutionType.Rollback == executionType ||
3540 CustomActionExecutionType.Commit == executionType)) 3540 CustomActionExecutionType.Commit == executionType))
3541 { 3541 {
3542 this.Core.Write(ErrorMessages.IllegalPropertyCustomActionAttributes(sourceLineNumbers)); 3542 this.Core.Write(CoreErrors.IllegalPropertyCustomActionAttributes(sourceLineNumbers));
3543 } 3543 }
3544 3544
3545 if (!targetType.HasValue) 3545 if (!targetType.HasValue)
@@ -3710,7 +3710,7 @@ namespace WixToolset.Core
3710 } 3710 }
3711 else if (31 < id.Length) 3711 else if (31 < id.Length)
3712 { 3712 {
3713 this.Core.Write(ErrorMessages.TableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id)); 3713 this.Core.Write(CoreErrors.TableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id));
3714 } 3714 }
3715 3715
3716 this.Core.ParseForExtensionElements(node); 3716 this.Core.ParseForExtensionElements(node);
@@ -3852,7 +3852,7 @@ namespace WixToolset.Core
3852 3852
3853 if (id.Id == "TARGETDIR" && name != "SourceDir" && shortName == null && shortSourceName == null && sourceName == null) 3853 if (id.Id == "TARGETDIR" && name != "SourceDir" && shortName == null && shortSourceName == null && sourceName == null)
3854 { 3854 {
3855 this.Core.Write(ErrorMessages.IllegalTargetDirDefaultDir(sourceLineNumbers, name)); 3855 this.Core.Write(CoreErrors.IllegalTargetDirDefaultDir(sourceLineNumbers, name));
3856 } 3856 }
3857 } 3857 }
3858 3858
@@ -4091,7 +4091,7 @@ namespace WixToolset.Core
4091 case "DirectorySearch": 4091 case "DirectorySearch":
4092 if (oneChild) 4092 if (oneChild)
4093 { 4093 {
4094 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4094 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4095 } 4095 }
4096 oneChild = true; 4096 oneChild = true;
4097 signature = this.ParseDirectorySearchElement(child, id.Id); 4097 signature = this.ParseDirectorySearchElement(child, id.Id);
@@ -4099,7 +4099,7 @@ namespace WixToolset.Core
4099 case "DirectorySearchRef": 4099 case "DirectorySearchRef":
4100 if (oneChild) 4100 if (oneChild)
4101 { 4101 {
4102 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4102 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4103 } 4103 }
4104 oneChild = true; 4104 oneChild = true;
4105 signature = this.ParseDirectorySearchRefElement(child, id.Id); 4105 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -4107,7 +4107,7 @@ namespace WixToolset.Core
4107 case "FileSearch": 4107 case "FileSearch":
4108 if (oneChild) 4108 if (oneChild)
4109 { 4109 {
4110 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 4110 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4111 } 4111 }
4112 oneChild = true; 4112 oneChild = true;
4113 hasFileSearch = true; 4113 hasFileSearch = true;
@@ -4116,7 +4116,7 @@ namespace WixToolset.Core
4116 case "FileSearchRef": 4116 case "FileSearchRef":
4117 if (oneChild) 4117 if (oneChild)
4118 { 4118 {
4119 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 4119 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4120 } 4120 }
4121 oneChild = true; 4121 oneChild = true;
4122 signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); 4122 signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature);
@@ -4223,7 +4223,7 @@ namespace WixToolset.Core
4223 { 4223 {
4224 if (!String.IsNullOrEmpty(parentSignature)) 4224 if (!String.IsNullOrEmpty(parentSignature))
4225 { 4225 {
4226 this.Core.Write(ErrorMessages.CanNotHaveTwoParents(sourceLineNumbers, id.Id, parent.Id, parentSignature)); 4226 this.Core.Write(CoreErrors.CanNotHaveTwoParents(sourceLineNumbers, id.Id, parent.Id, parentSignature));
4227 } 4227 }
4228 else 4228 else
4229 { 4229 {
@@ -4249,7 +4249,7 @@ namespace WixToolset.Core
4249 case "DirectorySearch": 4249 case "DirectorySearch":
4250 if (oneChild) 4250 if (oneChild)
4251 { 4251 {
4252 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4252 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4253 } 4253 }
4254 oneChild = true; 4254 oneChild = true;
4255 signature = this.ParseDirectorySearchElement(child, id.Id); 4255 signature = this.ParseDirectorySearchElement(child, id.Id);
@@ -4257,7 +4257,7 @@ namespace WixToolset.Core
4257 case "DirectorySearchRef": 4257 case "DirectorySearchRef":
4258 if (oneChild) 4258 if (oneChild)
4259 { 4259 {
4260 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4260 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4261 } 4261 }
4262 oneChild = true; 4262 oneChild = true;
4263 signature = this.ParseDirectorySearchRefElement(child, id.Id); 4263 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -4265,7 +4265,7 @@ namespace WixToolset.Core
4265 case "FileSearch": 4265 case "FileSearch":
4266 if (oneChild) 4266 if (oneChild)
4267 { 4267 {
4268 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 4268 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
4269 } 4269 }
4270 oneChild = true; 4270 oneChild = true;
4271 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 4271 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -4273,7 +4273,7 @@ namespace WixToolset.Core
4273 case "FileSearchRef": 4273 case "FileSearchRef":
4274 if (oneChild) 4274 if (oneChild)
4275 { 4275 {
4276 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 4276 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
4277 } 4277 }
4278 oneChild = true; 4278 oneChild = true;
4279 signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); 4279 signature = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature);
@@ -4350,7 +4350,7 @@ namespace WixToolset.Core
4350 case "followParent": 4350 case "followParent":
4351 if (ComplexReferenceParentType.Product == parentType) 4351 if (ComplexReferenceParentType.Product == parentType)
4352 { 4352 {
4353 this.Core.Write(ErrorMessages.RootFeatureCannotFollowParent(sourceLineNumbers)); 4353 this.Core.Write(CoreErrors.RootFeatureCannotFollowParent(sourceLineNumbers));
4354 } 4354 }
4355 //bits = bits | MsiInterop.MsidbFeatureAttributesFollowParent; 4355 //bits = bits | MsiInterop.MsidbFeatureAttributesFollowParent;
4356 installDefault = FeatureInstallDefault.FollowParent; 4356 installDefault = FeatureInstallDefault.FollowParent;
@@ -4413,17 +4413,17 @@ namespace WixToolset.Core
4413 } 4413 }
4414 else if (38 < id.Id.Length) 4414 else if (38 < id.Id.Length)
4415 { 4415 {
4416 this.Core.Write(ErrorMessages.FeatureNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id)); 4416 this.Core.Write(CoreErrors.FeatureNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", id.Id));
4417 } 4417 }
4418 4418
4419 if (null != configurableDirectory && configurableDirectory.ToUpper(CultureInfo.InvariantCulture) != configurableDirectory) 4419 if (null != configurableDirectory && configurableDirectory.ToUpper(CultureInfo.InvariantCulture) != configurableDirectory)
4420 { 4420 {
4421 this.Core.Write(ErrorMessages.FeatureConfigurableDirectoryNotUppercase(sourceLineNumbers, node.Name.LocalName, "ConfigurableDirectory", configurableDirectory)); 4421 this.Core.Write(CoreErrors.FeatureConfigurableDirectoryNotUppercase(sourceLineNumbers, node.Name.LocalName, "ConfigurableDirectory", configurableDirectory));
4422 } 4422 }
4423 4423
4424 if (FeatureTypicalDefault.Advertise == typicalDefault && disallowAdvertise) 4424 if (FeatureTypicalDefault.Advertise == typicalDefault && disallowAdvertise)
4425 { 4425 {
4426 this.Core.Write(ErrorMessages.FeatureCannotFavorAndDisallowAdvertise(sourceLineNumbers, node.Name.LocalName, "TypicalDefault", "advertise", "AllowAdvertise", "no")); 4426 this.Core.Write(CoreErrors.FeatureCannotFavorAndDisallowAdvertise(sourceLineNumbers, node.Name.LocalName, "TypicalDefault", "advertise", "AllowAdvertise", "no"));
4427 } 4427 }
4428 4428
4429 var childDisplay = 0; 4429 var childDisplay = 0;
@@ -4999,7 +4999,7 @@ namespace WixToolset.Core
4999 var extensionAdvertise = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); 4999 var extensionAdvertise = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
5000 if ((YesNoType.No == advertise && YesNoType.Yes == extensionAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == extensionAdvertise)) 5000 if ((YesNoType.No == advertise && YesNoType.Yes == extensionAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == extensionAdvertise))
5001 { 5001 {
5002 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, extensionAdvertise.ToString(), advertise.ToString())); 5002 this.Core.Write(CoreErrors.AdvertiseStateMustMatch(sourceLineNumbers, extensionAdvertise.ToString(), advertise.ToString()));
5003 } 5003 }
5004 advertise = extensionAdvertise; 5004 advertise = extensionAdvertise;
5005 break; 5005 break;
@@ -5978,7 +5978,7 @@ namespace WixToolset.Core
5978 // value must be specified and unique. 5978 // value must be specified and unique.
5979 if (isSameId) 5979 if (isSameId)
5980 { 5980 {
5981 this.Core.Write(ErrorMessages.UniqueFileSearchIdRequired(sourceLineNumbers, parentSignature, node.Name.LocalName)); 5981 this.Core.Write(CoreErrors.UniqueFileSearchIdRequired(sourceLineNumbers, parentSignature, node.Name.LocalName));
5982 } 5982 }
5983 } 5983 }
5984 else if (parentDepth > 1) 5984 else if (parentDepth > 1)
@@ -5987,7 +5987,7 @@ namespace WixToolset.Core
5987 // as the parent DirectorySearch if AssignToProperty is not set. 5987 // as the parent DirectorySearch if AssignToProperty is not set.
5988 if (!isSameId) 5988 if (!isSameId)
5989 { 5989 {
5990 this.Core.Write(ErrorMessages.IllegalSearchIdForParentDepth(sourceLineNumbers, id.Id, parentSignature)); 5990 this.Core.Write(CoreErrors.IllegalSearchIdForParentDepth(sourceLineNumbers, id.Id, parentSignature));
5991 } 5991 }
5992 } 5992 }
5993 5993
@@ -6574,7 +6574,7 @@ namespace WixToolset.Core
6574 case "DirectorySearch": 6574 case "DirectorySearch":
6575 if (oneChild) 6575 if (oneChild)
6576 { 6576 {
6577 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 6577 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
6578 } 6578 }
6579 oneChild = true; 6579 oneChild = true;
6580 6580
@@ -6584,7 +6584,7 @@ namespace WixToolset.Core
6584 case "DirectorySearchRef": 6584 case "DirectorySearchRef":
6585 if (oneChild) 6585 if (oneChild)
6586 { 6586 {
6587 this.Core.Write(ErrorMessages.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName)); 6587 this.Core.Write(CoreErrors.TooManySearchElements(childSourceLineNumbers, node.Name.LocalName));
6588 } 6588 }
6589 oneChild = true; 6589 oneChild = true;
6590 signature = this.ParseDirectorySearchRefElement(child, id.Id); 6590 signature = this.ParseDirectorySearchRefElement(child, id.Id);
@@ -6592,7 +6592,7 @@ namespace WixToolset.Core
6592 case "FileSearch": 6592 case "FileSearch":
6593 if (oneChild) 6593 if (oneChild)
6594 { 6594 {
6595 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 6595 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
6596 } 6596 }
6597 oneChild = true; 6597 oneChild = true;
6598 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet); 6598 signature = this.ParseFileSearchElement(child, id.Id, false, CompilerConstants.IntegerNotSet);
@@ -6601,7 +6601,7 @@ namespace WixToolset.Core
6601 case "FileSearchRef": 6601 case "FileSearchRef":
6602 if (oneChild) 6602 if (oneChild)
6603 { 6603 {
6604 this.Core.Write(ErrorMessages.TooManySearchElements(sourceLineNumbers, node.Name.LocalName)); 6604 this.Core.Write(CoreErrors.TooManySearchElements(sourceLineNumbers, node.Name.LocalName));
6605 } 6605 }
6606 oneChild = true; 6606 oneChild = true;
6607 var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures 6607 var newId = this.ParseSimpleRefElement(child, SymbolDefinitions.Signature); // FileSearch signatures override parent signatures
@@ -6909,13 +6909,13 @@ namespace WixToolset.Core
6909 var upgradeCode = contextValues["UpgradeCode"]; 6909 var upgradeCode = contextValues["UpgradeCode"];
6910 if (String.IsNullOrEmpty(upgradeCode)) 6910 if (String.IsNullOrEmpty(upgradeCode))
6911 { 6911 {
6912 this.Core.Write(ErrorMessages.ParentElementAttributeRequired(sourceLineNumbers, "Package", "UpgradeCode", node.Name.LocalName)); 6912 this.Core.Write(CoreErrors.ParentElementAttributeRequired(sourceLineNumbers, "Package", "UpgradeCode", node.Name.LocalName));
6913 } 6913 }
6914 6914
6915 var productVersion = contextValues["ProductVersion"]; 6915 var productVersion = contextValues["ProductVersion"];
6916 if (String.IsNullOrEmpty(productVersion)) 6916 if (String.IsNullOrEmpty(productVersion))
6917 { 6917 {
6918 this.Core.Write(ErrorMessages.ParentElementAttributeRequired(sourceLineNumbers, "Package", "Version", node.Name.LocalName)); 6918 this.Core.Write(CoreErrors.ParentElementAttributeRequired(sourceLineNumbers, "Package", "Version", node.Name.LocalName));
6919 } 6919 }
6920 6920
6921 var productLanguage = contextValues["ProductLanguage"]; 6921 var productLanguage = contextValues["ProductLanguage"];
@@ -7158,7 +7158,7 @@ namespace WixToolset.Core
7158 { 7158 {
7159 if (62 < cabinet.Length) 7159 if (62 < cabinet.Length)
7160 { 7160 {
7161 this.Core.Write(ErrorMessages.MediaEmbeddedCabinetNameTooLong(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet, cabinet.Length)); 7161 this.Core.Write(CoreErrors.MediaEmbeddedCabinetNameTooLong(sourceLineNumbers, node.Name.LocalName, "Cabinet", cabinet, cabinet.Length));
7162 } 7162 }
7163 7163
7164 cabinet = String.Concat("#", cabinet); 7164 cabinet = String.Concat("#", cabinet);
@@ -7198,11 +7198,11 @@ namespace WixToolset.Core
7198 case "DigitalSignature": 7198 case "DigitalSignature":
7199 if (YesNoType.Yes == embedCab) 7199 if (YesNoType.Yes == embedCab)
7200 { 7200 {
7201 this.Core.Write(ErrorMessages.SignedEmbeddedCabinet(childSourceLineNumbers)); 7201 this.Core.Write(CoreErrors.SignedEmbeddedCabinet(childSourceLineNumbers));
7202 } 7202 }
7203 else if (null == cabinet) 7203 else if (null == cabinet)
7204 { 7204 {
7205 this.Core.Write(ErrorMessages.ExpectedSignedCabinetName(childSourceLineNumbers)); 7205 this.Core.Write(CoreErrors.ExpectedSignedCabinetName(childSourceLineNumbers));
7206 } 7206 }
7207 else 7207 else
7208 { 7208 {
@@ -7305,7 +7305,7 @@ namespace WixToolset.Core
7305 // reason for having multiple cabinets. External cabinet files must also be valid file names. 7305 // reason for having multiple cabinets. External cabinet files must also be valid file names.
7306 if (exampleCabinetName.Equals(authoredCabinetTemplateValue, StringComparison.OrdinalIgnoreCase) || !this.Core.IsValidLongFilename(exampleCabinetName, false)) 7306 if (exampleCabinetName.Equals(authoredCabinetTemplateValue, StringComparison.OrdinalIgnoreCase) || !this.Core.IsValidLongFilename(exampleCabinetName, false))
7307 { 7307 {
7308 this.Core.Write(ErrorMessages.InvalidCabinetTemplate(sourceLineNumbers, cabinetTemplate)); 7308 this.Core.Write(CoreErrors.InvalidCabinetTemplate(sourceLineNumbers, cabinetTemplate));
7309 } 7309 }
7310 else if (!this.Core.IsValidLongFilename(exampleCabinetName) && !Common.ContainsValidBinderVariable(exampleCabinetName)) // ignore short names with wix variables because it rarely works out. 7310 else if (!this.Core.IsValidLongFilename(exampleCabinetName) && !Common.ContainsValidBinderVariable(exampleCabinetName)) // ignore short names with wix variables because it rarely works out.
7311 { 7311 {
@@ -7798,7 +7798,7 @@ namespace WixToolset.Core
7798 { 7798 {
7799 if (YesNoType.Yes != parentAdvertised) 7799 if (YesNoType.Yes != parentAdvertised)
7800 { 7800 {
7801 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), parentAdvertised.ToString())); 7801 this.Core.Write(CoreErrors.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), parentAdvertised.ToString()));
7802 } 7802 }
7803 7803
7804 if (!this.Core.EncounteredError) 7804 if (!this.Core.EncounteredError)
@@ -7815,7 +7815,7 @@ namespace WixToolset.Core
7815 { 7815 {
7816 if (YesNoType.Yes == returnContentType && YesNoType.Yes == parentAdvertised) 7816 if (YesNoType.Yes == returnContentType && YesNoType.Yes == parentAdvertised)
7817 { 7817 {
7818 this.Core.Write(ErrorMessages.CannotDefaultMismatchedAdvertiseStates(sourceLineNumbers)); 7818 this.Core.Write(CoreErrors.CannotDefaultMismatchedAdvertiseStates(sourceLineNumbers));
7819 } 7819 }
7820 7820
7821 this.Core.CreateRegistryStringSymbol(sourceLineNumbers, RegistryRootType.ClassesRoot, String.Concat("MIME\\Database\\Content Type\\", contentType), "Extension", String.Concat(".", extension), componentId); 7821 this.Core.CreateRegistryStringSymbol(sourceLineNumbers, RegistryRootType.ClassesRoot, String.Concat("MIME\\Database\\Content Type\\", contentType), "Extension", String.Concat(".", extension), componentId);
@@ -8109,7 +8109,7 @@ namespace WixToolset.Core
8109 if (parsedValidate) 8109 if (parsedValidate)
8110 { 8110 {
8111 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 8111 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
8112 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 8112 this.Core.Write(CoreErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
8113 } 8113 }
8114 else 8114 else
8115 { 8115 {
diff --git a/src/wix/WixToolset.Core/CompilerCore.cs b/src/wix/WixToolset.Core/CompilerCore.cs
index 57d84c3a..5abd3f70 100644
--- a/src/wix/WixToolset.Core/CompilerCore.cs
+++ b/src/wix/WixToolset.Core/CompilerCore.cs
@@ -446,7 +446,7 @@ namespace WixToolset.Core
446 } 446 }
447 catch (NotSupportedException) 447 catch (NotSupportedException)
448 { 448 {
449 this.Write(ErrorMessages.IllegalCodepageAttribute(sourceLineNumbers, value, attribute.Parent.Name.LocalName, attribute.Name.LocalName)); 449 this.Write(CoreErrors.IllegalCodepageAttribute(sourceLineNumbers, value, attribute.Parent.Name.LocalName, attribute.Name.LocalName));
450 } 450 }
451 451
452 return CompilerConstants.IllegalInteger; 452 return CompilerConstants.IllegalInteger;
@@ -482,7 +482,7 @@ namespace WixToolset.Core
482 catch (NotSupportedException) 482 catch (NotSupportedException)
483 { 483 {
484 // Not a valid windows code page. 484 // Not a valid windows code page.
485 this.messaging.Write(ErrorMessages.IllegalCodepageAttribute(sourceLineNumbers, value, attribute.Parent.Name.LocalName, attribute.Name.LocalName)); 485 this.messaging.Write(CoreErrors.IllegalCodepageAttribute(sourceLineNumbers, value, attribute.Parent.Name.LocalName, attribute.Name.LocalName));
486 } 486 }
487 catch (WixException e) 487 catch (WixException e)
488 { 488 {
@@ -552,7 +552,7 @@ namespace WixToolset.Core
552 552
553 if (date.Year < 1980 || date.Year > 2043) 553 if (date.Year < 1980 || date.Year > 2043)
554 { 554 {
555 this.Write(ErrorMessages.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 555 this.Write(CoreErrors.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
556 } 556 }
557 557
558 return ((((date.Year - 1980) * 512) + (date.Month * 32 + date.Day)) * 65536) + 558 return ((((date.Year - 1980) * 512) + (date.Month * 32 + date.Day)) * 65536) +
@@ -560,15 +560,15 @@ namespace WixToolset.Core
560 } 560 }
561 catch (ArgumentOutOfRangeException) 561 catch (ArgumentOutOfRangeException)
562 { 562 {
563 this.Write(ErrorMessages.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 563 this.Write(CoreErrors.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
564 } 564 }
565 catch (FormatException) 565 catch (FormatException)
566 { 566 {
567 this.Write(ErrorMessages.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 567 this.Write(CoreErrors.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
568 } 568 }
569 catch (OverflowException) 569 catch (OverflowException)
570 { 570 {
571 this.Write(ErrorMessages.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 571 this.Write(CoreErrors.InvalidDateTimeFormat(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
572 } 572 }
573 } 573 }
574 574
@@ -712,7 +712,7 @@ namespace WixToolset.Core
712 && !Common.ContainsValidBinderVariable(value) 712 && !Common.ContainsValidBinderVariable(value)
713 && !this.IsValidLocIdentifier(value)) 713 && !this.IsValidLocIdentifier(value))
714 { 714 {
715 this.Write(ErrorMessages.IllegalShortFilename(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 715 this.Write(CoreErrors.IllegalShortFilename(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
716 } 716 }
717 else if (CompilerCore.IsAmbiguousFilename(value)) 717 else if (CompilerCore.IsAmbiguousFilename(value))
718 { 718 {
@@ -917,11 +917,11 @@ namespace WixToolset.Core
917 { 917 {
918 if (this.GetType().Assembly.Equals(caller)) 918 if (this.GetType().Assembly.Equals(caller))
919 { 919 {
920 this.Write(ErrorMessages.InsufficientVersion(sourceLineNumbers, versionCurrent, versionRequired)); 920 this.Write(CoreErrors.InsufficientVersion(sourceLineNumbers, versionCurrent, versionRequired));
921 } 921 }
922 else 922 else
923 { 923 {
924 this.Write(ErrorMessages.InsufficientVersion(sourceLineNumbers, versionCurrent, versionRequired, name.Name)); 924 this.Write(CoreErrors.InsufficientVersion(sourceLineNumbers, versionCurrent, versionRequired, name.Name));
925 } 925 }
926 } 926 }
927 } 927 }
diff --git a/src/wix/WixToolset.Core/CompilerErrors.cs b/src/wix/WixToolset.Core/CompilerErrors.cs
index a7f9b06c..0f30a69a 100644
--- a/src/wix/WixToolset.Core/CompilerErrors.cs
+++ b/src/wix/WixToolset.Core/CompilerErrors.cs
@@ -2,7 +2,6 @@
2 2
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using System;
6 using WixToolset.Data; 5 using WixToolset.Data;
7 6
8 internal static class CompilerErrors 7 internal static class CompilerErrors
diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs
index db49e728..81f759a1 100644
--- a/src/wix/WixToolset.Core/Compiler_Bundle.cs
+++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs
@@ -338,7 +338,7 @@ namespace WixToolset.Core
338 if (chainSeen) 338 if (chainSeen)
339 { 339 {
340 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 340 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
341 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Chain")); 341 this.Core.Write(CoreErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Chain"));
342 } 342 }
343 this.ParseChainElement(child); 343 this.ParseChainElement(child);
344 chainSeen = true; 344 chainSeen = true;
@@ -353,7 +353,7 @@ namespace WixToolset.Core
353 if (logSeen) 353 if (logSeen)
354 { 354 {
355 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 355 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
356 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Log")); 356 this.Core.Write(CoreErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Log"));
357 } 357 }
358 logVariablePrefixAndExtension = this.ParseLogElement(child, fileSystemSafeBundleName); 358 logVariablePrefixAndExtension = this.ParseLogElement(child, fileSystemSafeBundleName);
359 logSeen = true; 359 logSeen = true;
@@ -386,7 +386,7 @@ namespace WixToolset.Core
386 if (updateSeen) 386 if (updateSeen)
387 { 387 {
388 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 388 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
389 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Update")); 389 this.Core.Write(CoreErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "Update"));
390 } 390 }
391 this.ParseUpdateElement(child); 391 this.ParseUpdateElement(child);
392 updateSeen = true; 392 updateSeen = true;
@@ -2310,7 +2310,7 @@ namespace WixToolset.Core
2310 2310
2311 if (childCompilerPackagePayload != null) 2311 if (childCompilerPackagePayload != null)
2312 { 2312 {
2313 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 2313 this.Core.Write(CoreErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
2314 } 2314 }
2315 else if (hasPayloadInfo) 2315 else if (hasPayloadInfo)
2316 { 2316 {
@@ -2832,7 +2832,7 @@ namespace WixToolset.Core
2832 if (remoteBundleSeen) 2832 if (remoteBundleSeen)
2833 { 2833 {
2834 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 2834 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
2835 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "RemoteBundle")); 2835 this.Core.Write(CoreErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, "RemoteBundle"));
2836 } 2836 }
2837 2837
2838 this.ParseRemoteBundleElement(child, compilerPayload.Id.Id); 2838 this.ParseRemoteBundleElement(child, compilerPayload.Id.Id);
diff --git a/src/wix/WixToolset.Core/Compiler_CustomTable.cs b/src/wix/WixToolset.Core/Compiler_CustomTable.cs
index 03fa2323..1e18f250 100644
--- a/src/wix/WixToolset.Core/Compiler_CustomTable.cs
+++ b/src/wix/WixToolset.Core/Compiler_CustomTable.cs
@@ -56,7 +56,7 @@ namespace WixToolset.Core
56 } 56 }
57 else if (31 < tableId.Length) 57 else if (31 < tableId.Length)
58 { 58 {
59 this.Core.Write(ErrorMessages.CustomTableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", tableId)); 59 this.Core.Write(CoreErrors.CustomTableNameTooLong(sourceLineNumbers, node.Name.LocalName, "Id", tableId));
60 } 60 }
61 61
62 foreach (var child in node.Elements()) 62 foreach (var child in node.Elements())
@@ -93,7 +93,7 @@ namespace WixToolset.Core
93 { 93 {
94 if (!columns.Where(c => c.PrimaryKey).Any()) 94 if (!columns.Where(c => c.PrimaryKey).Any())
95 { 95 {
96 this.Core.Write(ErrorMessages.CustomTableMissingPrimaryKey(sourceLineNumbers)); 96 this.Core.Write(CoreErrors.CustomTableMissingPrimaryKey(sourceLineNumbers));
97 } 97 }
98 98
99 if (!this.Core.EncounteredError) 99 if (!this.Core.EncounteredError)
@@ -407,7 +407,7 @@ namespace WixToolset.Core
407 { 407 {
408 if (2 != width && 4 != width) 408 if (2 != width && 4 != width)
409 { 409 {
410 this.Core.Write(ErrorMessages.CustomTableIllegalColumnWidth(childSourceLineNumbers, child.Name.LocalName, "Width", width)); 410 this.Core.Write(CoreErrors.CustomTableIllegalColumnWidth(childSourceLineNumbers, child.Name.LocalName, "Width", width));
411 } 411 }
412 } 412 }
413 else if (columnType == IntermediateFieldType.Path) 413 else if (columnType == IntermediateFieldType.Path)
@@ -418,7 +418,7 @@ namespace WixToolset.Core
418 } 418 }
419 else if (category != WixCustomTableColumnCategoryType.Binary) 419 else if (category != WixCustomTableColumnCategoryType.Binary)
420 { 420 {
421 this.Core.Write(ErrorMessages.ExpectedBinaryCategory(childSourceLineNumbers)); 421 this.Core.Write(CoreErrors.ExpectedBinaryCategory(childSourceLineNumbers));
422 } 422 }
423 } 423 }
424 424
diff --git a/src/wix/WixToolset.Core/Compiler_EmbeddedUI.cs b/src/wix/WixToolset.Core/Compiler_EmbeddedUI.cs
index ede03933..a0ba652d 100644
--- a/src/wix/WixToolset.Core/Compiler_EmbeddedUI.cs
+++ b/src/wix/WixToolset.Core/Compiler_EmbeddedUI.cs
@@ -295,7 +295,7 @@ namespace WixToolset.Core
295 295
296 if (!name.Contains(".")) 296 if (!name.Contains("."))
297 { 297 {
298 this.Core.Write(ErrorMessages.InvalidEmbeddedUIFileName(sourceLineNumbers, name)); 298 this.Core.Write(CoreErrors.InvalidEmbeddedUIFileName(sourceLineNumbers, name));
299 } 299 }
300 300
301 foreach (var child in node.Elements()) 301 foreach (var child in node.Elements())
diff --git a/src/wix/WixToolset.Core/Compiler_Module.cs b/src/wix/WixToolset.Core/Compiler_Module.cs
index 08f47657..41a75165 100644
--- a/src/wix/WixToolset.Core/Compiler_Module.cs
+++ b/src/wix/WixToolset.Core/Compiler_Module.cs
@@ -420,7 +420,7 @@ namespace WixToolset.Core
420 420
421 if (CompilerConstants.IntegerNotSet != excludeExceptLanguage && CompilerConstants.IntegerNotSet != excludeLanguage) 421 if (CompilerConstants.IntegerNotSet != excludeExceptLanguage && CompilerConstants.IntegerNotSet != excludeLanguage)
422 { 422 {
423 this.Core.Write(ErrorMessages.IllegalModuleExclusionLanguageAttributes(sourceLineNumbers)); 423 this.Core.Write(CoreErrors.IllegalModuleExclusionLanguageAttributes(sourceLineNumbers));
424 } 424 }
425 else if (CompilerConstants.IntegerNotSet != excludeExceptLanguage) 425 else if (CompilerConstants.IntegerNotSet != excludeExceptLanguage)
426 { 426 {
diff --git a/src/wix/WixToolset.Core/Compiler_Package.cs b/src/wix/WixToolset.Core/Compiler_Package.cs
index e0af9695..004c8c1d 100644
--- a/src/wix/WixToolset.Core/Compiler_Package.cs
+++ b/src/wix/WixToolset.Core/Compiler_Package.cs
@@ -1310,7 +1310,7 @@ namespace WixToolset.Core
1310 1310
1311 if ((YesNoType.No == advertise && YesNoType.Yes == progIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == progIdAdvertise)) 1311 if ((YesNoType.No == advertise && YesNoType.Yes == progIdAdvertise) || (YesNoType.Yes == advertise && YesNoType.No == progIdAdvertise))
1312 { 1312 {
1313 this.Core.Write(ErrorMessages.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), progIdAdvertise.ToString())); 1313 this.Core.Write(CoreErrors.AdvertiseStateMustMatch(sourceLineNumbers, advertise.ToString(), progIdAdvertise.ToString()));
1314 } 1314 }
1315 else if (YesNoType.NotSet != progIdAdvertise) 1315 else if (YesNoType.NotSet != progIdAdvertise)
1316 { 1316 {
@@ -1324,7 +1324,7 @@ namespace WixToolset.Core
1324 1324
1325 if (null != parent && (null != icon || CompilerConstants.IntegerNotSet != iconIndex)) 1325 if (null != parent && (null != icon || CompilerConstants.IntegerNotSet != iconIndex))
1326 { 1326 {
1327 this.Core.Write(ErrorMessages.VersionIndependentProgIdsCannotHaveIcons(sourceLineNumbers)); 1327 this.Core.Write(CoreErrors.VersionIndependentProgIdsCannotHaveIcons(sourceLineNumbers));
1328 } 1328 }
1329 1329
1330 var firstProgIdForNestedClass = YesNoType.Yes; 1330 var firstProgIdForNestedClass = YesNoType.Yes;
@@ -1356,7 +1356,7 @@ namespace WixToolset.Core
1356 else 1356 else
1357 { 1357 {
1358 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 1358 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
1359 this.Core.Write(ErrorMessages.ProgIdNestedTooDeep(childSourceLineNumbers)); 1359 this.Core.Write(CoreErrors.ProgIdNestedTooDeep(childSourceLineNumbers));
1360 } 1360 }
1361 break; 1361 break;
1362 default: 1362 default:
@@ -1513,7 +1513,7 @@ namespace WixToolset.Core
1513 } 1513 }
1514 else if ("SecureCustomProperties" == id.Id || "AdminProperties" == id.Id || "MsiHiddenProperties" == id.Id) 1514 else if ("SecureCustomProperties" == id.Id || "AdminProperties" == id.Id || "MsiHiddenProperties" == id.Id)
1515 { 1515 {
1516 this.Core.Write(ErrorMessages.CannotAuthorSpecialProperties(sourceLineNumbers, id.Id)); 1516 this.Core.Write(CoreErrors.CannotAuthorSpecialProperties(sourceLineNumbers, id.Id));
1517 } 1517 }
1518 1518
1519 if ("ErrorDialog" == id.Id) 1519 if ("ErrorDialog" == id.Id)
@@ -1548,7 +1548,7 @@ namespace WixToolset.Core
1548 // If we're doing CCP then there must be a signature. 1548 // If we're doing CCP then there must be a signature.
1549 if (complianceCheck && 0 == signatures.Count) 1549 if (complianceCheck && 0 == signatures.Count)
1550 { 1550 {
1551 this.Core.Write(ErrorMessages.SearchElementRequiredWithAttribute(sourceLineNumbers, node.Name.LocalName, "ComplianceCheck", "yes")); 1551 this.Core.Write(CoreErrors.SearchElementRequiredWithAttribute(sourceLineNumbers, node.Name.LocalName, "ComplianceCheck", "yes"));
1552 } 1552 }
1553 1553
1554 foreach (var sig in signatures) 1554 foreach (var sig in signatures)
@@ -1638,7 +1638,7 @@ namespace WixToolset.Core
1638 case "Root": 1638 case "Root":
1639 if (root.HasValue) 1639 if (root.HasValue)
1640 { 1640 {
1641 this.Core.Write(ErrorMessages.RegistryRootInvalid(sourceLineNumbers)); 1641 this.Core.Write(CoreErrors.RegistryRootInvalid(sourceLineNumbers));
1642 } 1642 }
1643 1643
1644 root = this.Core.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, true); 1644 root = this.Core.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, true);
@@ -1696,7 +1696,7 @@ namespace WixToolset.Core
1696 { 1696 {
1697 if (YesNoType.Yes == keyPath) 1697 if (YesNoType.Yes == keyPath)
1698 { 1698 {
1699 this.Core.Write(ErrorMessages.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource")); 1699 this.Core.Write(CoreErrors.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
1700 } 1700 }
1701 1701
1702 possibleKeyPath = possibleChildKeyPath; // the child is the key path 1702 possibleKeyPath = possibleChildKeyPath; // the child is the key path
@@ -1712,7 +1712,7 @@ namespace WixToolset.Core
1712 { 1712 {
1713 if (YesNoType.Yes == keyPath) 1713 if (YesNoType.Yes == keyPath)
1714 { 1714 {
1715 this.Core.Write(ErrorMessages.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource")); 1715 this.Core.Write(CoreErrors.ComponentMultipleKeyPaths(sourceLineNumbers, child.Name.LocalName, "KeyPath", "yes", "File", "RegistryValue", "ODBCDataSource"));
1716 } 1716 }
1717 1717
1718 possibleKeyPath = possibleChildKeyPath; // the child is the key path 1718 possibleKeyPath = possibleChildKeyPath; // the child is the key path
@@ -1839,7 +1839,7 @@ namespace WixToolset.Core
1839 case "Root": 1839 case "Root":
1840 if (root.HasValue) 1840 if (root.HasValue)
1841 { 1841 {
1842 this.Core.Write(ErrorMessages.RegistryRootInvalid(sourceLineNumbers)); 1842 this.Core.Write(CoreErrors.RegistryRootInvalid(sourceLineNumbers));
1843 } 1843 }
1844 1844
1845 root = this.Core.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, true); 1845 root = this.Core.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, true);
@@ -1915,7 +1915,7 @@ namespace WixToolset.Core
1915 case "MultiStringValue": 1915 case "MultiStringValue":
1916 if (RegistryValueType.MultiString != valueType && null != value) 1916 if (RegistryValueType.MultiString != valueType && null != value)
1917 { 1917 {
1918 this.Core.Write(ErrorMessages.RegistryMultipleValuesWithoutMultiString(sourceLineNumbers, node.Name.LocalName, "Value", child.Name.LocalName, "Type")); 1918 this.Core.Write(CoreErrors.RegistryMultipleValuesWithoutMultiString(sourceLineNumbers, node.Name.LocalName, "Value", child.Name.LocalName, "Type"));
1919 } 1919 }
1920 else 1920 else
1921 { 1921 {
@@ -1985,7 +1985,7 @@ namespace WixToolset.Core
1985 } 1985 }
1986 else if (0 == value?.Length && ("+" == name || "-" == name || "*" == name)) // prevent accidental authoring of special name values 1986 else if (0 == value?.Length && ("+" == name || "-" == name || "*" == name)) // prevent accidental authoring of special name values
1987 { 1987 {
1988 this.Core.Write(ErrorMessages.RegistryNameValueIncorrect(sourceLineNumbers, node.Name.LocalName, "Name", name)); 1988 this.Core.Write(CoreErrors.RegistryNameValueIncorrect(sourceLineNumbers, node.Name.LocalName, "Name", name));
1989 } 1989 }
1990 1990
1991 if (!this.Core.EncounteredError) 1991 if (!this.Core.EncounteredError)
@@ -2662,17 +2662,17 @@ namespace WixToolset.Core
2662 } 2662 }
2663 else if ((customAction || showDialog || specialAction) && !suppress && CompilerConstants.IntegerNotSet == sequence && null == beforeAction && null == afterAction) 2663 else if ((customAction || showDialog || specialAction) && !suppress && CompilerConstants.IntegerNotSet == sequence && null == beforeAction && null == afterAction)
2664 { 2664 {
2665 this.Core.Write(ErrorMessages.NeedSequenceBeforeOrAfter(childSourceLineNumbers, child.Name.LocalName)); 2665 this.Core.Write(CoreErrors.NeedSequenceBeforeOrAfter(childSourceLineNumbers, child.Name.LocalName));
2666 } 2666 }
2667 2667
2668 // action that is scheduled to occur before/after itself 2668 // action that is scheduled to occur before/after itself
2669 if (beforeAction == actionName) 2669 if (beforeAction == actionName)
2670 { 2670 {
2671 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "Before", beforeAction)); 2671 this.Core.Write(CoreErrors.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "Before", beforeAction));
2672 } 2672 }
2673 else if (afterAction == actionName) 2673 else if (afterAction == actionName)
2674 { 2674 {
2675 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "After", afterAction)); 2675 this.Core.Write(CoreErrors.ActionScheduledRelativeToItself(childSourceLineNumbers, child.Name.LocalName, "After", afterAction));
2676 } 2676 }
2677 2677
2678 // normal standard actions cannot be set overridable by the user (since they are overridable by default) 2678 // normal standard actions cannot be set overridable by the user (since they are overridable by default)
@@ -3622,7 +3622,7 @@ namespace WixToolset.Core
3622 break; 3622 break;
3623 case "boot": 3623 case "boot":
3624 case "system": 3624 case "system":
3625 this.Core.Write(ErrorMessages.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, startValue)); 3625 this.Core.Write(CoreErrors.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, startValue));
3626 break; 3626 break;
3627 case "": 3627 case "":
3628 break; 3628 break;
@@ -3643,7 +3643,7 @@ namespace WixToolset.Core
3643 break; 3643 break;
3644 case "kernelDriver": 3644 case "kernelDriver":
3645 case "systemDriver": 3645 case "systemDriver":
3646 this.Core.Write(ErrorMessages.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue)); 3646 this.Core.Write(CoreErrors.ValueNotSupported(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, typeValue));
3647 break; 3647 break;
3648 case "": 3648 case "":
3649 break; 3649 break;
@@ -3947,11 +3947,11 @@ namespace WixToolset.Core
3947 // action that is scheduled to occur before/after itself 3947 // action that is scheduled to occur before/after itself
3948 if (beforeAction == actionName) 3948 if (beforeAction == actionName)
3949 { 3949 {
3950 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "Before", beforeAction)); 3950 this.Core.Write(CoreErrors.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "Before", beforeAction));
3951 } 3951 }
3952 else if (afterAction == actionName) 3952 else if (afterAction == actionName)
3953 { 3953 {
3954 this.Core.Write(ErrorMessages.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction)); 3954 this.Core.Write(CoreErrors.ActionScheduledRelativeToItself(sourceLineNumbers, node.Name.LocalName, "After", afterAction));
3955 } 3955 }
3956 3956
3957 this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, actionName)) 3957 this.Core.AddSymbol(new CustomActionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, actionName))
@@ -4605,7 +4605,7 @@ namespace WixToolset.Core
4605 { 4605 {
4606 if (CompilerConstants.LongNotSet != resourceId) 4606 if (CompilerConstants.LongNotSet != resourceId)
4607 { 4607 {
4608 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "ResourceId")); 4608 this.Core.Write(CoreErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "ResourceId"));
4609 } 4609 }
4610 4610
4611 if (0 != flags) 4611 if (0 != flags)
@@ -4663,7 +4663,7 @@ namespace WixToolset.Core
4663 4663
4664 if (null == fileServer) 4664 if (null == fileServer)
4665 { 4665 {
4666 this.Core.Write(ErrorMessages.MissingTypeLibFile(sourceLineNumbers, node.Name.LocalName, "File")); 4666 this.Core.Write(CoreErrors.MissingTypeLibFile(sourceLineNumbers, node.Name.LocalName, "File"));
4667 } 4667 }
4668 4668
4669 if (null == registryVersion) 4669 if (null == registryVersion)
@@ -4834,7 +4834,7 @@ namespace WixToolset.Core
4834 } 4834 }
4835 else if (actionProperty.ToUpper(CultureInfo.InvariantCulture) != actionProperty) 4835 else if (actionProperty.ToUpper(CultureInfo.InvariantCulture) != actionProperty)
4836 { 4836 {
4837 this.Core.Write(ErrorMessages.SecurePropertyNotUppercase(sourceLineNumbers, node.Name.LocalName, "Property", actionProperty)); 4837 this.Core.Write(CoreErrors.SecurePropertyNotUppercase(sourceLineNumbers, node.Name.LocalName, "Property", actionProperty));
4838 } 4838 }
4839 4839
4840 if (null == minimum && null == maximum) 4840 if (null == minimum && null == maximum)
@@ -4941,12 +4941,12 @@ namespace WixToolset.Core
4941 { 4941 {
4942 if (null != targetFile) 4942 if (null != targetFile)
4943 { 4943 {
4944 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile")); 4944 this.Core.Write(CoreErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetFile"));
4945 } 4945 }
4946 4946
4947 if (null != targetProperty) 4947 if (null != targetProperty)
4948 { 4948 {
4949 this.Core.Write(ErrorMessages.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetProperty")); 4949 this.Core.Write(CoreErrors.IllegalAttributeWhenAdvertised(sourceLineNumbers, node.Name.LocalName, "TargetProperty"));
4950 } 4950 }
4951 4951
4952 if (!this.Core.EncounteredError) 4952 if (!this.Core.EncounteredError)
@@ -5085,7 +5085,7 @@ namespace WixToolset.Core
5085 case "": 5085 case "":
5086 break; 5086 break;
5087 default: 5087 default:
5088 this.Core.Write(ErrorMessages.IllegalCompressionLevel(sourceLineNumbers, compressionLevel)); 5088 this.Core.Write(CoreErrors.IllegalCompressionLevel(sourceLineNumbers, compressionLevel));
5089 break; 5089 break;
5090 } 5090 }
5091 5091
diff --git a/src/wix/WixToolset.Core/Compiler_UI.cs b/src/wix/WixToolset.Core/Compiler_UI.cs
index d9ff2a36..eeeeaa46 100644
--- a/src/wix/WixToolset.Core/Compiler_UI.cs
+++ b/src/wix/WixToolset.Core/Compiler_UI.cs
@@ -82,7 +82,7 @@ namespace WixToolset.Core
82 if (0 < embeddedUICount) // there can be only one embedded UI 82 if (0 < embeddedUICount) // there can be only one embedded UI
83 { 83 {
84 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 84 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
85 this.Core.Write(ErrorMessages.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName)); 85 this.Core.Write(CoreErrors.TooManyChildren(childSourceLineNumbers, node.Name.LocalName, child.Name.LocalName));
86 } 86 }
87 this.ParseEmbeddedUIElement(child); 87 this.ParseEmbeddedUIElement(child);
88 ++embeddedUICount; 88 ++embeddedUICount;
@@ -108,7 +108,7 @@ namespace WixToolset.Core
108 if (RadioButtonType.Bitmap == radioButtonType || RadioButtonType.Icon == radioButtonType) 108 if (RadioButtonType.Bitmap == radioButtonType || RadioButtonType.Icon == radioButtonType)
109 { 109 {
110 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 110 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
111 this.Core.Write(ErrorMessages.RadioButtonBitmapAndIconDisallowed(childSourceLineNumbers)); 111 this.Core.Write(CoreErrors.RadioButtonBitmapAndIconDisallowed(childSourceLineNumbers));
112 } 112 }
113 break; 113 break;
114 case "TextStyle": 114 case "TextStyle":
@@ -639,7 +639,7 @@ namespace WixToolset.Core
639 else if (groupType != type) 639 else if (groupType != type)
640 { 640 {
641 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); 641 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
642 this.Core.Write(ErrorMessages.RadioButtonTypeInconsistent(childSourceLineNumbers)); 642 this.Core.Write(CoreErrors.RadioButtonTypeInconsistent(childSourceLineNumbers));
643 } 643 }
644 break; 644 break;
645 default: 645 default:
@@ -1009,7 +1009,7 @@ namespace WixToolset.Core
1009 1009
1010 if (null == firstControl) 1010 if (null == firstControl)
1011 { 1011 {
1012 this.Core.Write(ErrorMessages.NoFirstControlSpecified(sourceLineNumbers, id.Id)); 1012 this.Core.Write(CoreErrors.NoFirstControlSpecified(sourceLineNumbers, id.Id));
1013 } 1013 }
1014 1014
1015 if (!this.Core.EncounteredError) 1015 if (!this.Core.EncounteredError)
@@ -1611,7 +1611,7 @@ namespace WixToolset.Core
1611 } 1611 }
1612 else if (symbol != null) 1612 else if (symbol != null)
1613 { 1613 {
1614 this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType)); 1614 this.Core.Write(CoreErrors.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType));
1615 } 1615 }
1616 1616
1617 if (null == firstControl) 1617 if (null == firstControl)
diff --git a/src/wix/WixToolset.Core/CoreErrors.cs b/src/wix/WixToolset.Core/CoreErrors.cs
index 16feb9dc..1789de31 100644
--- a/src/wix/WixToolset.Core/CoreErrors.cs
+++ b/src/wix/WixToolset.Core/CoreErrors.cs
@@ -2,6 +2,8 @@
2 2
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using System;
6 using System.Collections.Generic;
5 using WixToolset.Data; 7 using WixToolset.Data;
6 8
7 internal static class CoreErrors 9 internal static class CoreErrors
@@ -31,6 +33,741 @@ namespace WixToolset.Core
31 return Message(null, Ids.BackendNotFound, "Unable to find a backend to process output type: {0} for output file: {1}. Specify a different output type or output file extension.", outputType, outputPath); 33 return Message(null, Ids.BackendNotFound, "Unable to find a backend to process output type: {0} for output file: {1}. Specify a different output type or output file extension.", outputType, outputPath);
32 } 34 }
33 35
36 public static Message AdditionalArgumentUnexpected(string argument)
37 {
38 return Message(null, Ids.AdditionalArgumentUnexpected, "Additional argument '{0}' was unexpected. Remove the argument and add the '-?' switch for more information.", argument);
39 }
40
41 public static Message IntermediatesMustBeCompiled(string invalidIntermediates)
42 {
43 return Message(null, Ids.IntermediatesMustBeCompiled, "Intermediates being linked must have been compiled. Intermediates with these ids were not compiled: {0}", invalidIntermediates);
44 }
45
46 public static Message WixiplSourceFileIsExclusive()
47 {
48 return Message(null, Ids.WixiplSourceFileIsExclusive, "When an intermediate post link source file is specified, it must be the only source file provided.");
49 }
50
51 public static Message CannotReundefineVariable(SourceLineNumber sourceLineNumbers, string variableName)
52 {
53 return Message(sourceLineNumbers, Ids.CannotReundefineVariable, "The variable '{0}' cannot be undefined because its already undefined.", variableName);
54 }
55
56 public static Message ComponentExpectedFeature(SourceLineNumber sourceLineNumbers, string component, string type, string target)
57 {
58 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);
59 }
60
61 public static Message ComponentReferencedTwice(SourceLineNumber sourceLineNumbers, string crefChildId)
62 {
63 return Message(sourceLineNumbers, Ids.ComponentReferencedTwice, "Component {0} cannot be contained in a Module twice.", crefChildId);
64 }
65
66 public static Message DisallowedMsiProperty(SourceLineNumber sourceLineNumbers, string property, string illegalValueList)
67 {
68 return Message(sourceLineNumbers, Ids.DisallowedMsiProperty, "The '{0}' MsiProperty is controlled by the bootstrapper and cannot be authored. (Illegal properties are: {1}.) Remove the MsiProperty element.", property, illegalValueList);
69 }
70
71 public static Message DuplicatedUiLocalization(SourceLineNumber sourceLineNumbers, string controlName, string dialogName)
72 {
73 return Message(sourceLineNumbers, Ids.DuplicatedUiLocalization, "The localization for control {0} in dialog {1} is duplicated. Only one localization per control is allowed.", controlName, dialogName);
74 }
75
76 public static Message DuplicatedUiLocalization(SourceLineNumber sourceLineNumbers, string dialogName)
77 {
78 return Message(sourceLineNumbers, Ids.DuplicatedUiLocalization, "The localization for dialog {0} is duplicated. Only one localization per dialog is allowed.", dialogName);
79 }
80
81 public static Message DuplicateExtensionPreprocessorType(string extension, string variablePrefix, string collidingExtension)
82 {
83 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);
84 }
85
86 public static Message DuplicateLocalizationIdentifier(SourceLineNumber sourceLineNumbers, string localizationId)
87 {
88 return Message(sourceLineNumbers, Ids.DuplicateLocalizationIdentifier, "The localization identifier '{0}' has been duplicated in multiple locations. A common cause is a bundle .wixproj that automatically loads .wxl files that are intended for the bootstrapper application. You can turn off that behavior by setting the EnableDefaultEmbeddedResourceItems property to false.", localizationId);
89 }
90
91 public static Message DuplicateVariableDefinition(string variableName, string variableValue, string variableCollidingValue)
92 {
93 return Message(null, Ids.DuplicateVariableDefinition, "The variable '{0}' with value '{1}' was previously declared with value '{2}'.", variableName, variableValue, variableCollidingValue);
94 }
95
96 public static Message ExampleGuid(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
97 {
98 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);
99 }
100
101 public static Message ExpectedArgument(string argument)
102 {
103 return Message(null, Ids.ExpectedArgument, "{0} is expected to be followed by a value. See -? for additional detail.", argument);
104 }
105
106 public static Message ExpectedDirectory(string directory)
107 {
108 return Message(null, Ids.ExpectedDirectory, "The directory '{0}' could not be found.", directory);
109 }
110
111 public static Message ExpectedDirectoryGotFile(string option, string path)
112 {
113 return Message(null, Ids.ExpectedDirectoryGotFile, "The {0} option requires a directory, but the provided path is a file: {1}", option, path);
114 }
115
116 public static Message ExpectedEndforeach(SourceLineNumber sourceLineNumbers)
117 {
118 return Message(sourceLineNumbers, Ids.ExpectedEndforeach, "A <?foreach?> statement was found that had no matching <?endforeach?>.");
119 }
120
121 public static Message ExpectedExpressionAfterNot(SourceLineNumber sourceLineNumbers, string expression)
122 {
123 return Message(sourceLineNumbers, Ids.ExpectedExpressionAfterNot, "Expecting an argument for 'NOT' in expression '{0}'.", expression);
124 }
125
126 public static Message ExpectedFileGotDirectory(string option, string path)
127 {
128 return Message(null, Ids.ExpectedFileGotDirectory, "The {0} option requires a file, but the provided path is a directory: {1}", option, path);
129 }
130
131 public static Message ExpectedVariable(SourceLineNumber sourceLineNumbers, string expression)
132 {
133 return Message(sourceLineNumbers, Ids.ExpectedVariable, "A required variable was missing in the expression '{0}'.", expression);
134 }
135
136 public static Message FileInUse(SourceLineNumber sourceLineNumbers, string file)
137 {
138 return Message(sourceLineNumbers, Ids.FileInUse, "The process can not access the file '{0}' because it is being used by another process.", file);
139 }
140
141 public static Message IllegalAttributeValueWithIllegalList(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string illegalValueList)
142 {
143 return Message(sourceLineNumbers, Ids.IllegalAttributeValueWithIllegalList, "The {0}/@{1} attribute's value, '{2}', is one of the illegal options: {3}.", elementName, attributeName, value, illegalValueList);
144 }
145
146 public static Message IllegalDefineStatement(SourceLineNumber sourceLineNumbers, string defineStatement)
147 {
148 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);
149 }
150
151 public static Message IllegalForeach(SourceLineNumber sourceLineNumbers, string foreachStatement)
152 {
153 return Message(sourceLineNumbers, Ids.IllegalForeach, "The foreach statement '{0}' is illegal. The proper format for foreach is <?foreach varName in valueList?>.", foreachStatement);
154 }
155
156 public static Message IllegalIdentifierLooksLikeFormatted(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
157 {
158 return Message(sourceLineNumbers, Ids.IllegalIdentifierLooksLikeFormatted, "The {0}/@{1} attribute's value, '{2}', is not a legal identifier. The {0}/@{1} attribute does not support formatted string values, such as property names enclosed in brackets ([LIKETHIS]). The value must be the identifier of another element, such as the Directory/@Id attribute value.", elementName, attributeName, value);
159 }
160
161 public static Message IllegalInlineLocVariable(SourceLineNumber sourceLineNumbers, string variableName, string variableValue)
162 {
163 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);
164 }
165
166 public static Message IllegalIntegerInExpression(SourceLineNumber sourceLineNumbers, string expression)
167 {
168 return Message(sourceLineNumbers, Ids.IllegalIntegerInExpression, "An illegal number was found in the expression '{0}'.", expression);
169 }
170
171 public static Message IllegalLongValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
172 {
173 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);
174 }
175
176 public static Message IllegalSuppressWarningId(string suppressedId)
177 {
178 return Message(null, Ids.IllegalSuppressWarningId, "Illegal value '{0}' for the -sw<N> command line option. Specify a particular warning number, like '-sw6' to suppress the warning with ID 6, or '-sw' alone to suppress all warnings.", suppressedId);
179 }
180
181 public static Message IllegalWarningIdAsError(string warningId)
182 {
183 return Message(null, Ids.IllegalWarningIdAsError, "Illegal value '{0}' for the -wx<N> command line option. Specify a particular warning number, like '-wx6' to display the warning with ID 6 as an error, or '-wx' alone to suppress all warnings.", warningId);
184 }
185
186 public static Message IllegalYesNoDefaultValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
187 {
188 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);
189 }
190
191 public static Message InvalidCommandLineFileName(string fileName, string error)
192 {
193 return Message(null, Ids.InvalidCommandLineFileName, "Invalid file name specified on the command line: '{0}'. Error message: '{1}'", fileName, error);
194 }
195
196 public static Message InvalidBundleCondition(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string condition)
197 {
198 return Message(sourceLineNumbers, Ids.InvalidBundleCondition, "The {0}/@{1} attribute's value '{2}' is not a valid bundle condition.", elementName, attributeName, condition);
199 }
200
201 public static Message CouldNotFindExtensionInPaths(string extensionPath, IEnumerable<string> checkedPaths)
202 {
203 return Message(null, Ids.InvalidExtension, "The extension '{0}' could not be found. Checked paths: {1}", extensionPath, String.Join(", ", checkedPaths));
204 }
205
206 public static Message InvalidExtension(string extension)
207 {
208 return Message(null, Ids.InvalidExtension, "The extension '{0}' could not be loaded.", extension);
209 }
210
211 public static Message InvalidExtension(string extension, string invalidReason)
212 {
213 return Message(null, Ids.InvalidExtension, "The extension '{0}' could not be loaded because of the following reason: {1}", extension, invalidReason);
214 }
215
216 public static Message InvalidExtension(string extension, string extensionType, string expectedType)
217 {
218 return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}'.", extension, extensionType, expectedType);
219 }
220
221 public static Message InvalidExtension(string extension, string extensionType, string expectedType1, string expectedType2)
222 {
223 return Message(null, Ids.InvalidExtension, "The extension '{0}' is the wrong type: '{1}'. The expected type was '{2}' or '{3}'.", extension, extensionType, expectedType1, expectedType2);
224 }
225
226 public static Message InvalidPreprocessorFunction(SourceLineNumber sourceLineNumbers, string variable)
227 {
228 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);
229 }
230
231 public static Message InvalidPreprocessorFunctionAutoVersion(SourceLineNumber sourceLineNumbers)
232 {
233 return Message(sourceLineNumbers, Ids.InvalidPreprocessorFunctionAutoVersion, "Invalid AutoVersion template specified.");
234 }
235
236 public static Message InvalidPreprocessorPragma(SourceLineNumber sourceLineNumbers, string variable)
237 {
238 return Message(sourceLineNumbers, Ids.InvalidPreprocessorPragma, "Malformed preprocessor pragma '{0}'. Pragmas must have a prefix, a name of at least 1 character long, and be followed by optional arguments.", variable);
239 }
240
241 public static Message InvalidPreprocessorVariable(SourceLineNumber sourceLineNumbers, string variable)
242 {
243 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);
244 }
245
246 public static Message InvalidSubExpression(SourceLineNumber sourceLineNumbers, string subExpression, string expression)
247 {
248 return Message(sourceLineNumbers, Ids.InvalidSubExpression, "Found invalid subexpression '{0}' in expression '{1}'.", subExpression, expression);
249 }
250
251 public static Message InvalidSummaryInfoCodePage(SourceLineNumber sourceLineNumbers, int codePage)
252 {
253 return Message(sourceLineNumbers, Ids.InvalidSummaryInfoCodePage, "The code page '{0}' is invalid for summary information. You must specify an ANSI code page.", codePage);
254 }
255
256 public static Message LocalizationVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId)
257 {
258 return Message(sourceLineNumbers, Ids.LocalizationVariableUnknown, "The localization variable !(loc.{0}) is unknown. Please ensure the variable is defined.", variableId);
259 }
260
261 public static Message MergeModuleExpectedFeature(SourceLineNumber sourceLineNumbers, string mergeId)
262 {
263 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);
264 }
265
266 public static Message MissingEntrySection()
267 {
268 return Message(null, Ids.MissingEntrySection, "Could not find entry section in provided list of intermediates. Supported entry section types are: Package, Bundle, Patch, Module.");
269 }
270
271 public static Message MissingEntrySection(string sectionType)
272 {
273 return Message(null, Ids.MissingEntrySection, "Could not find entry section in provided list of intermediates. Expected section of type '{0}'.", sectionType);
274 }
275
276 public static Message MultipleEntrySections(SourceLineNumber sourceLineNumbers, string sectionName1, string sectionName2)
277 {
278 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);
279 }
280
281 public static Message MultipleEntrySections2(SourceLineNumber sourceLineNumbers)
282 {
283 return Message(sourceLineNumbers, Ids.MultipleEntrySections2, "Location of entry section related to previous error.");
284 }
285
286 public static Message MultiplePrimaryReferences(SourceLineNumber sourceLineNumbers, string crefChildType, string crefChildId, string crefParentType, string crefParentId, string conflictParentType, string conflictParentId)
287 {
288 return Message(sourceLineNumbers, Ids.MultiplePrimaryReferences, "Multiple primary references were found for {0} '{1}' in {2} '{3}' and {4} '{5}'.", crefChildType, crefChildId, crefParentType, crefParentId, conflictParentType, conflictParentId);
289 }
290
291 public static Message MustSpecifyOutputWithMoreThanOneInput()
292 {
293 return Message(null, Ids.MustSpecifyOutputWithMoreThanOneInput, "You must specify an output file using the \"-o\" or \"-out\" switch when you provide more than one input file.");
294 }
295
296 public static Message NonterminatedPreprocessorInstruction(SourceLineNumber sourceLineNumbers, string beginInstruction, string endInstruction)
297 {
298 return Message(sourceLineNumbers, Ids.NonterminatedPreprocessorInstruction, "Found a <?{0}?> processing instruction without a matching <?{1}?> after it.", beginInstruction, endInstruction);
299 }
300
301 public static Message OrderingReferenceLoopDetected(SourceLineNumber sourceLineNumbers, string loopList)
302 {
303 return Message(sourceLineNumbers, Ids.OrderingReferenceLoopDetected, "A circular reference of ordering dependencies was detected. The infinite loop includes: {0}. Ordering dependency references must form a directed acyclic graph.", loopList);
304 }
305
306 public static Message OrphanedComponent(SourceLineNumber sourceLineNumbers, string componentName)
307 {
308 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);
309 }
310
311 public static Message PathCannotContainQuote(string fileName)
312 {
313 return Message(null, Ids.PathCannotContainQuote, "Path '{0}' contains a literal quote character. Quotes are often accidentally introduced when trying to refer to a directory path with spaces in it, such as \"C:\\Out Directory\\\" -- the backslash before the quote acts an escape character. The correct representation for that path is: \"C:\\Out Directory\\\\\".", fileName);
314 }
315
316 public static Message PathTooLong(SourceLineNumber sourceLineNumbers, string fileName)
317 {
318 return Message(sourceLineNumbers, Ids.PathTooLong, "'{0}' is too long, the fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.", fileName);
319 }
320
321 public static Message PreprocessorError(SourceLineNumber sourceLineNumbers, string message)
322 {
323 return Message(sourceLineNumbers, Ids.PreprocessorError, "{0}", message);
324 }
325
326 public static Message PreprocessorExtensionEvaluateFunctionFailed(SourceLineNumber sourceLineNumbers, string prefix, string function, string args, string message)
327 {
328 return Message(sourceLineNumbers, Ids.PreprocessorExtensionEvaluateFunctionFailed, "In the preprocessor extension that handles prefix '{0}' while trying to call function '{1}({2})' and exception has occurred : {3}", prefix, function, args, message);
329 }
330
331 public static Message PreprocessorExtensionGetVariableValueFailed(SourceLineNumber sourceLineNumbers, string prefix, string variable, string message)
332 {
333 return Message(sourceLineNumbers, Ids.PreprocessorExtensionGetVariableValueFailed, "In the preprocessor extension that handles prefix '{0}' while trying to get the value for variable '{1}' and exception has occured : {2}", prefix, variable, message);
334 }
335
336 public static Message PreprocessorExtensionPragmaFailed(SourceLineNumber sourceLineNumbers, string pragma, string message)
337 {
338 return Message(sourceLineNumbers, Ids.PreprocessorExtensionPragmaFailed, "Exception thrown while processing pragma '{0}'. The exception's message is: {1}", pragma, message);
339 }
340
341 public static Message ReferenceLoopDetected(SourceLineNumber sourceLineNumbers, string loopList)
342 {
343 return Message(sourceLineNumbers, Ids.ReferenceLoopDetected, "A circular reference of groups was detected. The infinite loop includes: {0}. Group references must form a directed acyclic graph.", loopList);
344 }
345
346 public static Message TooDeeplyIncluded(SourceLineNumber sourceLineNumbers, int depth)
347 {
348 return Message(sourceLineNumbers, Ids.TooDeeplyIncluded, "Include files cannot be nested more deeply than {0} times. Make sure included files don't accidentally include themselves.", depth);
349 }
350
351 public static Message UnauthorizedAccess(string filePath)
352 {
353 return Message(null, Ids.UnauthorizedAccess, "Access to the path '{0}' is denied.", filePath);
354 }
355
356 public static Message UndefinedPreprocessorFunction(SourceLineNumber sourceLineNumbers, string variableName)
357 {
358 return Message(sourceLineNumbers, Ids.UndefinedPreprocessorFunction, "Undefined preprocessor function '$({0})'.", variableName);
359 }
360
361 public static Message UndefinedPreprocessorVariable(SourceLineNumber sourceLineNumbers, string variableName)
362 {
363 return Message(sourceLineNumbers, Ids.UndefinedPreprocessorVariable, "Undefined preprocessor variable '$({0})'.", variableName);
364 }
365
366 public static Message UnexpectedEmptySubexpression(SourceLineNumber sourceLineNumbers, string expression)
367 {
368 return Message(sourceLineNumbers, Ids.UnexpectedEmptySubexpression, "The empty subexpression is unexpected in the expression '{0}'.", expression);
369 }
370
371 public static Message UnexpectedLiteral(SourceLineNumber sourceLineNumbers, string expression)
372 {
373 return Message(sourceLineNumbers, Ids.UnexpectedLiteral, "An unexpected literal was found in the expression '{0}'.", expression);
374 }
375
376 public static Message UnexpectedPreprocessorOperator(SourceLineNumber sourceLineNumbers, string op)
377 {
378 return Message(sourceLineNumbers, Ids.UnexpectedPreprocessorOperator, "The operator '{0}' is unexpected.", op);
379 }
380
381 public static Message UnhandledExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionAttributeName, string extensionNamespace)
382 {
383 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);
384 }
385
386 public static Message UnhandledExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName, string extensionNamespace)
387 {
388 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);
389 }
390
391 public static Message UnmatchedParenthesisInExpression(SourceLineNumber sourceLineNumbers, string expression)
392 {
393 return Message(sourceLineNumbers, Ids.UnmatchedParenthesisInExpression, "The parenthesis don't match in the expression '{0}'.", expression);
394 }
395
396 public static Message UnmatchedPreprocessorInstruction(SourceLineNumber sourceLineNumbers, string beginInstruction, string endInstruction)
397 {
398 return Message(sourceLineNumbers, Ids.UnmatchedPreprocessorInstruction, "Found a <?{1}?> processing instruction without a matching <?{0}?> before it.", beginInstruction, endInstruction);
399 }
400
401 public static Message UnmatchedQuotesInExpression(SourceLineNumber sourceLineNumbers, string expression)
402 {
403 return Message(sourceLineNumbers, Ids.UnmatchedQuotesInExpression, "The quotes don't match in the expression '{0}'.", expression);
404 }
405
406 public static Message UnresolvedBindReference(SourceLineNumber sourceLineNumbers, string BindRef)
407 {
408 return Message(sourceLineNumbers, Ids.UnresolvedBindReference, "Unresolved bind-time variable {0}.", BindRef);
409 }
410
411 public static Message UnresolvedReference(SourceLineNumber sourceLineNumbers, string symbolName)
412 {
413 return Message(sourceLineNumbers, Ids.UnresolvedReference, "The identifier '{0}' could not be found. Ensure you have typed the reference correctly and that all the necessary inputs are provided to the linker.", symbolName);
414 }
415
416 public static Message UnresolvedReference(SourceLineNumber sourceLineNumbers, string symbolName, WixToolset.Data.AccessModifier accessModifier)
417 {
418 return Message(sourceLineNumbers, Ids.UnresolvedReference, "The identifier '{0}' is inaccessible due to its protection level.", symbolName, accessModifier);
419 }
420
421 public static Message UnsupportedExtensionAttribute(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName)
422 {
423 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);
424 }
425
426 public static Message UnsupportedExtensionElement(SourceLineNumber sourceLineNumbers, string elementName, string extensionElementName)
427 {
428 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);
429 }
430
431 public static Message BindVariableCollision(SourceLineNumber sourceLineNumbers, string variableId)
432 {
433 return Message(sourceLineNumbers, Ids.BindVariableCollision, "The bind variable '{0}' is declared in more than one location. Please remove one of the declarations.", variableId);
434 }
435
436 public static Message BindVariableUnknown(SourceLineNumber sourceLineNumbers, string variableId)
437 {
438 return Message(sourceLineNumbers, Ids.BindVariableUnknown, "The bind variable !(wix.{0}) is unknown. Please ensure the variable is declared on the command line for wix.exe, via a WixVariable element, or inline using the syntax !(wix.{0}=some value which doesn't contain parentheses).", variableId);
439 }
440
441 public static Message NoSourceFiles()
442 {
443 return Message(null, Ids.NoSourceFiles, "No source files specified.");
444 }
445
446 public static Message IllegalInnerText(SourceLineNumber sourceLineNumbers, string elementName, string innerText)
447 {
448 return Message(sourceLineNumbers, Ids.IllegalInnerText, "The {0} element contains illegal inner text: '{1}'.", elementName, innerText);
449 }
450
451 public static Message IllegalInnerText(SourceLineNumber sourceLineNumbers, string elementName, string /*innerText*/_, string attributeName)
452 {
453 return Message(sourceLineNumbers, Ids.IllegalInnerText, "The {0} element contains inner text which is obsolete. Use the {1} attribute instead.", elementName, attributeName);
454 }
455
456 public static Message ActionScheduledRelativeToItself(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
457 {
458 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);
459 }
460
461 public static Message AdvertiseStateMustMatch(SourceLineNumber sourceLineNumbers, string advertiseState, string parentAdvertiseState)
462 {
463 return Message(sourceLineNumbers, Ids.AdvertiseStateMustMatch, "The advertise state of this element: '{0}', does not match the advertise state set on the parent element: '{1}'.", advertiseState, parentAdvertiseState);
464 }
465
466 public static Message AppIdIncompatibleAdvertiseState(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string parentValue)
467 {
468 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 Package elements must be advertised.)", elementName, attributeName, value, parentValue);
469 }
470
471 public static Message CannotAuthorSpecialProperties(SourceLineNumber sourceLineNumbers, string propertyName)
472 {
473 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);
474 }
475
476 public static Message CannotDefaultComponentId(SourceLineNumber sourceLineNumbers)
477 {
478 return Message(sourceLineNumbers, Ids.CannotDefaultComponentId, "The Component/@Id attribute was not found; it is required when there is no valid keypath to use as the default id value.");
479 }
480
481 public static Message CannotDefaultMismatchedAdvertiseStates(SourceLineNumber sourceLineNumbers)
482 {
483 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.");
484 }
485
486 public static Message CanNotHaveTwoParents(SourceLineNumber sourceLineNumbers, string directorySearch, string parentAttribute, string parentElement)
487 {
488 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);
489 }
490
491 public static Message ComponentMultipleKeyPaths(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string fileElementName, string registryElementName, string odbcDataSourceElementName)
492 {
493 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);
494 }
495
496 public static Message CustomActionMultipleSources(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5)
497 {
498 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);
499 }
500
501 public static Message CustomActionMultipleTargets(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeName1, string attributeName2, string attributeName3, string attributeName4, string attributeName5, string attributeName6, string attributeName7)
502 {
503 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);
504 }
505
506 public static Message CustomTableIllegalColumnWidth(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, int value)
507 {
508 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);
509 }
510
511 public static Message CustomTableMissingPrimaryKey(SourceLineNumber sourceLineNumbers)
512 {
513 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.");
514 }
515
516 public static Message CustomTableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
517 {
518 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);
519 }
520
521 public static Message DuplicateContextValue(SourceLineNumber sourceLineNumbers, string contextValue)
522 {
523 return Message(sourceLineNumbers, Ids.DuplicateContextValue, "The context value '{0}' was duplicated. Context values must be distinct.", contextValue);
524 }
525
526 public static Message DuplicateExtensionXmlSchemaNamespace(string extension, string extensionXmlSchemaNamespace, string collidingExtension)
527 {
528 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);
529 }
530
531 public static Message ExpectedBinaryCategory(SourceLineNumber sourceLineNumbers)
532 {
533 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'.");
534 }
535
536 public static Message ExpectedSignedCabinetName(SourceLineNumber sourceLineNumbers)
537 {
538 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.");
539 }
540
541 public static Message FeatureCannotFavorAndDisallowAdvertise(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue)
542 {
543 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);
544 }
545
546 public static Message FeatureConfigurableDirectoryNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
547 {
548 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);
549 }
550
551 public static Message FeatureNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
552 {
553 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);
554 }
555
556 public static Message IllegalAttributeInMergeModule(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
557 {
558 return Message(sourceLineNumbers, Ids.IllegalAttributeInMergeModule, "The {0}/@{1} attribute cannot be specified in a merge module.", elementName, attributeName);
559 }
560
561 public static Message IllegalAttributeWhenAdvertised(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
562 {
563 return Message(sourceLineNumbers, Ids.IllegalAttributeWhenAdvertised, "The {0}/@{1} attribute cannot be specified because the element is advertised.", elementName, attributeName);
564 }
565
566 public static Message IllegalCodepageAttribute(SourceLineNumber sourceLineNumbers, string codepage, string elementName, string attributeName)
567 {
568 return Message(sourceLineNumbers, Ids.IllegalCodepageAttribute, "The code page '{0}' is not a valid Windows code page. Please check the {1}/@{2} attribute value in your source file.", codepage, elementName, attributeName);
569 }
570
571 public static Message IllegalCompressionLevel(SourceLineNumber sourceLineNumbers, string compressionLevel)
572 {
573 return Message(sourceLineNumbers, Ids.IllegalCompressionLevel, "The compression level '{0}' is not valid. Valid values are 'none', 'low', 'medium', 'high', and 'mszip'.", compressionLevel);
574 }
575
576 public static Message IllegalModuleExclusionLanguageAttributes(SourceLineNumber sourceLineNumbers)
577 {
578 return Message(sourceLineNumbers, Ids.IllegalModuleExclusionLanguageAttributes, "Cannot set both ExcludeLanguage and ExcludeExceptLanguage attributes on a ModuleExclusion element.");
579 }
580
581 public static Message IllegalPropertyCustomActionAttributes(SourceLineNumber sourceLineNumbers)
582 {
583 return Message(sourceLineNumbers, Ids.IllegalPropertyCustomActionAttributes, "The CustomAction sets a property but its Execute attribute is not 'immediate' (the default). Property-setting custom actions cannot be deferred.\"");
584 }
585
586 public static Message IllegalSearchIdForParentDepth(SourceLineNumber sourceLineNumbers, string id, string parentId)
587 {
588 return Message(sourceLineNumbers, Ids.IllegalSearchIdForParentDepth, "When the parent DirectorySearch/@Depth attribute is greater than 1 for the DirectorySearch '{1}', the FileSearch/@Id attribute must be absent for FileSearch '{0}' unless the parent DirectorySearch/@AssignToProperty attribute value is 'yes'. Remove the FileSearch/@Id attribute for '{0}' to resolve this issue.", id, parentId);
589 }
590
591 public static Message IllegalShortFilename(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
592 {
593 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);
594 }
595
596 public static Message IllegalTargetDirDefaultDir(SourceLineNumber sourceLineNumbers, string defaultDir)
597 {
598 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);
599 }
600
601 public static Message IllegalTerminalServerCustomActionAttributes(SourceLineNumber sourceLineNumbers)
602 {
603 return Message(sourceLineNumbers, Ids.IllegalTerminalServerCustomActionAttributes, "The CustomAction/@TerminalServerAware attribute's value is 'yes' but the Execute attribute is not 'deferred,' 'rollback,' or 'commit.' Terminal-Server-aware custom actions must be deferred, rollback, or commit custom actions. For more information, see https://learn.microsoft.com/en-us/windows/win32/msi/terminalserver .\"");
604 }
605
606 public static Message ImplicitComponentKeyPath(SourceLineNumber sourceLineNumbers, string componentId)
607 {
608 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);
609 }
610
611 public static Message InsufficientVersion(SourceLineNumber sourceLineNumbers, Version currentVersion, Version requiredVersion)
612 {
613 return Message(sourceLineNumbers, Ids.InsufficientVersion, "The current version of the toolset is {0}, but version {1} is required.", currentVersion, requiredVersion);
614 }
615
616 public static Message InsufficientVersion(SourceLineNumber sourceLineNumbers, Version currentVersion, Version requiredVersion, string extension)
617 {
618 return Message(sourceLineNumbers, Ids.InsufficientVersion, "The current version of the extension '{2}' is {0}, but version {1} is required.", currentVersion, requiredVersion, extension);
619 }
620
621 public static Message InvalidCabinetTemplate(SourceLineNumber sourceLineNumbers, string cabinetTemplate)
622 {
623 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);
624 }
625
626 public static Message InvalidDateTimeFormat(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
627 {
628 return Message(sourceLineNumbers, Ids.InvalidDateTimeFormat, "The {0}/@{1} attribute's value '{2}' is not a valid date/time value. A date/time value should follow the format YYYY-MM-DDTHH:mm:ss and be a valid date and time between 1980 and 2043, inclusive.", elementName, attributeName, value);
629 }
630
631 public static Message InvalidEmbeddedUIFileName(SourceLineNumber sourceLineNumbers, string codepage)
632 {
633 return Message(sourceLineNumbers, Ids.InvalidEmbeddedUIFileName, "The EmbeddedUI/@Name attribute value, '{0}', does not contain an extension. Windows Installer will not load an embedded UI DLL without an extension. Include an extension or just omit the Name attribute so it defaults to the file name portion of the Source attribute value.", codepage);
634 }
635
636 public static Message MediaEmbeddedCabinetNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, int length)
637 {
638 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);
639 }
640
641 public static Message MissingTypeLibFile(SourceLineNumber sourceLineNumbers, string elementName, string fileElementName)
642 {
643 return Message(sourceLineNumbers, Ids.MissingTypeLibFile, "The {0} element is non-advertised and therefore requires a parent {1} element.", elementName, fileElementName);
644 }
645
646 public static Message MultipleIdentifiersFound(SourceLineNumber sourceLineNumbers, string elementName, string identifier, string mismatchIdentifier)
647 {
648 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);
649 }
650
651 public static Message NeedSequenceBeforeOrAfter(SourceLineNumber sourceLineNumbers, string elementName)
652 {
653 return Message(sourceLineNumbers, Ids.NeedSequenceBeforeOrAfter, "A {0} element must have a Before attribute, After attribute, or a Sequence attribute.", elementName);
654 }
655
656 public static Message NoFirstControlSpecified(SourceLineNumber sourceLineNumbers, string dialogName)
657 {
658 return Message(sourceLineNumbers, Ids.NoFirstControlSpecified, "The '{0}' dialog element does not have a valid tabbable control. You must either have a tabbable control that is not marked TabSkip='yes', or you must mark a control TabSkip='no'. If you have a page with no tabbable controls (a progress page, for example), you might want to set the first Text control to be TabSkip='no'.", dialogName);
659 }
660
661 public static Message ParentElementAttributeRequired(SourceLineNumber sourceLineNumbers, string parentElement, string parentAttribute, string childElement)
662 {
663 return Message(sourceLineNumbers, Ids.ParentElementAttributeRequired, "The parent {0} element is missing the {1} attribute that is required for the {2} child element.", parentElement, parentAttribute, childElement);
664 }
665
666 public static Message ProgIdNestedTooDeep(SourceLineNumber sourceLineNumbers)
667 {
668 return Message(sourceLineNumbers, Ids.ProgIdNestedTooDeep, "ProgId elements may not be nested more than 1 level deep.");
669 }
670
671 public static Message RadioButtonBitmapAndIconDisallowed(SourceLineNumber sourceLineNumbers)
672 {
673 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.");
674 }
675
676 public static Message RadioButtonTypeInconsistent(SourceLineNumber sourceLineNumbers)
677 {
678 return Message(sourceLineNumbers, Ids.RadioButtonTypeInconsistent, "All RadioButton elements in a RadioButtonGroup must be consistent with their use of the Bitmap, Icon, and Text attributes. Ensure all of the RadioButton elements in this group have the same attribute specified.");
679 }
680
681 public static Message RegistryMultipleValuesWithoutMultiString(SourceLineNumber sourceLineNumbers, string registryElementName, string valueAttributeName, string registryValueElementName, string typeAttributeName)
682 {
683 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);
684 }
685
686 public static Message RegistryNameValueIncorrect(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
687 {
688 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);
689 }
690
691 public static Message RegistryRootInvalid(SourceLineNumber sourceLineNumbers)
692 {
693 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.");
694 }
695
696 public static Message RelativePathForRegistryElement(SourceLineNumber sourceLineNumbers)
697 {
698 return Message(sourceLineNumbers, Ids.RelativePathForRegistryElement, "Cannot convert RelativePath into Registry elements.");
699 }
700
701 public static Message RootFeatureCannotFollowParent(SourceLineNumber sourceLineNumbers)
702 {
703 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.");
704 }
705
706 public static Message SearchElementRequired(SourceLineNumber sourceLineNumbers, string elementName)
707 {
708 return Message(sourceLineNumbers, Ids.SearchElementRequired, "A '{0}' element must have a search element as a child.", elementName);
709 }
710
711 public static Message SearchElementRequiredWithAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
712 {
713 return Message(sourceLineNumbers, Ids.SearchElementRequiredWithAttribute, "A {0} element must have a search element as a child when the {0}/@{1} attribute has the value '{2}'.", elementName, attributeName, attributeValue);
714 }
715
716 public static Message SearchPropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
717 {
718 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);
719 }
720
721 public static Message SecurePropertyNotUppercase(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string propertyId)
722 {
723 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);
724 }
725
726 public static Message SignedEmbeddedCabinet(SourceLineNumber sourceLineNumbers)
727 {
728 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'.");
729 }
730
731 public static Message TabbableControlNotAllowedInBillboard(SourceLineNumber sourceLineNumbers, string elementName, string controlType)
732 {
733 return Message(sourceLineNumbers, Ids.TabbableControlNotAllowedInBillboard, "A {0} element was specified with Type='{1}' and TabSkip='no'. Tabbable controls are not allowed in Billboards.", elementName, controlType);
734 }
735
736 public static Message TableNameTooLong(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value)
737 {
738 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);
739 }
740
741 public static Message TooManyChildren(SourceLineNumber sourceLineNumbers, string elementName, string childElementName)
742 {
743 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);
744 }
745
746 public static Message TooManySearchElements(SourceLineNumber sourceLineNumbers, string elementName)
747 {
748 return Message(sourceLineNumbers, Ids.TooManySearchElements, "Only one search element can appear under a '{0}' element.", elementName);
749 }
750
751 public static Message UniqueFileSearchIdRequired(SourceLineNumber sourceLineNumbers, string id, string elementName)
752 {
753 return Message(sourceLineNumbers, Ids.UniqueFileSearchIdRequired, "The DirectorySearch element '{0}' requires that the child {1} element has a unique Id when the DirectorySearch/@AssignToProperty attribute is set to 'yes'.", id, elementName);
754 }
755
756 public static Message ValueAndMaskMustBeSameLength(SourceLineNumber sourceLineNumbers)
757 {
758 return Message(sourceLineNumbers, Ids.ValueAndMaskMustBeSameLength, "The FileTypeMask/@Value and FileTypeMask/@Mask attributes must be the same length.");
759 }
760
761 public static Message ValueNotSupported(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
762 {
763 return Message(sourceLineNumbers, Ids.ValueNotSupported, "The {0}/@{1} attribute's value, '{2}, is not supported by the Windows Installer.", elementName, attributeName, attributeValue);
764 }
765
766 public static Message VersionIndependentProgIdsCannotHaveIcons(SourceLineNumber sourceLineNumbers)
767 {
768 return Message(sourceLineNumbers, Ids.VersionIndependentProgIdsCannotHaveIcons, "Version independent ProgIds cannot have Icons. Remove the Icon and/or IconIndex attributes from your ProgId element.");
769 }
770
34 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) 771 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
35 { 772 {
36 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); 773 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
@@ -38,6 +775,144 @@ namespace WixToolset.Core
38 775
39 public enum Ids 776 public enum Ids
40 { 777 {
778 InsufficientVersion = 7,
779 SecurePropertyNotUppercase = 11,
780 SearchPropertyNotUppercase = 12,
781 AppIdIncompatibleAdvertiseState = 18,
782 IllegalAttributeWhenAdvertised = 19,
783 CustomActionMultipleSources = 22,
784 CustomActionMultipleTargets = 23,
785 IllegalShortFilename = 26,
786 TableNameTooLong = 28,
787 FeatureConfigurableDirectoryNotUppercase = 29,
788 FeatureCannotFavorAndDisallowAdvertise = 30,
789 MediaEmbeddedCabinetNameTooLong = 32,
790 RegistryMultipleValuesWithoutMultiString = 34,
791 ExampleGuid = 40,
792 TooManyChildren = 41,
793 ComponentMultipleKeyPaths = 42,
794 MissingTypeLibFile = 47,
795 UnauthorizedAccess = 50,
796 IllegalModuleExclusionLanguageAttributes = 51,
797 NoFirstControlSpecified = 52,
798 ValueAndMaskMustBeSameLength = 54,
799 TooManySearchElements = 55,
800 SearchElementRequired = 57,
801 MultipleIdentifiersFound = 58,
802 AdvertiseStateMustMatch = 59,
803 DuplicateContextValue = 60,
804 RelativePathForRegistryElement = 61,
805 RegistryRootInvalid = 64,
806 IllegalYesNoDefaultValue = 65,
807 IllegalAttributeInMergeModule = 66,
808 SearchElementRequiredWithAttribute = 69,
809 CannotAuthorSpecialProperties = 70,
810 NeedSequenceBeforeOrAfter = 72,
811 ValueNotSupported = 73,
812 TabbableControlNotAllowedInBillboard = 74,
813 RadioButtonTypeInconsistent = 77,
814 RadioButtonBitmapAndIconDisallowed = 78,
815 IllegalSuppressWarningId = 79,
816 ReferenceLoopDetected = 86,
817 InvalidDateTimeFormat = 88,
818 MultipleEntrySections = 89,
819 MultipleEntrySections2 = 90,
820 MissingEntrySection = 93,
821 UnresolvedReference = 94,
822 MultiplePrimaryReferences = 95,
823 ComponentReferencedTwice = 96,
824 ImplicitComponentKeyPath = 99,
825 DuplicateLocalizationIdentifier = 100,
826 LocalizationVariableUnknown = 102,
827 ProgIdNestedTooDeep = 105,
828 CanNotHaveTwoParents = 106,
829 CustomTableNameTooLong = 109,
830 CustomTableIllegalColumnWidth = 110,
831 CustomTableMissingPrimaryKey = 111,
832 PathCannotContainQuote = 117,
833 AdditionalArgumentUnexpected = 118,
834 RegistryNameValueIncorrect = 119,
835 IllegalLongValue = 122,
836 DuplicateExtensionXmlSchemaNamespace = 125,
837 DuplicateExtensionPreprocessorType = 127,
838 FileInUse = 128,
839 ExpectedDirectory = 138,
840 ComponentExpectedFeature = 139,
841 InvalidExtension = 144,
842 InvalidSubExpression = 145,
843 UnmatchedPreprocessorInstruction = 146,
844 NonterminatedPreprocessorInstruction = 147,
845 ExpectedExpressionAfterNot = 148,
846 InvalidPreprocessorVariable = 149,
847 UndefinedPreprocessorVariable = 150,
848 IllegalDefineStatement = 151,
849 CannotReundefineVariable = 153,
850 IllegalForeach = 154,
851 ExpectedEndforeach = 156,
852 UnmatchedQuotesInExpression = 158,
853 UnmatchedParenthesisInExpression = 159,
854 ExpectedVariable = 160,
855 UnexpectedLiteral = 161,
856 IllegalIntegerInExpression = 162,
857 UnexpectedPreprocessorOperator = 163,
858 UnexpectedEmptySubexpression = 164,
859 ActionScheduledRelativeToItself = 181,
860 CannotDefaultMismatchedAdvertiseStates = 191,
861 VersionIndependentProgIdsCannotHaveIcons = 192,
862 BindVariableCollision = 195,
863 BindVariableUnknown = 197,
864 UnhandledExtensionElement = 200,
865 UnhandledExtensionAttribute = 201,
866 UnsupportedExtensionAttribute = 202,
867 UnsupportedExtensionElement = 203,
868 IllegalTargetDirDefaultDir = 206,
869 ExpectedBinaryCategory = 208,
870 RootFeatureCannotFollowParent = 209,
871 FeatureNameTooLong = 210,
872 SignedEmbeddedCabinet = 211,
873 ExpectedSignedCabinetName = 212,
874 IllegalInlineLocVariable = 213,
875 MergeModuleExpectedFeature = 215,
876 IllegalTerminalServerCustomActionAttributes = 232,
877 IllegalPropertyCustomActionAttributes = 233,
878 InvalidPreprocessorFunction = 234,
879 UndefinedPreprocessorFunction = 235,
880 PreprocessorExtensionEvaluateFunctionFailed = 236,
881 PreprocessorExtensionGetVariableValueFailed = 237,
882 PreprocessorError = 250,
883 ExpectedArgument = 251,
884 PathTooLong = 262,
885 OrphanedComponent = 267,
886 IllegalIdentifierLooksLikeFormatted = 275,
887 IllegalCodepageAttribute = 276,
888 IllegalCompressionLevel = 277,
889 ExpectedDirectoryGotFile = 280,
890 ExpectedFileGotDirectory = 281,
891 InvalidCommandLineFileName = 284,
892 IllegalWarningIdAsError = 286,
893 DuplicateVariableDefinition = 288,
894 UnresolvedBindReference = 298,
895 MustSpecifyOutputWithMoreThanOneInput = 302,
896 IllegalSearchIdForParentDepth = 303,
897 InvalidEmbeddedUIFileName = 312,
898 UniqueFileSearchIdRequired = 313,
899 CannotDefaultComponentId = 330,
900 ParentElementAttributeRequired = 331,
901 PreprocessorExtensionPragmaFailed = 333,
902 InvalidPreprocessorPragma = 334,
903 OrderingReferenceLoopDetected = 343,
904 IllegalAttributeValueWithIllegalList = 348,
905 InvalidSummaryInfoCodePage = 349,
906 InvalidCabinetTemplate = 358,
907 DisallowedMsiProperty = 365,
908 DuplicatedUiLocalization = 374,
909 InvalidPreprocessorFunctionAutoVersion = 379,
910 TooDeeplyIncluded = 385,
911 NoSourceFiles = 391,
912 WixiplSourceFileIsExclusive = 392,
913 IntermediatesMustBeCompiled = 395,
914 IllegalInnerText = 400,
915 InvalidBundleCondition = 409,
41 UnableToCopyFile = 7010, 916 UnableToCopyFile = 7010,
42 UnableToDeleteFile = 7011, 917 UnableToDeleteFile = 7011,
43 UnableToMoveFile = 7012, 918 UnableToMoveFile = 7012,
@@ -46,3 +921,4 @@ namespace WixToolset.Core
46 } // last available is 7099. 7100 is WindowsInstallerBackendWarnings. 921 } // last available is 7099. 7100 is WindowsInstallerBackendWarnings.
47 } 922 }
48} 923}
924
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs b/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs
index 6533d159..77ab4ed7 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/BundleValidator.cs
@@ -7,6 +7,7 @@ namespace WixToolset.Core.ExtensibilityServices
7 using System.Diagnostics; 7 using System.Diagnostics;
8 using System.IO; 8 using System.IO;
9 using System.Text; 9 using System.Text;
10 using WixToolset.Core;
10 using WixToolset.Data; 11 using WixToolset.Data;
11 using WixToolset.Extensibility.Data; 12 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services; 13 using WixToolset.Extensibility.Services;
@@ -188,7 +189,7 @@ namespace WixToolset.Core.ExtensibilityServices
188 else if (BuiltinBundleVariables.Contains(variableName)) 189 else if (BuiltinBundleVariables.Contains(variableName))
189 { 190 {
190 var illegalValues = CreateValueList(ValueListKind.Or, BuiltinBundleVariables); 191 var illegalValues = CreateValueList(ValueListKind.Or, BuiltinBundleVariables);
191 this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues)); 192 this.Messaging.Write(CoreErrors.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues));
192 193
193 return false; 194 return false;
194 } 195 }
@@ -218,7 +219,7 @@ namespace WixToolset.Core.ExtensibilityServices
218 if (!allowed) 219 if (!allowed)
219 { 220 {
220 var illegalValues = CreateValueList(ValueListKind.Or, BuiltinBundleVariables); 221 var illegalValues = CreateValueList(ValueListKind.Or, BuiltinBundleVariables);
221 this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues)); 222 this.Messaging.Write(CoreErrors.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues));
222 } 223 }
223 224
224 return allowed; 225 return allowed;
@@ -231,7 +232,7 @@ namespace WixToolset.Core.ExtensibilityServices
231 if (!allowed) 232 if (!allowed)
232 { 233 {
233 var illegalValues = CreateValueList(ValueListKind.Or, WellKnownBundleVariables); 234 var illegalValues = CreateValueList(ValueListKind.Or, WellKnownBundleVariables);
234 this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues)); 235 this.Messaging.Write(CoreErrors.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues));
235 } 236 }
236 237
237 return allowed; 238 return allowed;
@@ -259,7 +260,7 @@ namespace WixToolset.Core.ExtensibilityServices
259 else if (BuiltinBundleVariables.Contains(variableName)) 260 else if (BuiltinBundleVariables.Contains(variableName))
260 { 261 {
261 var illegalValues = CreateValueList(ValueListKind.Or, BuiltinBundleVariables); 262 var illegalValues = CreateValueList(ValueListKind.Or, BuiltinBundleVariables);
262 this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues)); 263 this.Messaging.Write(CoreErrors.IllegalAttributeValueWithIllegalList(sourceLineNumbers, elementName, attributeName, variableName, illegalValues));
263 264
264 return false; 265 return false;
265 } 266 }
@@ -292,7 +293,7 @@ namespace WixToolset.Core.ExtensibilityServices
292 else if (DisallowedMsiProperties.Contains(propertyName)) 293 else if (DisallowedMsiProperties.Contains(propertyName))
293 { 294 {
294 var illegalValues = CreateValueList(ValueListKind.Or, DisallowedMsiProperties); 295 var illegalValues = CreateValueList(ValueListKind.Or, DisallowedMsiProperties);
295 this.Messaging.Write(ErrorMessages.DisallowedMsiProperty(sourceLineNumbers, propertyName, illegalValues)); 296 this.Messaging.Write(CoreErrors.DisallowedMsiProperty(sourceLineNumbers, propertyName, illegalValues));
296 297
297 return false; 298 return false;
298 } 299 }
@@ -360,7 +361,7 @@ namespace WixToolset.Core.ExtensibilityServices
360 //TODO: Actually parse the condition to definitively tell which Variables are referenced. 361 //TODO: Actually parse the condition to definitively tell which Variables are referenced.
361 else if (condition.Trim() == "=") 362 else if (condition.Trim() == "=")
362 { 363 {
363 this.Messaging.Write(ErrorMessages.InvalidBundleCondition(sourceLineNumbers, elementName, attributeName, condition)); 364 this.Messaging.Write(CoreErrors.InvalidBundleCondition(sourceLineNumbers, elementName, attributeName, condition));
364 return false; 365 return false;
365 } 366 }
366 else 367 else
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs b/src/wix/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs
index cad4edc0..4a08ff63 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs
@@ -7,6 +7,7 @@ namespace WixToolset.Core.ExtensibilityServices
7 using System.IO; 7 using System.IO;
8 using System.Linq; 8 using System.Linq;
9 using System.Reflection; 9 using System.Reflection;
10 using WixToolset.Core;
10 using WixToolset.Data; 11 using WixToolset.Data;
11 using WixToolset.Extensibility; 12 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Data; 13 using WixToolset.Extensibility.Data;
@@ -41,7 +42,7 @@ namespace WixToolset.Core.ExtensibilityServices
41 if (!factories.Any()) 42 if (!factories.Any())
42 { 43 {
43 var path = Path.GetFullPath(new Uri(extensionAssembly.CodeBase).LocalPath); 44 var path = Path.GetFullPath(new Uri(extensionAssembly.CodeBase).LocalPath);
44 throw new WixException(ErrorMessages.InvalidExtension(path, "The extension does not implement IExtensionFactory. All extensions must have at least one implementation of IExtensionFactory.")); 45 throw new WixException(CoreErrors.InvalidExtension(path, "The extension does not implement IExtensionFactory. All extensions must have at least one implementation of IExtensionFactory."));
45 } 46 }
46 47
47 this.extensionFactories.AddRange(factories); 48 this.extensionFactories.AddRange(factories);
@@ -86,14 +87,14 @@ namespace WixToolset.Core.ExtensibilityServices
86 87
87 if (assembly == null) 88 if (assembly == null)
88 { 89 {
89 throw new WixException(ErrorMessages.CouldNotFindExtensionInPaths(extensionPath, checkedPaths)); 90 throw new WixException(CoreErrors.CouldNotFindExtensionInPaths(extensionPath, checkedPaths));
90 } 91 }
91 92
92 this.Add(assembly); 93 this.Add(assembly);
93 } 94 }
94 catch (ReflectionTypeLoadException rtle) 95 catch (ReflectionTypeLoadException rtle)
95 { 96 {
96 throw new WixException(ErrorMessages.InvalidExtension(checkPath, String.Join(Environment.NewLine, rtle.LoaderExceptions.Select(le => le.ToString())))); 97 throw new WixException(CoreErrors.InvalidExtension(checkPath, String.Join(Environment.NewLine, rtle.LoaderExceptions.Select(le => le.ToString()))));
97 } 98 }
98 catch (WixException) 99 catch (WixException)
99 { 100 {
@@ -101,7 +102,7 @@ namespace WixToolset.Core.ExtensibilityServices
101 } 102 }
102 catch (Exception e) 103 catch (Exception e)
103 { 104 {
104 throw new WixException(ErrorMessages.InvalidExtension(checkPath, e.Message), e); 105 throw new WixException(CoreErrors.InvalidExtension(checkPath, e.Message), e);
105 } 106 }
106 } 107 }
107 108
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/FileSystem.cs b/src/wix/WixToolset.Core/ExtensibilityServices/FileSystem.cs
index 8baee3d8..ec314a11 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/FileSystem.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/FileSystem.cs
@@ -7,6 +7,7 @@ namespace WixToolset.Core.ExtensibilityServices
7 using System.IO; 7 using System.IO;
8 using System.Runtime.InteropServices; 8 using System.Runtime.InteropServices;
9 using System.Threading; 9 using System.Threading;
10 using WixToolset.Core;
10 using WixToolset.Data; 11 using WixToolset.Data;
11 using WixToolset.Extensibility.Services; 12 using WixToolset.Extensibility.Services;
12 13
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/LayoutServices.cs b/src/wix/WixToolset.Core/ExtensibilityServices/LayoutServices.cs
index 84b43892..9f135beb 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/LayoutServices.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/LayoutServices.cs
@@ -4,6 +4,7 @@ namespace WixToolset.Core.ExtensibilityServices
4{ 4{
5 using System; 5 using System;
6 using System.IO; 6 using System.IO;
7 using WixToolset.Core;
7 using WixToolset.Data; 8 using WixToolset.Data;
8 using WixToolset.Extensibility.Data; 9 using WixToolset.Extensibility.Data;
9 using WixToolset.Extensibility.Services; 10 using WixToolset.Extensibility.Services;
@@ -65,7 +66,7 @@ namespace WixToolset.Core.ExtensibilityServices
65 } 66 }
66 catch (PathTooLongException) 67 catch (PathTooLongException)
67 { 68 {
68 this.Messaging.Write(ErrorMessages.PathTooLong(sourceLineNumbers, path)); 69 this.Messaging.Write(CoreErrors.PathTooLong(sourceLineNumbers, path));
69 } 70 }
70 71
71 return null; 72 return null;
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
index 52a7cf12..57d19450 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
@@ -6,9 +6,8 @@ namespace WixToolset.Core.ExtensibilityServices
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Diagnostics; 7 using System.Diagnostics;
8 using System.Globalization; 8 using System.Globalization;
9 using System.Linq;
10 using System.Xml;
11 using System.Xml.Linq; 9 using System.Xml.Linq;
10 using WixToolset.Core;
12 using WixToolset.Data; 11 using WixToolset.Data;
13 using WixToolset.Data.Symbols; 12 using WixToolset.Data.Symbols;
14 using WixToolset.Data.WindowsInstaller; 13 using WixToolset.Data.WindowsInstaller;
@@ -379,7 +378,7 @@ namespace WixToolset.Core.ExtensibilityServices
379 if (value.StartsWith("PUT-GUID-", StringComparison.OrdinalIgnoreCase) || 378 if (value.StartsWith("PUT-GUID-", StringComparison.OrdinalIgnoreCase) ||
380 value.StartsWith("{PUT-GUID-", StringComparison.OrdinalIgnoreCase)) 379 value.StartsWith("{PUT-GUID-", StringComparison.OrdinalIgnoreCase))
381 { 380 {
382 this.Messaging.Write(ErrorMessages.ExampleGuid(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 381 this.Messaging.Write(CoreErrors.ExampleGuid(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
383 } 382 }
384 else 383 else
385 { 384 {
@@ -522,11 +521,11 @@ namespace WixToolset.Core.ExtensibilityServices
522 } 521 }
523 catch (FormatException) 522 catch (FormatException)
524 { 523 {
525 this.Messaging.Write(ErrorMessages.IllegalLongValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 524 this.Messaging.Write(CoreErrors.IllegalLongValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
526 } 525 }
527 catch (OverflowException) 526 catch (OverflowException)
528 { 527 {
529 this.Messaging.Write(ErrorMessages.IllegalLongValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 528 this.Messaging.Write(CoreErrors.IllegalLongValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
530 } 529 }
531 } 530 }
532 531
@@ -621,7 +620,7 @@ namespace WixToolset.Core.ExtensibilityServices
621 return YesNoDefaultType.Default; 620 return YesNoDefaultType.Default;
622 621
623 default: 622 default:
624 this.Messaging.Write(ErrorMessages.IllegalYesNoDefaultValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); 623 this.Messaging.Write(CoreErrors.IllegalYesNoDefaultValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value));
625 return YesNoDefaultType.IllegalValue; 624 return YesNoDefaultType.IllegalValue;
626 } 625 }
627 } 626 }
@@ -711,7 +710,7 @@ namespace WixToolset.Core.ExtensibilityServices
711 else 710 else
712 { 711 {
713 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(element); 712 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(element);
714 this.Messaging.Write(ErrorMessages.UnhandledExtensionAttribute(sourceLineNumbers, element.Name.LocalName, attribute.Name.LocalName, attribute.Name.NamespaceName)); 713 this.Messaging.Write(CoreErrors.UnhandledExtensionAttribute(sourceLineNumbers, element.Name.LocalName, attribute.Name.LocalName, attribute.Name.NamespaceName));
715 } 714 }
716 } 715 }
717 716
@@ -724,7 +723,7 @@ namespace WixToolset.Core.ExtensibilityServices
724 else 723 else
725 { 724 {
726 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(element); 725 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(element);
727 this.Messaging.Write(ErrorMessages.UnhandledExtensionElement(childSourceLineNumbers, parentElement.Name.LocalName, element.Name.LocalName, element.Name.NamespaceName)); 726 this.Messaging.Write(CoreErrors.UnhandledExtensionElement(childSourceLineNumbers, parentElement.Name.LocalName, element.Name.LocalName, element.Name.NamespaceName));
728 } 727 }
729 } 728 }
730 729
@@ -739,7 +738,7 @@ namespace WixToolset.Core.ExtensibilityServices
739 else 738 else
740 { 739 {
741 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(element); 740 var childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(element);
742 this.Messaging.Write(ErrorMessages.UnhandledExtensionElement(childSourceLineNumbers, parentElement.Name.LocalName, element.Name.LocalName, element.Name.NamespaceName)); 741 this.Messaging.Write(CoreErrors.UnhandledExtensionElement(childSourceLineNumbers, parentElement.Name.LocalName, element.Name.LocalName, element.Name.NamespaceName));
743 } 742 }
744 743
745 return keyPath; 744 return keyPath;
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/PathResolver.cs b/src/wix/WixToolset.Core/ExtensibilityServices/PathResolver.cs
index 72be2bcb..8744cfb2 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/PathResolver.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/PathResolver.cs
@@ -5,6 +5,7 @@ namespace WixToolset.Core.ExtensibilityServices
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.IO; 7 using System.IO;
8 using WixToolset.Core;
8 using WixToolset.Data; 9 using WixToolset.Data;
9 using WixToolset.Data.WindowsInstaller; 10 using WixToolset.Data.WindowsInstaller;
10 using WixToolset.Extensibility.Data; 11 using WixToolset.Extensibility.Data;
@@ -16,7 +17,7 @@ namespace WixToolset.Core.ExtensibilityServices
16 { 17 {
17 if (!directories.TryGetValue(directory, out var resolvedDirectory)) 18 if (!directories.TryGetValue(directory, out var resolvedDirectory))
18 { 19 {
19 throw new WixException(ErrorMessages.ExpectedDirectory(directory)); 20 throw new WixException(CoreErrors.ExpectedDirectory(directory));
20 } 21 }
21 22
22 if (null == resolvedDirectory.Path) 23 if (null == resolvedDirectory.Path)
@@ -60,7 +61,7 @@ namespace WixToolset.Core.ExtensibilityServices
60 { 61 {
61 if (!directories.TryGetValue(directory, out var resolvedDirectory)) 62 if (!directories.TryGetValue(directory, out var resolvedDirectory))
62 { 63 {
63 throw new WixException(ErrorMessages.ExpectedDirectory(directory)); 64 throw new WixException(CoreErrors.ExpectedDirectory(directory));
64 } 65 }
65 66
66 if (null == resolvedDirectory.Path) 67 if (null == resolvedDirectory.Path)
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs b/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
index 50160ebb..3cdd0f43 100644
--- a/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
+++ b/src/wix/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
@@ -7,6 +7,7 @@ namespace WixToolset.Core.ExtensibilityServices
7 using System.IO; 7 using System.IO;
8 using System.Text; 8 using System.Text;
9 using System.Xml.Linq; 9 using System.Xml.Linq;
10 using WixToolset.Core;
10 using WixToolset.Data; 11 using WixToolset.Data;
11 using WixToolset.Extensibility; 12 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Data; 13 using WixToolset.Extensibility.Data;
@@ -61,7 +62,7 @@ namespace WixToolset.Core.ExtensibilityServices
61 // Check to make sure there are 2 parts and neither is an empty string. 62 // Check to make sure there are 2 parts and neither is an empty string.
62 if (2 != prefixParts.Length || 0 >= prefixParts[0].Length || 0 >= prefixParts[1].Length) 63 if (2 != prefixParts.Length || 0 >= prefixParts[0].Length || 0 >= prefixParts[1].Length)
63 { 64 {
64 throw new WixException(ErrorMessages.InvalidPreprocessorFunction(context.CurrentSourceLineNumber, function)); 65 throw new WixException(CoreErrors.InvalidPreprocessorFunction(context.CurrentSourceLineNumber, function));
65 } 66 }
66 67
67 var prefix = prefixParts[0]; 68 var prefix = prefixParts[0];
@@ -70,7 +71,7 @@ namespace WixToolset.Core.ExtensibilityServices
70 // Check to make sure there are 2 parts, neither is an empty string, and the second part ends with a closing paren. 71 // Check to make sure there are 2 parts, neither is an empty string, and the second part ends with a closing paren.
71 if (2 != functionParts.Length || 0 >= functionParts[0].Length || 0 >= functionParts[1].Length || !functionParts[1].EndsWith(")", StringComparison.Ordinal)) 72 if (2 != functionParts.Length || 0 >= functionParts[0].Length || 0 >= functionParts[1].Length || !functionParts[1].EndsWith(")", StringComparison.Ordinal))
72 { 73 {
73 throw new WixException(ErrorMessages.InvalidPreprocessorFunction(context.CurrentSourceLineNumber, function)); 74 throw new WixException(CoreErrors.InvalidPreprocessorFunction(context.CurrentSourceLineNumber, function));
74 } 75 }
75 76
76 var functionName = functionParts[0]; 77 var functionName = functionParts[0];
@@ -118,7 +119,7 @@ namespace WixToolset.Core.ExtensibilityServices
118 // Make sure the base version is specified 119 // Make sure the base version is specified
119 if (args.Length == 0 || String.IsNullOrEmpty(args[0])) 120 if (args.Length == 0 || String.IsNullOrEmpty(args[0]))
120 { 121 {
121 throw new WixException(ErrorMessages.InvalidPreprocessorFunctionAutoVersion(context.CurrentSourceLineNumber)); 122 throw new WixException(CoreErrors.InvalidPreprocessorFunctionAutoVersion(context.CurrentSourceLineNumber));
122 } 123 }
123 124
124 // Build = days since 1/1/2000; Revision = seconds since midnight / 2 125 // Build = days since 1/1/2000; Revision = seconds since midnight / 2
@@ -142,7 +143,7 @@ namespace WixToolset.Core.ExtensibilityServices
142 } 143 }
143 catch (Exception e) 144 catch (Exception e)
144 { 145 {
145 throw new WixException(ErrorMessages.PreprocessorExtensionEvaluateFunctionFailed(context.CurrentSourceLineNumber, prefix, function, String.Join(",", args), e.Message)); 146 throw new WixException(CoreErrors.PreprocessorExtensionEvaluateFunctionFailed(context.CurrentSourceLineNumber, prefix, function, String.Join(",", args), e.Message));
146 } 147 }
147 } 148 }
148 else 149 else
@@ -170,7 +171,7 @@ namespace WixToolset.Core.ExtensibilityServices
170 } 171 }
171 else 172 else
172 { 173 {
173 throw new WixException(ErrorMessages.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, variable)); 174 throw new WixException(CoreErrors.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, variable));
174 } 175 }
175 } 176 }
176 else 177 else
@@ -190,7 +191,7 @@ namespace WixToolset.Core.ExtensibilityServices
190 } 191 }
191 else 192 else
192 { 193 {
193 throw new WixException(ErrorMessages.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, variable)); 194 throw new WixException(CoreErrors.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, variable));
194 } 195 }
195 } 196 }
196 } 197 }
@@ -284,7 +285,7 @@ namespace WixToolset.Core.ExtensibilityServices
284 } 285 }
285 catch (Exception e) 286 catch (Exception e)
286 { 287 {
287 throw new WixException(ErrorMessages.PreprocessorExtensionGetVariableValueFailed(context.CurrentSourceLineNumber, prefix, name, e.Message)); 288 throw new WixException(CoreErrors.PreprocessorExtensionGetVariableValueFailed(context.CurrentSourceLineNumber, prefix, name, e.Message));
288 } 289 }
289 } 290 }
290 else 291 else
@@ -301,7 +302,7 @@ namespace WixToolset.Core.ExtensibilityServices
301 // Check to make sure there are 2 parts and neither is an empty string. 302 // Check to make sure there are 2 parts and neither is an empty string.
302 if (2 != prefixParts.Length) 303 if (2 != prefixParts.Length)
303 { 304 {
304 throw new WixException(ErrorMessages.InvalidPreprocessorPragma(context.CurrentSourceLineNumber, pragmaName)); 305 throw new WixException(CoreErrors.InvalidPreprocessorPragma(context.CurrentSourceLineNumber, pragmaName));
305 } 306 }
306 307
307 var prefix = prefixParts[0]; 308 var prefix = prefixParts[0];
@@ -309,7 +310,7 @@ namespace WixToolset.Core.ExtensibilityServices
309 310
310 if (String.IsNullOrEmpty(prefix) || String.IsNullOrEmpty(pragma)) 311 if (String.IsNullOrEmpty(prefix) || String.IsNullOrEmpty(pragma))
311 { 312 {
312 throw new WixException(ErrorMessages.InvalidPreprocessorPragma(context.CurrentSourceLineNumber, pragmaName)); 313 throw new WixException(CoreErrors.InvalidPreprocessorPragma(context.CurrentSourceLineNumber, pragmaName));
313 } 314 }
314 315
315 switch (prefix) 316 switch (prefix)
@@ -363,7 +364,7 @@ namespace WixToolset.Core.ExtensibilityServices
363 currentPosition = remainder.IndexOf(')'); 364 currentPosition = remainder.IndexOf(')');
364 if (-1 == currentPosition) 365 if (-1 == currentPosition)
365 { 366 {
366 this.Messaging.Write(ErrorMessages.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, remainder)); 367 this.Messaging.Write(CoreErrors.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, remainder));
367 break; 368 break;
368 } 369 }
369 370
@@ -417,12 +418,12 @@ namespace WixToolset.Core.ExtensibilityServices
417 { 418 {
418 if (isFunction) 419 if (isFunction)
419 { 420 {
420 this.Messaging.Write(ErrorMessages.InvalidPreprocessorFunction(context.CurrentSourceLineNumber, remainder)); 421 this.Messaging.Write(CoreErrors.InvalidPreprocessorFunction(context.CurrentSourceLineNumber, remainder));
421 break; 422 break;
422 } 423 }
423 else 424 else
424 { 425 {
425 this.Messaging.Write(ErrorMessages.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, remainder)); 426 this.Messaging.Write(CoreErrors.InvalidPreprocessorVariable(context.CurrentSourceLineNumber, remainder));
426 break; 427 break;
427 } 428 }
428 } 429 }
@@ -442,12 +443,12 @@ namespace WixToolset.Core.ExtensibilityServices
442 { 443 {
443 if (isFunction) 444 if (isFunction)
444 { 445 {
445 this.Messaging.Write(ErrorMessages.UndefinedPreprocessorFunction(context.CurrentSourceLineNumber, subString)); 446 this.Messaging.Write(CoreErrors.UndefinedPreprocessorFunction(context.CurrentSourceLineNumber, subString));
446 break; 447 break;
447 } 448 }
448 else 449 else
449 { 450 {
450 this.Messaging.Write(ErrorMessages.UndefinedPreprocessorVariable(context.CurrentSourceLineNumber, subString)); 451 this.Messaging.Write(CoreErrors.UndefinedPreprocessorVariable(context.CurrentSourceLineNumber, subString));
451 break; 452 break;
452 } 453 }
453 } 454 }
@@ -480,7 +481,7 @@ namespace WixToolset.Core.ExtensibilityServices
480 { 481 {
481 if (!context.Variables.Remove(name)) 482 if (!context.Variables.Remove(name))
482 { 483 {
483 this.Messaging.Write(ErrorMessages.CannotReundefineVariable(context.CurrentSourceLineNumber, name)); 484 this.Messaging.Write(CoreErrors.CannotReundefineVariable(context.CurrentSourceLineNumber, name));
484 } 485 }
485 } 486 }
486 487
diff --git a/src/wix/WixToolset.Core/ILibrarian.cs b/src/wix/WixToolset.Core/ILibrarian.cs
index 8f57ca67..b292de61 100644
--- a/src/wix/WixToolset.Core/ILibrarian.cs
+++ b/src/wix/WixToolset.Core/ILibrarian.cs
@@ -2,7 +2,6 @@
2 2
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using WixToolset.Data;
6 using WixToolset.Extensibility.Data; 5 using WixToolset.Extensibility.Data;
7 6
8 /// <summary> 7 /// <summary>
diff --git a/src/wix/WixToolset.Core/LibraryResult.cs b/src/wix/WixToolset.Core/LibraryResult.cs
index 80db2c3a..3911fdd2 100644
--- a/src/wix/WixToolset.Core/LibraryResult.cs
+++ b/src/wix/WixToolset.Core/LibraryResult.cs
@@ -2,13 +2,9 @@
2 2
3namespace WixToolset.Core 3namespace WixToolset.Core
4{ 4{
5 using System;
6 using System.Collections.Generic; 5 using System.Collections.Generic;
7 using System.Threading;
8 using WixToolset.Data; 6 using WixToolset.Data;
9 using WixToolset.Extensibility;
10 using WixToolset.Extensibility.Data; 7 using WixToolset.Extensibility.Data;
11 using WixToolset.Extensibility.Services;
12 8
13 internal class LibraryResult : ILibraryResult 9 internal class LibraryResult : ILibraryResult
14 { 10 {
diff --git a/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs b/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs
index 20f7e83a..10c89719 100644
--- a/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs
+++ b/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs
@@ -5,6 +5,7 @@ namespace WixToolset.Core.Link
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Linq; 7 using System.Linq;
8 using WixToolset.Core;
8 using WixToolset.Data; 9 using WixToolset.Data;
9 using WixToolset.Extensibility.Services; 10 using WixToolset.Extensibility.Services;
10 11
@@ -53,7 +54,7 @@ namespace WixToolset.Core.Link
53 } 54 }
54 else if (!newVariable.Overridable) 55 else if (!newVariable.Overridable)
55 { 56 {
56 this.Messaging.Write(ErrorMessages.DuplicateLocalizationIdentifier(newVariable.SourceLineNumbers, newVariable.Id)); 57 this.Messaging.Write(CoreErrors.DuplicateLocalizationIdentifier(newVariable.SourceLineNumbers, newVariable.Id));
57 } 58 }
58 } 59 }
59 60
diff --git a/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
index ddf446d4..a9f4e027 100644
--- a/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
+++ b/src/wix/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs
@@ -5,6 +5,7 @@ namespace WixToolset.Core.Link
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Linq; 7 using System.Linq;
8 using WixToolset.Core;
8 using WixToolset.Data; 9 using WixToolset.Data;
9 using WixToolset.Extensibility.Services; 10 using WixToolset.Extensibility.Services;
10 11
@@ -77,8 +78,8 @@ namespace WixToolset.Core.Link
77 } 78 }
78 else 79 else
79 { 80 {
80 this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Symbols.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id)); 81 this.Messaging.Write(CoreErrors.MultipleEntrySections(this.EntrySection.Symbols.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id));
81 this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Symbols.FirstOrDefault()?.SourceLineNumbers)); 82 this.Messaging.Write(CoreErrors.MultipleEntrySections2(section.Symbols.FirstOrDefault()?.SourceLineNumbers));
82 } 83 }
83 } 84 }
84 85
diff --git a/src/wix/WixToolset.Core/Link/ResolveReferencesCommand.cs b/src/wix/WixToolset.Core/Link/ResolveReferencesCommand.cs
index 7a3c502a..1ddfdf7c 100644
--- a/src/wix/WixToolset.Core/Link/ResolveReferencesCommand.cs
+++ b/src/wix/WixToolset.Core/Link/ResolveReferencesCommand.cs
@@ -5,6 +5,7 @@ namespace WixToolset.Core.Link
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Linq; 7 using System.Linq;
8 using WixToolset.Core;
8 using WixToolset.Data; 9 using WixToolset.Data;
9 using WixToolset.Data.Symbols; 10 using WixToolset.Data.Symbols;
10 using WixToolset.Extensibility.Services; 11 using WixToolset.Extensibility.Services;
@@ -90,7 +91,7 @@ namespace WixToolset.Core.Link
90 } 91 }
91 else if (accessible.Count == 0) 92 else if (accessible.Count == 0)
92 { 93 {
93 this.Messaging.Write(ErrorMessages.UnresolvedReference(reference.SourceLineNumbers, reference.SymbolicName, symbolWithSection.Access)); 94 this.Messaging.Write(CoreErrors.UnresolvedReference(reference.SourceLineNumbers, reference.SymbolicName, symbolWithSection.Access));
94 } 95 }
95 else // multiple accessible symbols referenced creates conflicting symbols. 96 else // multiple accessible symbols referenced creates conflicting symbols.
96 { 97 {
@@ -117,7 +118,7 @@ namespace WixToolset.Core.Link
117 } 118 }
118 else 119 else
119 { 120 {
120 this.Messaging.Write(ErrorMessages.UnresolvedReference(reference.SourceLineNumbers, reference.SymbolicName)); 121 this.Messaging.Write(CoreErrors.UnresolvedReference(reference.SourceLineNumbers, reference.SymbolicName));
121 } 122 }
122 } 123 }
123 } 124 }
diff --git a/src/wix/WixToolset.Core/Link/WixGroupingOrdering.cs b/src/wix/WixToolset.Core/Link/WixGroupingOrdering.cs
index 152f897b..5580ee05 100644
--- a/src/wix/WixToolset.Core/Link/WixGroupingOrdering.cs
+++ b/src/wix/WixToolset.Core/Link/WixGroupingOrdering.cs
@@ -3,16 +3,16 @@
3namespace WixToolset.Core.Link 3namespace WixToolset.Core.Link
4{ 4{
5 using System; 5 using System;
6 using System.Collections.ObjectModel;
7 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using System.Collections.ObjectModel;
8 using System.Diagnostics; 8 using System.Diagnostics;
9 using System.Globalization; 9 using System.Globalization;
10 using System.Linq; 10 using System.Linq;
11 using System.Text; 11 using System.Text;
12 using WixToolset.Core;
12 using WixToolset.Data; 13 using WixToolset.Data;
13 using WixToolset.Data.Symbols; 14 using WixToolset.Data.Symbols;
14 using WixToolset.Extensibility.Services; 15 using WixToolset.Extensibility.Services;
15 using WixToolset.Data.Burn;
16 16
17 /// <summary> 17 /// <summary>
18 /// Grouping and Ordering class of the WiX toolset. 18 /// Grouping and Ordering class of the WiX toolset.
@@ -291,7 +291,7 @@ namespace WixToolset.Core.Link
291 if (this.FindCircularGroupReference(item, item, itemsSeen, out circularReference)) 291 if (this.FindCircularGroupReference(item, item, itemsSeen, out circularReference))
292 { 292 {
293 itemsInKnownLoops.Add(itemsSeen); 293 itemsInKnownLoops.Add(itemsSeen);
294 this.Messaging.Write(ErrorMessages.ReferenceLoopDetected(item.Row.SourceLineNumbers, circularReference)); 294 this.Messaging.Write(CoreErrors.ReferenceLoopDetected(item.Row.SourceLineNumbers, circularReference));
295 } 295 }
296 } 296 }
297 } 297 }
@@ -581,7 +581,7 @@ namespace WixToolset.Core.Link
581 // have lost some distinction between authored and propagated ordering. 581 // have lost some distinction between authored and propagated ordering.
582 string circularReference = String.Format(CultureInfo.InvariantCulture, "{0}:{1} -> {2}:{3} -> {0}:{1}", 582 string circularReference = String.Format(CultureInfo.InvariantCulture, "{0}:{1} -> {2}:{3} -> {0}:{1}",
583 this.Type, this.Id, after.Type, after.Id); 583 this.Type, this.Id, after.Type, after.Id);
584 messageHandler.Write(ErrorMessages.OrderingReferenceLoopDetected(after.Row.SourceLineNumbers, circularReference)); 584 messageHandler.Write(CoreErrors.OrderingReferenceLoopDetected(after.Row.SourceLineNumbers, circularReference));
585 return; 585 return;
586 } 586 }
587 587
diff --git a/src/wix/WixToolset.Core/Linker.cs b/src/wix/WixToolset.Core/Linker.cs
index d2e09b59..b119e4be 100644
--- a/src/wix/WixToolset.Core/Linker.cs
+++ b/src/wix/WixToolset.Core/Linker.cs
@@ -69,7 +69,7 @@ namespace WixToolset.Core
69 var invalidIntermediates = this.Context.Intermediates.Where(i => !i.HasLevel(Data.IntermediateLevels.Compiled)); 69 var invalidIntermediates = this.Context.Intermediates.Where(i => !i.HasLevel(Data.IntermediateLevels.Compiled));
70 if (invalidIntermediates.Any()) 70 if (invalidIntermediates.Any())
71 { 71 {
72 this.Messaging.Write(ErrorMessages.IntermediatesMustBeCompiled(String.Join(", ", invalidIntermediates.Select(i => i.Id)))); 72 this.Messaging.Write(CoreErrors.IntermediatesMustBeCompiled(String.Join(", ", invalidIntermediates.Select(i => i.Id))));
73 } 73 }
74 74
75 Intermediate intermediate = null; 75 Intermediate intermediate = null;
@@ -123,11 +123,11 @@ namespace WixToolset.Core
123 { 123 {
124 if (this.Context.ExpectedOutputType == OutputType.IntermediatePostLink || this.Context.ExpectedOutputType == OutputType.Unknown) 124 if (this.Context.ExpectedOutputType == OutputType.IntermediatePostLink || this.Context.ExpectedOutputType == OutputType.Unknown)
125 { 125 {
126 throw new WixException(ErrorMessages.MissingEntrySection()); 126 throw new WixException(CoreErrors.MissingEntrySection());
127 } 127 }
128 else 128 else
129 { 129 {
130 throw new WixException(ErrorMessages.MissingEntrySection(this.Context.ExpectedOutputType.ToString())); 130 throw new WixException(CoreErrors.MissingEntrySection(this.Context.ExpectedOutputType.ToString()));
131 } 131 }
132 } 132 }
133 133
@@ -186,7 +186,7 @@ namespace WixToolset.Core
186 { 186 {
187 if (!referencedComponents.Contains(component.Id.Id)) 187 if (!referencedComponents.Contains(component.Id.Id))
188 { 188 {
189 this.Messaging.Write(ErrorMessages.OrphanedComponent(component.SourceLineNumbers, component.Id.Id)); 189 this.Messaging.Write(CoreErrors.OrphanedComponent(component.SourceLineNumbers, component.Id.Id));
190 } 190 }
191 } 191 }
192 192
@@ -367,7 +367,7 @@ namespace WixToolset.Core
367 } 367 }
368 else if (!symbol.Overridable || (collidingSymbol.Overridable && symbol.Overridable)) 368 else if (!symbol.Overridable || (collidingSymbol.Overridable && symbol.Overridable))
369 { 369 {
370 this.Messaging.Write(ErrorMessages.BindVariableCollision(symbol.SourceLineNumbers, id)); 370 this.Messaging.Write(CoreErrors.BindVariableCollision(symbol.SourceLineNumbers, id));
371 } 371 }
372 } 372 }
373 else 373 else
@@ -411,7 +411,7 @@ namespace WixToolset.Core
411 { 411 {
412 if (connection.IsExplicitPrimaryFeature) 412 if (connection.IsExplicitPrimaryFeature)
413 { 413 {
414 this.Messaging.Write(ErrorMessages.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id)); 414 this.Messaging.Write(CoreErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id));
415 continue; 415 continue;
416 } 416 }
417 else 417 else
@@ -442,7 +442,7 @@ namespace WixToolset.Core
442 connection = featuresToFeatures[wixComplexReferenceRow.Child]; 442 connection = featuresToFeatures[wixComplexReferenceRow.Child];
443 if (null != connection) 443 if (null != connection)
444 { 444 {
445 this.Messaging.Write(ErrorMessages.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id)); 445 this.Messaging.Write(CoreErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id));
446 continue; 446 continue;
447 } 447 }
448 448
@@ -459,7 +459,7 @@ namespace WixToolset.Core
459 { 459 {
460 if (connection.IsExplicitPrimaryFeature) 460 if (connection.IsExplicitPrimaryFeature)
461 { 461 {
462 this.Messaging.Write(ErrorMessages.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id)); 462 this.Messaging.Write(CoreErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id));
463 continue; 463 continue;
464 } 464 }
465 else 465 else
@@ -486,7 +486,7 @@ namespace WixToolset.Core
486 case ComplexReferenceChildType.Component: 486 case ComplexReferenceChildType.Component:
487 if (componentsToModules.ContainsKey(wixComplexReferenceRow.Child)) 487 if (componentsToModules.ContainsKey(wixComplexReferenceRow.Child))
488 { 488 {
489 this.Messaging.Write(ErrorMessages.ComponentReferencedTwice(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.Child)); 489 this.Messaging.Write(CoreErrors.ComponentReferencedTwice(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.Child));
490 continue; 490 continue;
491 } 491 }
492 else 492 else
@@ -531,7 +531,7 @@ namespace WixToolset.Core
531 connection = featuresToFeatures[wixComplexReferenceRow.Child]; 531 connection = featuresToFeatures[wixComplexReferenceRow.Child];
532 if (null != connection) 532 if (null != connection)
533 { 533 {
534 this.Messaging.Write(ErrorMessages.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id)); 534 this.Messaging.Write(CoreErrors.MultiplePrimaryReferences(wixComplexReferenceRow.SourceLineNumbers, wixComplexReferenceRow.ChildType.ToString(), wixComplexReferenceRow.Child, wixComplexReferenceRow.ParentType.ToString(), wixComplexReferenceRow.Parent, (null != connection.PrimaryFeature ? "Feature" : "Package"), connection.PrimaryFeature ?? resolvedSection.Id));
535 continue; 535 continue;
536 } 536 }
537 537
@@ -721,7 +721,7 @@ namespace WixToolset.Core
721 // way up to present the loop as a directed graph. 721 // way up to present the loop as a directed graph.
722 var loop = String.Join(" -> ", loopDetector); 722 var loop = String.Join(" -> ", loopDetector);
723 723
724 this.Messaging.Write(ErrorMessages.ReferenceLoopDetected(wixComplexReferenceRow?.SourceLineNumbers, loop)); 724 this.Messaging.Write(CoreErrors.ReferenceLoopDetected(wixComplexReferenceRow?.SourceLineNumbers, loop));
725 725
726 // Cleanup the parentGroupsNeedingProcessing and the loopDetector just like the 726 // Cleanup the parentGroupsNeedingProcessing and the loopDetector just like the
727 // exit of this method does at the end because we are exiting early. 727 // exit of this method does at the end because we are exiting early.
@@ -887,11 +887,11 @@ namespace WixToolset.Core
887 // display an error for the component or merge module as appropriate 887 // display an error for the component or merge module as appropriate
888 if (null != multipleFeatureComponents) 888 if (null != multipleFeatureComponents)
889 { 889 {
890 this.Messaging.Write(ErrorMessages.ComponentExpectedFeature(symbol.SourceLineNumbers, connectionId, symbol.Definition.Name, symbol.Id.Id)); 890 this.Messaging.Write(CoreErrors.ComponentExpectedFeature(symbol.SourceLineNumbers, connectionId, symbol.Definition.Name, symbol.Id.Id));
891 } 891 }
892 else 892 else
893 { 893 {
894 this.Messaging.Write(ErrorMessages.MergeModuleExpectedFeature(symbol.SourceLineNumbers, connectionId)); 894 this.Messaging.Write(CoreErrors.MergeModuleExpectedFeature(symbol.SourceLineNumbers, connectionId));
895 } 895 }
896 } 896 }
897 else 897 else
diff --git a/src/wix/WixToolset.Core/LocalizationParser.cs b/src/wix/WixToolset.Core/LocalizationParser.cs
index 29d3d932..45d98636 100644
--- a/src/wix/WixToolset.Core/LocalizationParser.cs
+++ b/src/wix/WixToolset.Core/LocalizationParser.cs
@@ -74,7 +74,7 @@ namespace WixToolset.Core
74 } 74 }
75 else if (!wixVariableRow.Overridable) 75 else if (!wixVariableRow.Overridable)
76 { 76 {
77 messaging.Write(ErrorMessages.DuplicateLocalizationIdentifier(wixVariableRow.SourceLineNumbers, wixVariableRow.Id)); 77 messaging.Write(CoreErrors.DuplicateLocalizationIdentifier(wixVariableRow.SourceLineNumbers, wixVariableRow.Id));
78 } 78 }
79 } 79 }
80 80
@@ -151,7 +151,7 @@ namespace WixToolset.Core
151 } 151 }
152 else 152 else
153 { 153 {
154 messaging.Write(ErrorMessages.UnsupportedExtensionElement(sourceLineNumbers, node.Name.ToString(), child.Name.ToString())); 154 messaging.Write(CoreErrors.UnsupportedExtensionElement(sourceLineNumbers, node.Name.ToString(), child.Name.ToString()));
155 } 155 }
156 } 156 }
157 157
@@ -196,7 +196,7 @@ namespace WixToolset.Core
196 } 196 }
197 else 197 else
198 { 198 {
199 messaging.Write(ErrorMessages.UnsupportedExtensionAttribute(sourceLineNumbers, attrib.Parent.Name.ToString(), attrib.Name.ToString())); 199 messaging.Write(CoreErrors.UnsupportedExtensionAttribute(sourceLineNumbers, attrib.Parent.Name.ToString(), attrib.Name.ToString()));
200 } 200 }
201 } 201 }
202 202
@@ -325,11 +325,11 @@ namespace WixToolset.Core
325 { 325 {
326 if (String.IsNullOrEmpty(localizedControl.Control)) 326 if (String.IsNullOrEmpty(localizedControl.Control))
327 { 327 {
328 messaging.Write(ErrorMessages.DuplicatedUiLocalization(sourceLineNumbers, localizedControl.Dialog)); 328 messaging.Write(CoreErrors.DuplicatedUiLocalization(sourceLineNumbers, localizedControl.Dialog));
329 } 329 }
330 else 330 else
331 { 331 {
332 messaging.Write(ErrorMessages.DuplicatedUiLocalization(sourceLineNumbers, localizedControl.Dialog, localizedControl.Control)); 332 messaging.Write(CoreErrors.DuplicatedUiLocalization(sourceLineNumbers, localizedControl.Dialog, localizedControl.Control));
333 } 333 }
334 } 334 }
335 else 335 else
diff --git a/src/wix/WixToolset.Core/Preprocess/IfState.cs b/src/wix/WixToolset.Core/Preprocess/IfState.cs
index f5bb3e87..b815e1b5 100644
--- a/src/wix/WixToolset.Core/Preprocess/IfState.cs
+++ b/src/wix/WixToolset.Core/Preprocess/IfState.cs
@@ -1,4 +1,4 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. 1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 2
3namespace WixToolset.Core.Preprocess 3namespace WixToolset.Core.Preprocess
4{ 4{
diff --git a/src/wix/WixToolset.Core/Preprocess/PreprocessorOperation.cs b/src/wix/WixToolset.Core/Preprocess/PreprocessorOperation.cs
index 086a0f1a..b631730b 100644
--- a/src/wix/WixToolset.Core/Preprocess/PreprocessorOperation.cs
+++ b/src/wix/WixToolset.Core/Preprocess/PreprocessorOperation.cs
@@ -1,4 +1,4 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. 1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 2
3namespace WixToolset.Core.Preprocess 3namespace WixToolset.Core.Preprocess
4{ 4{
diff --git a/src/wix/WixToolset.Core/Preprocessor.cs b/src/wix/WixToolset.Core/Preprocessor.cs
index fbf70b6a..c403d73b 100644
--- a/src/wix/WixToolset.Core/Preprocessor.cs
+++ b/src/wix/WixToolset.Core/Preprocessor.cs
@@ -344,12 +344,12 @@ namespace WixToolset.Core
344 case "elseif": 344 case "elseif":
345 if (0 == ifStack.Count) 345 if (0 == ifStack.Count)
346 { 346 {
347 throw new WixException(ErrorMessages.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "elseif")); 347 throw new WixException(CoreErrors.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "elseif"));
348 } 348 }
349 349
350 if (IfState.If != ifContext.IfState && IfState.ElseIf != ifContext.IfState) 350 if (IfState.If != ifContext.IfState && IfState.ElseIf != ifContext.IfState)
351 { 351 {
352 throw new WixException(ErrorMessages.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "elseif")); 352 throw new WixException(CoreErrors.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "elseif"));
353 } 353 }
354 354
355 ifContext.IfState = IfState.ElseIf; // we're now in an elseif 355 ifContext.IfState = IfState.ElseIf; // we're now in an elseif
@@ -367,12 +367,12 @@ namespace WixToolset.Core
367 case "else": 367 case "else":
368 if (0 == ifStack.Count) 368 if (0 == ifStack.Count)
369 { 369 {
370 throw new WixException(ErrorMessages.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "else")); 370 throw new WixException(CoreErrors.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "else"));
371 } 371 }
372 372
373 if (IfState.If != ifContext.IfState && IfState.ElseIf != ifContext.IfState) 373 if (IfState.If != ifContext.IfState && IfState.ElseIf != ifContext.IfState)
374 { 374 {
375 throw new WixException(ErrorMessages.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "else")); 375 throw new WixException(CoreErrors.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "else"));
376 } 376 }
377 377
378 ifContext.IfState = IfState.Else; // we're now in an else 378 ifContext.IfState = IfState.Else; // we're now in an else
@@ -383,7 +383,7 @@ namespace WixToolset.Core
383 case "endif": 383 case "endif":
384 if (0 == ifStack.Count) 384 if (0 == ifStack.Count)
385 { 385 {
386 throw new WixException(ErrorMessages.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "endif")); 386 throw new WixException(CoreErrors.UnmatchedPreprocessorInstruction(sourceLineNumbers, "if", "endif"));
387 } 387 }
388 388
389 ifContext = ifStack.Pop(); 389 ifContext = ifStack.Pop();
@@ -461,7 +461,7 @@ namespace WixToolset.Core
461 break; 461 break;
462 462
463 case "endforeach": // endforeach is handled in PreprocessForeach, so seeing it here is an error 463 case "endforeach": // endforeach is handled in PreprocessForeach, so seeing it here is an error
464 throw new WixException(ErrorMessages.UnmatchedPreprocessorInstruction(sourceLineNumbers, "foreach", "endforeach")); 464 throw new WixException(CoreErrors.UnmatchedPreprocessorInstruction(sourceLineNumbers, "foreach", "endforeach"));
465 465
466 case "pragma": 466 case "pragma":
467 this.PreprocessPragma(state, reader.Value, currentContainer); 467 this.PreprocessPragma(state, reader.Value, currentContainer);
@@ -535,13 +535,13 @@ namespace WixToolset.Core
535 535
536 if (0 != ifStack.Count) 536 if (0 != ifStack.Count)
537 { 537 {
538 throw new WixException(ErrorMessages.NonterminatedPreprocessorInstruction(state.Context.CurrentSourceLineNumber, "if", "endif")); 538 throw new WixException(CoreErrors.NonterminatedPreprocessorInstruction(state.Context.CurrentSourceLineNumber, "if", "endif"));
539 } 539 }
540 540
541 // TODO: can this actually happen? 541 // TODO: can this actually happen?
542 if (0 != containerStack.Count) 542 if (0 != containerStack.Count)
543 { 543 {
544 throw new WixException(ErrorMessages.NonterminatedPreprocessorInstruction(state.Context.CurrentSourceLineNumber, "nodes", "nodes")); 544 throw new WixException(CoreErrors.NonterminatedPreprocessorInstruction(state.Context.CurrentSourceLineNumber, "nodes", "nodes"));
545 } 545 }
546 } 546 }
547 547
@@ -555,7 +555,7 @@ namespace WixToolset.Core
555 // Resolve other variables in the error message. 555 // Resolve other variables in the error message.
556 errorMessage = state.Helper.PreprocessString(state.Context, errorMessage); 556 errorMessage = state.Helper.PreprocessString(state.Context, errorMessage);
557 557
558 throw new WixException(ErrorMessages.PreprocessorError(state.Context.CurrentSourceLineNumber, errorMessage)); 558 throw new WixException(CoreErrors.PreprocessorError(state.Context.CurrentSourceLineNumber, errorMessage));
559 } 559 }
560 560
561 /// <summary> 561 /// <summary>
@@ -582,7 +582,7 @@ namespace WixToolset.Core
582 582
583 if (!match.Success) 583 if (!match.Success)
584 { 584 {
585 throw new WixException(ErrorMessages.IllegalDefineStatement(state.Context.CurrentSourceLineNumber, originalDefine)); 585 throw new WixException(CoreErrors.IllegalDefineStatement(state.Context.CurrentSourceLineNumber, originalDefine));
586 } 586 }
587 587
588 var defineName = match.Groups["varName"].Value; 588 var defineName = match.Groups["varName"].Value;
@@ -688,7 +688,7 @@ namespace WixToolset.Core
688 var indexOfInToken = reader.Value.IndexOf(" in ", StringComparison.Ordinal); 688 var indexOfInToken = reader.Value.IndexOf(" in ", StringComparison.Ordinal);
689 if (0 > indexOfInToken) 689 if (0 > indexOfInToken)
690 { 690 {
691 throw new WixException(ErrorMessages.IllegalForeach(state.Context.CurrentSourceLineNumber, reader.Value)); 691 throw new WixException(CoreErrors.IllegalForeach(state.Context.CurrentSourceLineNumber, reader.Value));
692 } 692 }
693 693
694 // parse out the variable name 694 // parse out the variable name
@@ -699,7 +699,7 @@ namespace WixToolset.Core
699 { 699 {
700 if (!varValuesString.EndsWith("\"", StringComparison.Ordinal)) 700 if (!varValuesString.EndsWith("\"", StringComparison.Ordinal))
701 { 701 {
702 throw new WixException(ErrorMessages.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, varValuesString)); 702 throw new WixException(CoreErrors.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, varValuesString));
703 } 703 }
704 704
705 // cut the quotes off the string 705 // cut the quotes off the string
@@ -767,7 +767,7 @@ namespace WixToolset.Core
767 } 767 }
768 else if (reader.NodeType == XmlNodeType.None) 768 else if (reader.NodeType == XmlNodeType.None)
769 { 769 {
770 throw new WixException(ErrorMessages.ExpectedEndforeach(state.Context.CurrentSourceLineNumber)); 770 throw new WixException(CoreErrors.ExpectedEndforeach(state.Context.CurrentSourceLineNumber));
771 } 771 }
772 772
773 reader.Read(); 773 reader.Read();
@@ -811,7 +811,7 @@ namespace WixToolset.Core
811 811
812 if (!match.Success) 812 if (!match.Success)
813 { 813 {
814 throw new WixException(ErrorMessages.InvalidPreprocessorPragma(state.Context.CurrentSourceLineNumber, pragmaText)); 814 throw new WixException(CoreErrors.InvalidPreprocessorPragma(state.Context.CurrentSourceLineNumber, pragmaText));
815 } 815 }
816 816
817 // resolve other variables in the pragma argument(s) 817 // resolve other variables in the pragma argument(s)
@@ -823,7 +823,7 @@ namespace WixToolset.Core
823 } 823 }
824 catch (Exception e) 824 catch (Exception e)
825 { 825 {
826 throw new WixException(ErrorMessages.PreprocessorExtensionPragmaFailed(state.Context.CurrentSourceLineNumber, pragmaText, e.Message)); 826 throw new WixException(CoreErrors.PreprocessorExtensionPragmaFailed(state.Context.CurrentSourceLineNumber, pragmaText, e.Message));
827 } 827 }
828 } 828 }
829 829
@@ -851,7 +851,7 @@ namespace WixToolset.Core
851 var endingQuotes = expression.IndexOf('\"', 1); 851 var endingQuotes = expression.IndexOf('\"', 1);
852 if (-1 == endingQuotes) 852 if (-1 == endingQuotes)
853 { 853 {
854 throw new WixException(ErrorMessages.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 854 throw new WixException(CoreErrors.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
855 } 855 }
856 856
857 // cut the quotes off the string 857 // cut the quotes off the string
@@ -885,7 +885,7 @@ namespace WixToolset.Core
885 885
886 if (-1 == endingParen) 886 if (-1 == endingParen)
887 { 887 {
888 throw new WixException(ErrorMessages.UnmatchedParenthesisInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 888 throw new WixException(CoreErrors.UnmatchedParenthesisInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
889 } 889 }
890 token = expression.Substring(0, endingParen + 1); 890 token = expression.Substring(0, endingParen + 1);
891 891
@@ -1009,12 +1009,12 @@ namespace WixToolset.Core
1009 else if (variable.IndexOf("(", StringComparison.Ordinal) != -1 || variable.IndexOf(")", StringComparison.Ordinal) != -1) 1009 else if (variable.IndexOf("(", StringComparison.Ordinal) != -1 || variable.IndexOf(")", StringComparison.Ordinal) != -1)
1010 { 1010 {
1011 // make sure it doesn't contain parenthesis 1011 // make sure it doesn't contain parenthesis
1012 throw new WixException(ErrorMessages.UnmatchedParenthesisInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 1012 throw new WixException(CoreErrors.UnmatchedParenthesisInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
1013 } 1013 }
1014 else if (variable.IndexOf("\"", StringComparison.Ordinal) != -1) 1014 else if (variable.IndexOf("\"", StringComparison.Ordinal) != -1)
1015 { 1015 {
1016 // shouldn't contain quotes 1016 // shouldn't contain quotes
1017 throw new WixException(ErrorMessages.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 1017 throw new WixException(CoreErrors.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
1018 } 1018 }
1019 1019
1020 return varValue; 1020 return varValue;
@@ -1045,7 +1045,7 @@ namespace WixToolset.Core
1045 { 1045 {
1046 if (stringLiteral) 1046 if (stringLiteral)
1047 { 1047 {
1048 throw new WixException(ErrorMessages.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 1048 throw new WixException(CoreErrors.UnmatchedQuotesInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
1049 } 1049 }
1050 1050
1051 rightValue = this.GetNextToken(state, originalExpression, ref expression, out stringLiteral); 1051 rightValue = this.GetNextToken(state, originalExpression, ref expression, out stringLiteral);
@@ -1093,7 +1093,7 @@ namespace WixToolset.Core
1093 { 1093 {
1094 if (operation.Length > 0) 1094 if (operation.Length > 0)
1095 { 1095 {
1096 throw new WixException(ErrorMessages.ExpectedVariable(state.Context.CurrentSourceLineNumber, originalExpression)); 1096 throw new WixException(CoreErrors.ExpectedVariable(state.Context.CurrentSourceLineNumber, originalExpression));
1097 } 1097 }
1098 1098
1099 // false expression 1099 // false expression
@@ -1108,7 +1108,7 @@ namespace WixToolset.Core
1108 } 1108 }
1109 else 1109 else
1110 { 1110 {
1111 throw new WixException(ErrorMessages.UnexpectedLiteral(state.Context.CurrentSourceLineNumber, originalExpression)); 1111 throw new WixException(CoreErrors.UnexpectedLiteral(state.Context.CurrentSourceLineNumber, originalExpression));
1112 } 1112 }
1113 } 1113 }
1114 else 1114 else
@@ -1148,11 +1148,11 @@ namespace WixToolset.Core
1148 } 1148 }
1149 catch (FormatException) 1149 catch (FormatException)
1150 { 1150 {
1151 throw new WixException(ErrorMessages.IllegalIntegerInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 1151 throw new WixException(CoreErrors.IllegalIntegerInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
1152 } 1152 }
1153 catch (OverflowException) 1153 catch (OverflowException)
1154 { 1154 {
1155 throw new WixException(ErrorMessages.IllegalIntegerInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 1155 throw new WixException(CoreErrors.IllegalIntegerInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
1156 } 1156 }
1157 1157
1158 // Compare the numbers 1158 // Compare the numbers
@@ -1195,7 +1195,7 @@ namespace WixToolset.Core
1195 closeParenIndex = expression.IndexOf(')', closeParenIndex); 1195 closeParenIndex = expression.IndexOf(')', closeParenIndex);
1196 if (closeParenIndex == -1) 1196 if (closeParenIndex == -1)
1197 { 1197 {
1198 throw new WixException(ErrorMessages.UnmatchedParenthesisInExpression(state.Context.CurrentSourceLineNumber, originalExpression)); 1198 throw new WixException(CoreErrors.UnmatchedParenthesisInExpression(state.Context.CurrentSourceLineNumber, originalExpression));
1199 } 1199 }
1200 1200
1201 if (InsideQuotes(expression, closeParenIndex)) 1201 if (InsideQuotes(expression, closeParenIndex))
@@ -1245,7 +1245,7 @@ namespace WixToolset.Core
1245 currentValue = !currentValue; 1245 currentValue = !currentValue;
1246 break; 1246 break;
1247 default: 1247 default:
1248 throw new WixException(ErrorMessages.UnexpectedPreprocessorOperator(state.Context.CurrentSourceLineNumber, operation.ToString())); 1248 throw new WixException(CoreErrors.UnexpectedPreprocessorOperator(state.Context.CurrentSourceLineNumber, operation.ToString()));
1249 } 1249 }
1250 } 1250 }
1251 1251
@@ -1296,7 +1296,7 @@ namespace WixToolset.Core
1296 expression = expression.Trim(); 1296 expression = expression.Trim();
1297 if (expression.Length == 0) 1297 if (expression.Length == 0)
1298 { 1298 {
1299 throw new WixException(ErrorMessages.UnexpectedEmptySubexpression(state.Context.CurrentSourceLineNumber, originalExpression)); 1299 throw new WixException(CoreErrors.UnexpectedEmptySubexpression(state.Context.CurrentSourceLineNumber, originalExpression));
1300 } 1300 }
1301 1301
1302 // If the expression starts with parenthesis, evaluate it 1302 // If the expression starts with parenthesis, evaluate it
@@ -1316,7 +1316,7 @@ namespace WixToolset.Core
1316 expression = expression.Substring(3).Trim(); 1316 expression = expression.Substring(3).Trim();
1317 if (expression.Length == 0) 1317 if (expression.Length == 0)
1318 { 1318 {
1319 throw new WixException(ErrorMessages.ExpectedExpressionAfterNot(state.Context.CurrentSourceLineNumber, originalExpression)); 1319 throw new WixException(CoreErrors.ExpectedExpressionAfterNot(state.Context.CurrentSourceLineNumber, originalExpression));
1320 } 1320 }
1321 1321
1322 expressionValue = this.EvaluateExpressionRecurse(state, originalExpression, ref expression, PreprocessorOperation.Not, true); 1322 expressionValue = this.EvaluateExpressionRecurse(state, originalExpression, ref expression, PreprocessorOperation.Not, true);
@@ -1345,7 +1345,7 @@ namespace WixToolset.Core
1345 } 1345 }
1346 else 1346 else
1347 { 1347 {
1348 throw new WixException(ErrorMessages.InvalidSubExpression(state.Context.CurrentSourceLineNumber, expression, originalExpression)); 1348 throw new WixException(CoreErrors.InvalidSubExpression(state.Context.CurrentSourceLineNumber, expression, originalExpression));
1349 } 1349 }
1350 } 1350 }
1351 1351
@@ -1380,7 +1380,7 @@ namespace WixToolset.Core
1380 { 1380 {
1381 if (1023 < state.CurrentFileStack.Count) 1381 if (1023 < state.CurrentFileStack.Count)
1382 { 1382 {
1383 throw new WixException(ErrorMessages.TooDeeplyIncluded(state.Context.CurrentSourceLineNumber, state.CurrentFileStack.Count)); 1383 throw new WixException(CoreErrors.TooDeeplyIncluded(state.Context.CurrentSourceLineNumber, state.CurrentFileStack.Count));
1384 } 1384 }
1385 1385
1386 var path = Path.GetFullPath(fileName); 1386 var path = Path.GetFullPath(fileName);
@@ -1480,7 +1480,7 @@ namespace WixToolset.Core
1480 } 1480 }
1481 else 1481 else
1482 { 1482 {
1483 this.Messaging.Write(ErrorMessages.DuplicateExtensionPreprocessorType(extension.GetType().ToString(), prefix, collidingExtension.GetType().ToString())); 1483 this.Messaging.Write(CoreErrors.DuplicateExtensionPreprocessorType(extension.GetType().ToString(), prefix, collidingExtension.GetType().ToString()));
1484 } 1484 }
1485 } 1485 }
1486 } 1486 }
diff --git a/src/wix/WixToolset.Core/VariableResolution.cs b/src/wix/WixToolset.Core/VariableResolution.cs
index 3b34e294..bea315e4 100644
--- a/src/wix/WixToolset.Core/VariableResolution.cs
+++ b/src/wix/WixToolset.Core/VariableResolution.cs
@@ -26,4 +26,4 @@ namespace WixToolset.Core
26 /// </summary> 26 /// </summary>
27 public string Value { get; set; } 27 public string Value { get; set; }
28 } 28 }
29} \ No newline at end of file 29}
diff --git a/src/wix/WixToolset.Core/VariableResolver.cs b/src/wix/WixToolset.Core/VariableResolver.cs
index 987a2290..3498f4a0 100644
--- a/src/wix/WixToolset.Core/VariableResolver.cs
+++ b/src/wix/WixToolset.Core/VariableResolver.cs
@@ -40,7 +40,7 @@ namespace WixToolset.Core
40 { 40 {
41 if (!TryAddWixVariable(this.locVariables, variable)) 41 if (!TryAddWixVariable(this.locVariables, variable))
42 { 42 {
43 this.Messaging.Write(ErrorMessages.DuplicateLocalizationIdentifier(variable.SourceLineNumbers, variable.Id)); 43 this.Messaging.Write(CoreErrors.DuplicateLocalizationIdentifier(variable.SourceLineNumbers, variable.Id));
44 } 44 }
45 } 45 }
46 46
@@ -59,7 +59,7 @@ namespace WixToolset.Core
59 59
60 if (!TryAddWixVariable(this.wixVariables, bindVariable)) 60 if (!TryAddWixVariable(this.wixVariables, bindVariable))
61 { 61 {
62 this.Messaging.Write(ErrorMessages.BindVariableCollision(sourceLineNumber, name)); 62 this.Messaging.Write(CoreErrors.BindVariableCollision(sourceLineNumber, name));
63 } 63 }
64 } 64 }
65 65
@@ -107,7 +107,7 @@ namespace WixToolset.Core
107 // localization variables do not support inline default values 107 // localization variables do not support inline default values
108 if (variableDefaultValue != null) 108 if (variableDefaultValue != null)
109 { 109 {
110 this.Messaging.Write(ErrorMessages.IllegalInlineLocVariable(sourceLineNumbers, variableId, variableDefaultValue)); 110 this.Messaging.Write(CoreErrors.IllegalInlineLocVariable(sourceLineNumbers, variableId, variableDefaultValue));
111 continue; 111 continue;
112 } 112 }
113 113
@@ -159,11 +159,11 @@ namespace WixToolset.Core
159 { 159 {
160 if ("loc" == variableNamespace && errorOnUnknown) // unresolved loc variable 160 if ("loc" == variableNamespace && errorOnUnknown) // unresolved loc variable
161 { 161 {
162 this.Messaging.Write(ErrorMessages.LocalizationVariableUnknown(sourceLineNumbers, variableId)); 162 this.Messaging.Write(CoreErrors.LocalizationVariableUnknown(sourceLineNumbers, variableId));
163 } 163 }
164 else if ("wix" == variableNamespace && errorOnUnknown) // unresolved wix variable 164 else if ("wix" == variableNamespace && errorOnUnknown) // unresolved wix variable
165 { 165 {
166 this.Messaging.Write(ErrorMessages.BindVariableUnknown(sourceLineNumbers, variableId)); 166 this.Messaging.Write(CoreErrors.BindVariableUnknown(sourceLineNumbers, variableId));
167 } 167 }
168 168
169 start = parsed.Index + parsed.Length; 169 start = parsed.Index + parsed.Length;
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
index e25a69b2..a314aa87 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs
@@ -41,7 +41,7 @@ namespace WixToolsetTest.CoreIntegration
41 var linker = serviceProvider.GetService<ILinker>(); 41 var linker = serviceProvider.GetService<ILinker>();
42 linker.Link(context); 42 linker.Link(context);
43 43
44 Assert.Equal((int)ErrorMessages.Ids.IntermediatesMustBeCompiled, messaging.LastErrorNumber); 44 Assert.Equal(395, messaging.LastErrorNumber); // CoreErrors.ValidationFailedToOpenDatabase
45 Assert.Single(listener.Messages); 45 Assert.Single(listener.Messages);
46 Assert.EndsWith("TestIntermediate1, TestIntermediate2", listener.Messages[0].ToString()); 46 Assert.EndsWith("TestIntermediate1, TestIntermediate2", listener.Messages[0].ToString());
47 } 47 }
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/WixiplFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/WixiplFixture.cs
index ab2729bb..5963ff13 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/WixiplFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/WixiplFixture.cs
@@ -99,7 +99,7 @@ namespace WixToolsetTest.CoreIntegration
99 "-intermediateFolder", intermediateFolder, 99 "-intermediateFolder", intermediateFolder,
100 "-o", Path.Combine(baseFolder, @"bin\test.msi") 100 "-o", Path.Combine(baseFolder, @"bin\test.msi")
101 }); 101 });
102 Assert.Equal((int)ErrorMessages.Ids.WixiplSourceFileIsExclusive, result.ExitCode); 102 Assert.Equal(392, result.ExitCode); // CoreErrors.WixiplSourceFileIsExclusive
103 } 103 }
104 } 104 }
105 105