Improve duplicate GUID messages
Rob Mensching committed
Apr 10, 2021 at 15:06 UTC
98c54e6a6dbf6dd8944eef12fa43a5cf79a2895d
2 files changed
+5
-5
src/WixToolset.Data/ErrorMessages.cs
+3
-3
@@ -278,9 +278,9 @@ namespace WixToolset.Data
278
return Message(null, Ids.DuplicateCommandLineOptionInExtension, "The command line option '{0}' has already been loaded by another Heat extension.", arg);
279
}
280
281
- public static Message DuplicateComponentGuids(SourceLineNumber sourceLineNumbers, string componentId, string guid)
281
+ public static Message DuplicateComponentGuids(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
282
{
283
- return Message(sourceLineNumbers, Ids.DuplicateComponentGuids, "Component/@Id='{0}' 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);
283
+ 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);
284
}
285
286
public static Message DuplicateContextValue(SourceLineNumber sourceLineNumbers, string contextValue)
@@ -686,7 +686,7 @@ namespace WixToolset.Data
686
687
public static Message FinishCabFailed()
688
{
689
- 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. 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.");
689
+ 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.");
690
}
691
692
public static Message FullTempDirectory(string prefix, string directory)
src/WixToolset.Data/WarningMessages.cs
+2
-2
@@ -242,9 +242,9 @@ namespace WixToolset.Data
242
return Message(sourceLineNumbers, Ids.DownloadUrlNotSupportedForEmbeddedPayloads, "The Payload '{0}' is embedded but included a @DownloadUrl attribute. Embedded Payloads cannot be downloaded so the download URL is being ignored.", payloadId);
243
}
244
245
- public static Message DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(SourceLineNumber sourceLineNumbers, string componentId, string guid)
245
+ public static Message DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions(SourceLineNumber sourceLineNumbers, string componentId, string guid, string type, string keyPath)
246
{
247
- return Message(sourceLineNumbers, Ids.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions, "Component/@Id='{0}' has a @Guid value '{1}' that duplicates another component in this package. This is not officially supported by Windows Installer but works as long as all components have mutually-exclusive conditions. It is recommended to give each component its own unique GUID.", componentId, guid);
247
+ return Message(sourceLineNumbers, Ids.DuplicateComponentGuidsMustHaveMutuallyExclusiveConditions, "Component/@Id='{0}' with {2} '{3}' has a @Guid value '{1}' that duplicates another component in this package. This is not officially supported by Windows Installer and cannot be used when creating patches. It otherwise works as long as all components with the same GUID have mutually-exclusive conditions. It is recommended to give each component its own unique GUID.", componentId, guid, type, keyPath);
248
}
249
250
public static Message DuplicatePrimaryKey(SourceLineNumber sourceLineNumbers, string primaryKey, string tableName)