aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2023-01-19 16:55:20 -0800
committerRob Mensching <rob@firegiant.com>2023-01-19 17:43:54 -0800
commit5a0cb97b9fe28dc4d41176541892388a1c46c354 (patch)
treeace4f21691d9710c303dd4a91d5b54f89cb6fbde
parentf0e19e4355c29aa90e2b761031d61904ba1d8ffd (diff)
downloadwix-5a0cb97b9fe28dc4d41176541892388a1c46c354.tar.gz
wix-5a0cb97b9fe28dc4d41176541892388a1c46c354.tar.bz2
wix-5a0cb97b9fe28dc4d41176541892388a1c46c354.zip
Warn when using `embedded` as the pdbType and fallback to `full`
Fixes 7152
-rw-r--r--src/api/wix/WixToolset.Data/WarningMessages.cs5
-rw-r--r--src/wix/WixToolset.Core/CommandLine/BuildCommand.cs11
2 files changed, 15 insertions, 1 deletions
diff --git a/src/api/wix/WixToolset.Data/WarningMessages.cs b/src/api/wix/WixToolset.Data/WarningMessages.cs
index 5455c3ad..65716ba7 100644
--- a/src/api/wix/WixToolset.Data/WarningMessages.cs
+++ b/src/api/wix/WixToolset.Data/WarningMessages.cs
@@ -643,6 +643,11 @@ namespace WixToolset.Data
643 return Message(null, Ids.UnsupportedCommandLineArgument, "'{0}' is not a valid command line argument.", arg); 643 return Message(null, Ids.UnsupportedCommandLineArgument, "'{0}' is not a valid command line argument.", arg);
644 } 644 }
645 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
646 public static Message UpdateOfNonKeyPathFile(string nonKeyPathFileId, string componentId, string keyPathFileId) 651 public static Message UpdateOfNonKeyPathFile(string nonKeyPathFileId, string componentId, string keyPathFileId)
647 { 652 {
648 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); 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);
diff --git a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
index 30b0c40a..965280d0 100644
--- a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
+++ b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs
@@ -682,7 +682,16 @@ namespace WixToolset.Core.CommandLine
682 } 682 }
683 else if (!String.IsNullOrEmpty(value)) 683 else if (!String.IsNullOrEmpty(value))
684 { 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 }
686 } 695 }
687 696
688 return true; 697 return true;