Warn when using `embedded` as the pdbType and fallback to `full`
Fixes 7152
Rob Mensching committed
Jan 19, 2023 at 16:55 UTC
5a0cb97b9fe28dc4d41176541892388a1c46c354
2 files changed
+15
-1
src/api/wix/WixToolset.Data/WarningMessages.cs
+5
@@ -643,6 +643,11 @@ namespace WixToolset.Data
643
return Message(null, Ids.UnsupportedCommandLineArgument, "'{0}' is not a valid command line argument.", arg);
644
}
645
646
+ public static Message UnsupportedCommandLineArgumentValue(string arg, string value, string fallback)
647
+ {
648
+ return Message(null, Ids.UnsupportedCommandLineArgument, "The value '{0}' is not a valid value for command line argument '{1}'. Using the value '{2}' instead.", value, arg, fallback);
649
+ }
650
+
651
public static Message UpdateOfNonKeyPathFile(string nonKeyPathFileId, string componentId, string keyPathFileId)
652
{
653
return Message(null, Ids.UpdateOfNonKeyPathFile, "File '{0}' in Component '{1}' was changed, but the KeyPath file '{2}' was not. This file will not be patched on the target system if the REINSTALLMODE does not contain 'A'. The KeyPath file should also be changed and included in your patch.", nonKeyPathFileId, componentId, keyPathFileId);
src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
+10
-1
@@ -682,7 +682,16 @@ namespace WixToolset.Core.CommandLine
682
}
683
else if (!String.IsNullOrEmpty(value))
684
{
685
- parser.ReportErrorArgument(arg, ErrorMessages.IllegalCommandLineArgumentValue(arg, value, Enum.GetNames(typeof(PdbType)).Select(s => s.ToLowerInvariant())));
685
+ if (value.Equals("embedded", StringComparison.OrdinalIgnoreCase))
686
+ {
687
+ this.Messaging.Write(WarningMessages.UnsupportedCommandLineArgumentValue(arg, value, "full"));
688
+
689
+ this.PdbType = PdbType.Full;
690
+ }
691
+ else
692
+ {
693
+ parser.ReportErrorArgument(arg, ErrorMessages.IllegalCommandLineArgumentValue(arg, value, Enum.GetNames(typeof(PdbType)).Select(s => s.ToLowerInvariant())));
694
+ }
695
}
696
697
return true;