diff options
author | Rob Mensching <rob@firegiant.com> | 2023-12-16 09:03:44 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2023-12-16 14:32:21 -0800 |
commit | 0bf10d9873577f8c943cae1f50dedf68565847ee (patch) | |
tree | f62be6f9a0909bde26eda675ad48e08c48d1e8e2 /src/api | |
parent | eff9d4204880535f821827e5aece5068402358f6 (diff) | |
download | wix-0bf10d9873577f8c943cae1f50dedf68565847ee.tar.gz wix-0bf10d9873577f8c943cae1f50dedf68565847ee.tar.bz2 wix-0bf10d9873577f8c943cae1f50dedf68565847ee.zip |
Improve error reporting of duplicate symbols
Virtual symbols provide more interesting ways to have (and avoid) conflicts.
Adding additional messages and cleaning up the existing messages should help
users know what options they have to address conflicts.
This also puts all the conflict resolution in ReportConflictingSymbolsCommand
instead of spreading it across reference resolution as well.
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/wix/WixToolset.Data/ErrorMessages.cs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/api/wix/WixToolset.Data/ErrorMessages.cs b/src/api/wix/WixToolset.Data/ErrorMessages.cs index 889d1762..e149d54a 100644 --- a/src/api/wix/WixToolset.Data/ErrorMessages.cs +++ b/src/api/wix/WixToolset.Data/ErrorMessages.cs | |||
@@ -323,21 +323,6 @@ namespace WixToolset.Data | |||
323 | return Message(null, Ids.DuplicateSourcesForOutput, "Multiple source files ({0}) have resulted in the same output file '{1}'. This is likely because the source files only differ in extension or path. Rename the source files to avoid this problem.", sourceList, outputFile); | 323 | return Message(null, Ids.DuplicateSourcesForOutput, "Multiple source files ({0}) have resulted in the same output file '{1}'. This is likely because the source files only differ in extension or path. Rename the source files to avoid this problem.", sourceList, outputFile); |
324 | } | 324 | } |
325 | 325 | ||
326 | public static Message DuplicateSymbol(SourceLineNumber sourceLineNumbers, string symbolName) | ||
327 | { | ||
328 | return Message(sourceLineNumbers, Ids.DuplicateSymbol, "Duplicate symbol '{0}' found. This typically means that an Id is duplicated. Access modifiers (global, library, file, section) cannot prevent these conflicts. Ensure all your identifiers of a given type (Directory, File, etc.) are unique.", symbolName); | ||
329 | } | ||
330 | |||
331 | public static Message DuplicateSymbol(SourceLineNumber sourceLineNumbers, string symbolName, string referencingSourceLineNumber) | ||
332 | { | ||
333 | return Message(sourceLineNumbers, Ids.DuplicateSymbol, "Duplicate symbol '{0}' referenced by {1}. This typically means that an Id is duplicated. Ensure all your identifiers of a given type (Directory, File, etc.) are unique or use an access modifier to scope the identfier.", symbolName, referencingSourceLineNumber); | ||
334 | } | ||
335 | |||
336 | public static Message DuplicateSymbol2(SourceLineNumber sourceLineNumbers) | ||
337 | { | ||
338 | return Message(sourceLineNumbers, Ids.DuplicateSymbol2, "Location of symbol related to previous error."); | ||
339 | } | ||
340 | |||
341 | public static Message DuplicateTransform(string transform) | 326 | public static Message DuplicateTransform(string transform) |
342 | { | 327 | { |
343 | 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); | 328 | 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); |
@@ -2369,8 +2354,6 @@ namespace WixToolset.Data | |||
2369 | InvalidDateTimeFormat = 88, | 2354 | InvalidDateTimeFormat = 88, |
2370 | MultipleEntrySections = 89, | 2355 | MultipleEntrySections = 89, |
2371 | MultipleEntrySections2 = 90, | 2356 | MultipleEntrySections2 = 90, |
2372 | DuplicateSymbol = 91, | ||
2373 | DuplicateSymbol2 = 92, | ||
2374 | MissingEntrySection = 93, | 2357 | MissingEntrySection = 93, |
2375 | UnresolvedReference = 94, | 2358 | UnresolvedReference = 94, |
2376 | MultiplePrimaryReferences = 95, | 2359 | MultiplePrimaryReferences = 95, |