From 2dee04f425e7f2fa0e528705e7d8594a512a38dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Sep 2025 13:56:08 +0000 Subject: [PATCH 1/7] Implement nologo as boolean parameterized switch Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com> --- .../CommandLineSwitches_Tests.cs | 57 +++++++++++++++---- src/MSBuild/CommandLineSwitches.cs | 6 +- src/MSBuild/Resources/Strings.resx | 9 +++ src/MSBuild/Resources/xlf/Strings.cs.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.de.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.es.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.fr.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.it.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.ja.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.ko.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.pl.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.pt-BR.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.ru.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.tr.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf | 10 ++++ src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf | 10 ++++ src/MSBuild/XMake.cs | 13 ++++- 17 files changed, 199 insertions(+), 16 deletions(-) diff --git a/src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs b/src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs index a2de7a8fb1c..30fc70cfee8 100644 --- a/src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs +++ b/src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs @@ -89,8 +89,8 @@ public void VersionSwitchIdentificationTests(string version) [InlineData("NoLogo")] public void NoLogoSwitchIdentificationTests(string nologo) { - CommandLineSwitches.IsParameterlessSwitch(nologo, out CommandLineSwitches.ParameterlessSwitch parameterlessSwitch, out string duplicateSwitchErrorMessage).ShouldBeTrue(); - parameterlessSwitch.ShouldBe(CommandLineSwitches.ParameterlessSwitch.NoLogo); + CommandLineSwitches.IsParameterizedSwitch(nologo, out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, out string duplicateSwitchErrorMessage, out bool multipleParametersAllowed, out string missingParametersErrorMessage, out bool unquoteParameters, out bool emptyParametersAllowed).ShouldBeTrue(); + parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.NoLogo); duplicateSwitchErrorMessage.ShouldBeNull(); } @@ -768,18 +768,18 @@ public void SetParameterlessSwitchTests() { CommandLineSwitches switches = new CommandLineSwitches(); - switches.SetParameterlessSwitch(CommandLineSwitches.ParameterlessSwitch.NoLogo, "/nologo"); + switches.SetParameterlessSwitch(CommandLineSwitches.ParameterlessSwitch.Help, "/help"); - Assert.Equal("/nologo", switches.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.NoLogo)); - Assert.True(switches.IsParameterlessSwitchSet(CommandLineSwitches.ParameterlessSwitch.NoLogo)); - Assert.True(switches[CommandLineSwitches.ParameterlessSwitch.NoLogo]); + Assert.Equal("/help", switches.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.Help)); + Assert.True(switches.IsParameterlessSwitchSet(CommandLineSwitches.ParameterlessSwitch.Help)); + Assert.True(switches[CommandLineSwitches.ParameterlessSwitch.Help]); // set it again - switches.SetParameterlessSwitch(CommandLineSwitches.ParameterlessSwitch.NoLogo, "-NOLOGO"); + switches.SetParameterlessSwitch(CommandLineSwitches.ParameterlessSwitch.Help, "-HELP"); - Assert.Equal("-NOLOGO", switches.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.NoLogo)); - Assert.True(switches.IsParameterlessSwitchSet(CommandLineSwitches.ParameterlessSwitch.NoLogo)); - Assert.True(switches[CommandLineSwitches.ParameterlessSwitch.NoLogo]); + Assert.Equal("-HELP", switches.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.Help)); + Assert.True(switches.IsParameterlessSwitchSet(CommandLineSwitches.ParameterlessSwitch.Help)); + Assert.True(switches[CommandLineSwitches.ParameterlessSwitch.Help]); // we didn't set this switch Assert.Null(switches.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.Version)); @@ -1474,6 +1474,43 @@ public void ProcessBooleanSwitchTest() Should.Throw(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidRestoreValue")); } + [Fact] + public void NoLogoParameterizedSwitchTest() + { + CommandLineSwitches switches = new CommandLineSwitches(); + + // Test that nologo is now identified as a parameterized switch + CommandLineSwitches.IsParameterizedSwitch("nologo", out CommandLineSwitches.ParameterizedSwitch parameterizedSwitch, out string duplicateSwitchErrorMessage, out bool multipleParametersAllowed, out string missingParametersErrorMessage, out bool unquoteParameters, out bool emptyParametersAllowed).ShouldBeTrue(); + parameterizedSwitch.ShouldBe(CommandLineSwitches.ParameterizedSwitch.NoLogo); + + // Test setting parameterized nologo switch with explicit true + switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.NoLogo, "/nologo:true", "true", false, true, false); + switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.NoLogo).ShouldBeTrue(); + switches[CommandLineSwitches.ParameterizedSwitch.NoLogo][0].ShouldBe("true"); + + // Test setting parameterized nologo switch with explicit false + switches = new CommandLineSwitches(); + switches.SetParameterizedSwitch(CommandLineSwitches.ParameterizedSwitch.NoLogo, "/nologo:false", "false", false, true, false); + switches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.NoLogo).ShouldBeTrue(); + switches[CommandLineSwitches.ParameterizedSwitch.NoLogo][0].ShouldBe("false"); + } + + [Fact] + public void NoLogoBooleanProcessingTest() + { + // Test ProcessBooleanSwitch behavior for nologo + // Default value should be true when no parameters are provided + MSBuildApp.ProcessBooleanSwitch(Array.Empty(), defaultValue: true, resourceName: "InvalidNoLogoValue").ShouldBeTrue(); + MSBuildApp.ProcessBooleanSwitch(Array.Empty(), defaultValue: false, resourceName: "InvalidNoLogoValue").ShouldBeFalse(); + + // Test with explicit true/false values + MSBuildApp.ProcessBooleanSwitch(new[] { "true" }, defaultValue: false, resourceName: "InvalidNoLogoValue").ShouldBeTrue(); + MSBuildApp.ProcessBooleanSwitch(new[] { "false" }, defaultValue: true, resourceName: "InvalidNoLogoValue").ShouldBeFalse(); + + // Test invalid value throws exception + Should.Throw(() => MSBuildApp.ProcessBooleanSwitch(new[] { "invalid" }, defaultValue: true, resourceName: "InvalidNoLogoValue")); + } + public static IEnumerable ProcessGraphBuildSwitchData() { var emptyOptions = new GraphBuildOptions(); diff --git a/src/MSBuild/CommandLineSwitches.cs b/src/MSBuild/CommandLineSwitches.cs index 66b529eb62f..5a9989e6645 100644 --- a/src/MSBuild/CommandLineSwitches.cs +++ b/src/MSBuild/CommandLineSwitches.cs @@ -33,7 +33,6 @@ internal enum ParameterlessSwitch Invalid = -1, Help = 0, Version, - NoLogo, NoAutoResponse, NoConsoleLogger, FileLogger, @@ -120,6 +119,7 @@ internal enum ParameterizedSwitch GetResultOutputFile, FeatureAvailability, MultiThreaded, + NoLogo, // This has to be kept as last enum value NumberOfParameterizedSwitches, } @@ -215,7 +215,6 @@ internal ParameterizedSwitchInfo( //---------------------------------------------------------------------------------------------------------------------------------------------------------- new ParameterlessSwitchInfo( ["help", "h", "?"], ParameterlessSwitch.Help, null, "HelpMessage_4_HelpSwitch"), new ParameterlessSwitchInfo( ["version", "ver"], ParameterlessSwitch.Version, null, "HelpMessage_6_VersionSwitch"), - new ParameterlessSwitchInfo( ["nologo"], ParameterlessSwitch.NoLogo, null, "HelpMessage_5_NoLogoSwitch"), new ParameterlessSwitchInfo( ["noautoresponse", "noautorsp"], ParameterlessSwitch.NoAutoResponse, null, "HelpMessage_8_NoAutoResponseSwitch"), new ParameterlessSwitchInfo( ["noconsolelogger", "noconlog"], ParameterlessSwitch.NoConsoleLogger, null, "HelpMessage_14_NoConsoleLoggerSwitch"), new ParameterlessSwitchInfo( ["filelogger", "fl"], ParameterlessSwitch.FileLogger, null, "HelpMessage_20_FileLoggerSwitch"), @@ -297,7 +296,8 @@ internal ParameterizedSwitchInfo( new ParameterizedSwitchInfo( ["getTargetResult"], ParameterizedSwitch.GetTargetResult, null, true, "MissingGetTargetResultError", true, false, "HelpMessage_45_GetTargetResultSwitch"), new ParameterizedSwitchInfo( ["getResultOutputFile"], ParameterizedSwitch.GetResultOutputFile, null, true, "MissingGetResultFileError", true, false, "HelpMessage_51_GetResultOutputFileSwitch"), new ParameterizedSwitchInfo( ["featureAvailability", "fa"], ParameterizedSwitch.FeatureAvailability, null, true, "MissingFeatureAvailabilityError", true, false, "HelpMessage_46_FeatureAvailabilitySwitch"), - new ParameterizedSwitchInfo( ["multithreaded", "mt"], ParameterizedSwitch.MultiThreaded, null, false, null, true, false, "HelpMessage_49_MultiThreadedSwitch") + new ParameterizedSwitchInfo( ["multithreaded", "mt"], ParameterizedSwitch.MultiThreaded, null, false, null, true, false, "HelpMessage_49_MultiThreadedSwitch"), + new ParameterizedSwitchInfo( ["nologo"], ParameterizedSwitch.NoLogo, null, false, null, true, false, "HelpMessage_5_NoLogoSwitch") }; /// diff --git a/src/MSBuild/Resources/Strings.resx b/src/MSBuild/Resources/Strings.resx index bf1e7bc6020..b76f77f9bff 100644 --- a/src/MSBuild/Resources/Strings.resx +++ b/src/MSBuild/Resources/Strings.resx @@ -1471,6 +1471,15 @@ LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + MSBUILD : error MSB1056: Isolate projects value is not valid. {0} diff --git a/src/MSBuild/Resources/xlf/Strings.cs.xlf b/src/MSBuild/Resources/xlf/Strings.cs.xlf index d946f2eb8ce..8fba041275c 100644 --- a/src/MSBuild/Resources/xlf/Strings.cs.xlf +++ b/src/MSBuild/Resources/xlf/Strings.cs.xlf @@ -308,6 +308,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.de.xlf b/src/MSBuild/Resources/xlf/Strings.de.xlf index 0cba6805f2c..ed1f29ffe89 100644 --- a/src/MSBuild/Resources/xlf/Strings.de.xlf +++ b/src/MSBuild/Resources/xlf/Strings.de.xlf @@ -308,6 +308,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.es.xlf b/src/MSBuild/Resources/xlf/Strings.es.xlf index 14f75ad5b07..d4fcea38cbc 100644 --- a/src/MSBuild/Resources/xlf/Strings.es.xlf +++ b/src/MSBuild/Resources/xlf/Strings.es.xlf @@ -307,6 +307,16 @@ Esta marca es experimental y puede que no funcione según lo previsto. UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.fr.xlf b/src/MSBuild/Resources/xlf/Strings.fr.xlf index 58de9b0a22a..8c1933c1832 100644 --- a/src/MSBuild/Resources/xlf/Strings.fr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.fr.xlf @@ -308,6 +308,16 @@ futures UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.it.xlf b/src/MSBuild/Resources/xlf/Strings.it.xlf index 4aa3620e44c..d65a7d546ba 100644 --- a/src/MSBuild/Resources/xlf/Strings.it.xlf +++ b/src/MSBuild/Resources/xlf/Strings.it.xlf @@ -308,6 +308,16 @@ Questo flag è sperimentale e potrebbe non funzionare come previsto. UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.ja.xlf b/src/MSBuild/Resources/xlf/Strings.ja.xlf index de62073f1eb..d7cf0490459 100644 --- a/src/MSBuild/Resources/xlf/Strings.ja.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ja.xlf @@ -308,6 +308,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.ko.xlf b/src/MSBuild/Resources/xlf/Strings.ko.xlf index 54da373cdfe..7ec33164e28 100644 --- a/src/MSBuild/Resources/xlf/Strings.ko.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ko.xlf @@ -309,6 +309,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.pl.xlf b/src/MSBuild/Resources/xlf/Strings.pl.xlf index a6cb09da145..a6739b3b2bd 100644 --- a/src/MSBuild/Resources/xlf/Strings.pl.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pl.xlf @@ -307,6 +307,16 @@ Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf index b9483ee66be..86819ee0211 100644 --- a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf @@ -307,6 +307,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.ru.xlf b/src/MSBuild/Resources/xlf/Strings.ru.xlf index bf1d012d0e9..b43336c39b4 100644 --- a/src/MSBuild/Resources/xlf/Strings.ru.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ru.xlf @@ -307,6 +307,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.tr.xlf b/src/MSBuild/Resources/xlf/Strings.tr.xlf index 0a9e4024bc6..15d04b054eb 100644 --- a/src/MSBuild/Resources/xlf/Strings.tr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.tr.xlf @@ -307,6 +307,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf b/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf index 79fe8567567..7ed8f63ace4 100644 --- a/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf @@ -308,6 +308,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf index 87546d3eed0..1a8e04729c9 100644 --- a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf @@ -308,6 +308,16 @@ UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. This error is shown when a user specifies a value for the lowPriority parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. + + + + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + MSBUILD : error MSB1071: NoLogo value is not valid. {0} + + {StrBegin="MSBUILD : error MSB1071: "} + UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. + This error is shown when a user specifies a value for the nologo parameter that is not equivalent to Boolean.TrueString or Boolean.FalseString. + LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. diff --git a/src/MSBuild/XMake.cs b/src/MSBuild/XMake.cs index 7febc492d7a..73a10f7a8cf 100644 --- a/src/MSBuild/XMake.cs +++ b/src/MSBuild/XMake.cs @@ -2569,11 +2569,18 @@ private static bool ProcessCommandLineSwitches( bool useTerminalLogger = ProcessTerminalLoggerConfiguration(commandLineSwitches, out string aggregatedTerminalLoggerParameters); + // Process nologo switch early so it can be used in DisplayVersionMessageIfNeeded + bool noLogo = false; + if (commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.NoLogo)) + { + noLogo = ProcessBooleanSwitch(commandLineSwitches[CommandLineSwitches.ParameterizedSwitch.NoLogo], defaultValue: true, resourceName: "InvalidNoLogoValue"); + } + // This is temporary until we can remove the need for the environment variable. // DO NOT use this environment variable for any new features as it will be removed without further notice. Environment.SetEnvironmentVariable("_MSBUILDTLENABLED", useTerminalLogger ? "1" : "0"); - DisplayVersionMessageIfNeeded(recursing, useTerminalLogger, commandLineSwitches); + DisplayVersionMessageIfNeeded(recursing, useTerminalLogger, noLogo, commandLineSwitches); // Idle priority would prevent the build from proceeding as the user does normal actions. // This switch is processed early to capture both the command line case (main node should @@ -4666,7 +4673,7 @@ private static void ThrowInvalidToolsVersionInitializationException(IEnumerable< /// /// Displays the application version message/logo. /// - private static void DisplayVersionMessageIfNeeded(bool recursing, bool useTerminalLogger, CommandLineSwitches commandLineSwitches) + private static void DisplayVersionMessageIfNeeded(bool recursing, bool useTerminalLogger, bool noLogo, CommandLineSwitches commandLineSwitches) { if (recursing) { @@ -4677,7 +4684,7 @@ private static void DisplayVersionMessageIfNeeded(bool recursing, bool useTermin // where it is not appropriate to show the versioning information (information querying mode that can be plugged into CLI scripts, // terminal logger mode, where we want to display only the most relevant info, while output is not meant for investigation). // NOTE: response files are not reflected in this check. So enabling TL in response file will lead to version message still being shown. - bool shouldShowLogo = !commandLineSwitches[CommandLineSwitches.ParameterlessSwitch.NoLogo] && + bool shouldShowLogo = !noLogo && !commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.Preprocess) && !commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.GetProperty) && !commandLineSwitches.IsParameterizedSwitchSet(CommandLineSwitches.ParameterizedSwitch.GetItem) && From 215ae07cff84abb191369b8c5cfa1d4dd258f36d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:46:24 +0000 Subject: [PATCH 2/7] Update NoLogo help message to document boolean parameter support Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com> --- src/MSBuild/Resources/Strings.resx | 3 ++- src/MSBuild/Resources/xlf/Strings.cs.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.de.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.es.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.fr.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.it.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.ja.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.ko.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.pl.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.pt-BR.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.ru.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.tr.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf | 5 +++-- src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf | 5 +++-- 14 files changed, 41 insertions(+), 27 deletions(-) diff --git a/src/MSBuild/Resources/Strings.resx b/src/MSBuild/Resources/Strings.resx index b76f77f9bff..328641ddd00 100644 --- a/src/MSBuild/Resources/Strings.resx +++ b/src/MSBuild/Resources/Strings.resx @@ -216,7 +216,8 @@ - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.cs.xlf b/src/MSBuild/Resources/xlf/Strings.cs.xlf index 8fba041275c..5745b6c8805 100644 --- a/src/MSBuild/Resources/xlf/Strings.cs.xlf +++ b/src/MSBuild/Resources/xlf/Strings.cs.xlf @@ -648,9 +648,10 @@ Když se nastaví na MessageUponIsolationViolation (nebo jeho krátký - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo Nezobrazí se úvodní nápis a zpráva o autorských právech. + -noLogo Nezobrazí se úvodní nápis a zpráva o autorských právech. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.de.xlf b/src/MSBuild/Resources/xlf/Strings.de.xlf index ed1f29ffe89..11b9aa8fef8 100644 --- a/src/MSBuild/Resources/xlf/Strings.de.xlf +++ b/src/MSBuild/Resources/xlf/Strings.de.xlf @@ -644,9 +644,10 @@ Dies ist ein restriktiverer Modus von MSBuild, da er erfordert, - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo Zeigt kein Startbanner und keine Copyrightmeldung an. + -noLogo Zeigt kein Startbanner und keine Copyrightmeldung an. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.es.xlf b/src/MSBuild/Resources/xlf/Strings.es.xlf index d4fcea38cbc..25c50faed6c 100644 --- a/src/MSBuild/Resources/xlf/Strings.es.xlf +++ b/src/MSBuild/Resources/xlf/Strings.es.xlf @@ -643,9 +643,10 @@ Esta marca es experimental y puede que no funcione según lo previsto. - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - noLogo No mostrar la pancarta de inicio ni el mensaje de copyright. + noLogo No mostrar la pancarta de inicio ni el mensaje de copyright. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.fr.xlf b/src/MSBuild/Resources/xlf/Strings.fr.xlf index 8c1933c1832..c6e3d512004 100644 --- a/src/MSBuild/Resources/xlf/Strings.fr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.fr.xlf @@ -644,9 +644,10 @@ Cet indicateur est expérimental et peut ne pas fonctionner comme prévu. - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo Ne pas afficher la bannière de démarrage ni le message de copyright. + -noLogo Ne pas afficher la bannière de démarrage ni le message de copyright. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.it.xlf b/src/MSBuild/Resources/xlf/Strings.it.xlf index d65a7d546ba..e7e4e695ec0 100644 --- a/src/MSBuild/Resources/xlf/Strings.it.xlf +++ b/src/MSBuild/Resources/xlf/Strings.it.xlf @@ -649,9 +649,10 @@ Questo flag è sperimentale e potrebbe non funzionare come previsto. - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo Evita la visualizzazione del messaggio di avvio e di + -noLogo Evita la visualizzazione del messaggio di avvio e di copyright. diff --git a/src/MSBuild/Resources/xlf/Strings.ja.xlf b/src/MSBuild/Resources/xlf/Strings.ja.xlf index d7cf0490459..817ca7d2c72 100644 --- a/src/MSBuild/Resources/xlf/Strings.ja.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ja.xlf @@ -644,9 +644,10 @@ - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo 著作権情報を表示しません。 + -noLogo 著作権情報を表示しません。 LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.ko.xlf b/src/MSBuild/Resources/xlf/Strings.ko.xlf index 7ec33164e28..c5303b9c1ae 100644 --- a/src/MSBuild/Resources/xlf/Strings.ko.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ko.xlf @@ -645,9 +645,10 @@ - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo 시작 배너 및 저작권 메시지를 표시하지 않습니다. + -noLogo 시작 배너 및 저작권 메시지를 표시하지 않습니다. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.pl.xlf b/src/MSBuild/Resources/xlf/Strings.pl.xlf index a6739b3b2bd..eb59567d365 100644 --- a/src/MSBuild/Resources/xlf/Strings.pl.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pl.xlf @@ -648,9 +648,10 @@ Ta flaga jest eksperymentalna i może nie działać zgodnie z oczekiwaniami. - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -nologo Nie wyświetla baneru początkowego ani komunikatu o prawach autorskich. + -nologo Nie wyświetla baneru początkowego ani komunikatu o prawach autorskich. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf index 86819ee0211..57dfdeb3306 100644 --- a/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf +++ b/src/MSBuild/Resources/xlf/Strings.pt-BR.xlf @@ -644,9 +644,10 @@ arquivo de resposta. - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo Não exibe a faixa de inicialização e a mensagem de direitos autorais. + -noLogo Não exibe a faixa de inicialização e a mensagem de direitos autorais. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.ru.xlf b/src/MSBuild/Resources/xlf/Strings.ru.xlf index b43336c39b4..335757587d7 100644 --- a/src/MSBuild/Resources/xlf/Strings.ru.xlf +++ b/src/MSBuild/Resources/xlf/Strings.ru.xlf @@ -642,9 +642,10 @@ - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo Не отображать начальный заголовок и сообщение об авторском праве. + -noLogo Не отображать начальный заголовок и сообщение об авторском праве. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.tr.xlf b/src/MSBuild/Resources/xlf/Strings.tr.xlf index 15d04b054eb..e5448bccbb2 100644 --- a/src/MSBuild/Resources/xlf/Strings.tr.xlf +++ b/src/MSBuild/Resources/xlf/Strings.tr.xlf @@ -643,9 +643,10 @@ - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo Başlangıç başlığını ve telif hakkı iletisini görüntüleme. + -noLogo Başlangıç başlığını ve telif hakkı iletisini görüntüleme. LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf b/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf index 7ed8f63ace4..0837a56bc93 100644 --- a/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/MSBuild/Resources/xlf/Strings.zh-Hans.xlf @@ -644,9 +644,10 @@ - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo 不显示启动版权标志和版权消息。 + -noLogo 不显示启动版权标志和版权消息。 LOCALIZATION: The following should not be localized: diff --git a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf index 1a8e04729c9..1901a0b2cbd 100644 --- a/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/MSBuild/Resources/xlf/Strings.zh-Hant.xlf @@ -644,9 +644,10 @@ - -noLogo Do not display the startup banner and copyright message. + -noLogo[:true|false] Do not display the startup banner and copyright message. + Specify -nologo:false to explicitly show the logo. - -noLogo 不顯示啟動橫幅及著作權訊息。 + -noLogo 不顯示啟動橫幅及著作權訊息。 LOCALIZATION: The following should not be localized: From 47239a0318b039b19d2b86c30793e99499ab4f01 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Sep 2025 19:08:06 +0000 Subject: [PATCH 3/7] Fix BinaryLoggerTests.SuppressCommandOutputForNonDiagVerbosity test - adjust for nologo switch order Co-authored-by: rainersigwald <3347530+rainersigwald@users.noreply.github.com> --- src/Build.UnitTests/BinaryLogger_Tests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Build.UnitTests/BinaryLogger_Tests.cs b/src/Build.UnitTests/BinaryLogger_Tests.cs index 97fe6342c62..ec9b843a9a7 100644 --- a/src/Build.UnitTests/BinaryLogger_Tests.cs +++ b/src/Build.UnitTests/BinaryLogger_Tests.cs @@ -611,7 +611,7 @@ public void SuppressCommandOutputForNonDiagVerbosity() TransientTestFile projectFile1 = env.CreateFile(testFolder, "testProject01.proj", contents); string consoleOutput1 = RunnerUtilities.ExecMSBuild($"{projectFile1.Path} -bl:{_logFile} -verbosity:diag -nologo", out bool success1); success1.ShouldBeTrue(); - var expected1 = $"-nologo -bl:{_logFile} -verbosity:diag {projectFile1.Path}"; + var expected1 = $"-bl:{_logFile} -nologo -verbosity:diag {projectFile1.Path}"; consoleOutput1.ShouldContain(expected1); foreach (var verbosity in new string[] { "q", "m", "n", "d" }) @@ -619,7 +619,7 @@ public void SuppressCommandOutputForNonDiagVerbosity() TransientTestFile projectFile2 = env.CreateFile(testFolder, $"testProject_{verbosity}.proj", contents); string consoleOutput2 = RunnerUtilities.ExecMSBuild($"{projectFile2.Path} -bl:{_logFile} -verbosity:{verbosity} -nologo", out bool success2); success2.ShouldBeTrue(); - var expected2 = $"-nologo -bl:{_logFile} -verbosity:{verbosity} {projectFile2.Path}"; + var expected2 = $"-bl:{_logFile} -nologo -verbosity:{verbosity} {projectFile2.Path}"; consoleOutput2.ShouldNotContain(expected2); } } From ce373383563a17a04b7b3d5b50e31b889f9fef6e Mon Sep 17 00:00:00 2001 From: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com> Date: Mon, 2 Feb 2026 18:29:12 +0100 Subject: [PATCH 4/7] Update src/MSBuild/CommandLine/CommandLineSwitches.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/MSBuild/CommandLine/CommandLineSwitches.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MSBuild/CommandLine/CommandLineSwitches.cs b/src/MSBuild/CommandLine/CommandLineSwitches.cs index bc70bb6755b..72adcf040b4 100644 --- a/src/MSBuild/CommandLine/CommandLineSwitches.cs +++ b/src/MSBuild/CommandLine/CommandLineSwitches.cs @@ -300,7 +300,6 @@ internal ParameterizedSwitchInfo( new ParameterizedSwitchInfo( ["multithreaded", "mt"], ParameterizedSwitch.MultiThreaded, null, false, null, true, false, "HelpMessage_49_MultiThreadedSwitch"), new ParameterizedSwitchInfo( ["parentpacketversion"], ParameterizedSwitch.ParentPacketVersion, null, false, null, false, false, null), // Add to ParameterizedSwitch enum (before NumberOfParameterizedSwitches): - new ParameterizedSwitchInfo( ["multithreaded", "mt"], ParameterizedSwitch.MultiThreaded, null, false, null, true, false, "HelpMessage_49_MultiThreadedSwitch"), new ParameterizedSwitchInfo( ["nologo"], ParameterizedSwitch.NoLogo, null, false, null, true, false, "HelpMessage_5_NoLogoSwitch") }; From 443b8ad76b1489a125ad1e636c08c4c04bbb7beb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 15:32:56 +0000 Subject: [PATCH 5/7] Remove inappropriate comment from parameterized switches array Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com> --- src/MSBuild/CommandLine/CommandLineSwitches.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MSBuild/CommandLine/CommandLineSwitches.cs b/src/MSBuild/CommandLine/CommandLineSwitches.cs index 72adcf040b4..f2da4f2fb3b 100644 --- a/src/MSBuild/CommandLine/CommandLineSwitches.cs +++ b/src/MSBuild/CommandLine/CommandLineSwitches.cs @@ -299,7 +299,6 @@ internal ParameterizedSwitchInfo( new ParameterizedSwitchInfo( ["featureAvailability", "fa"], ParameterizedSwitch.FeatureAvailability, null, true, "MissingFeatureAvailabilityError", true, false, "HelpMessage_46_FeatureAvailabilitySwitch"), new ParameterizedSwitchInfo( ["multithreaded", "mt"], ParameterizedSwitch.MultiThreaded, null, false, null, true, false, "HelpMessage_49_MultiThreadedSwitch"), new ParameterizedSwitchInfo( ["parentpacketversion"], ParameterizedSwitch.ParentPacketVersion, null, false, null, false, false, null), - // Add to ParameterizedSwitch enum (before NumberOfParameterizedSwitches): new ParameterizedSwitchInfo( ["nologo"], ParameterizedSwitch.NoLogo, null, false, null, true, false, "HelpMessage_5_NoLogoSwitch") }; From 200bcba965f1a50d7c22380697cdb116602caa85 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 16:11:39 +0000 Subject: [PATCH 6/7] Fix CommandLineSwitchesAccessor to use parameterized NoLogo switch Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com> --- src/MSBuild/CommandLine/CommandLineSwitchesAccessor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MSBuild/CommandLine/CommandLineSwitchesAccessor.cs b/src/MSBuild/CommandLine/CommandLineSwitchesAccessor.cs index 66bf8c8582e..0835aa30165 100644 --- a/src/MSBuild/CommandLine/CommandLineSwitchesAccessor.cs +++ b/src/MSBuild/CommandLine/CommandLineSwitchesAccessor.cs @@ -19,8 +19,6 @@ internal CommandLineSwitchesAccessor(CommandLineSwitches switches) public bool? Version => GetParameterlessSwitchValue(ParameterlessSwitch.Version); - public bool? NoLogo => GetParameterlessSwitchValue(ParameterlessSwitch.NoLogo); - public bool? NoAutoResponse => GetParameterlessSwitchValue(ParameterlessSwitch.NoAutoResponse); public bool? NoConsoleLogger => GetParameterlessSwitchValue(ParameterlessSwitch.NoConsoleLogger); @@ -156,6 +154,8 @@ internal CommandLineSwitchesAccessor(CommandLineSwitches switches) public string[]? MultiThreaded => GetParameterizedSwitchValue(ParameterizedSwitch.MultiThreaded); + public string[]? NoLogo => GetParameterizedSwitchValue(ParameterizedSwitch.NoLogo); + private bool? GetParameterlessSwitchValue(ParameterlessSwitch switchType) => switches.IsParameterlessSwitchSet(switchType) ? switches[switchType] : null; private string[]? GetParameterizedSwitchValue(ParameterizedSwitch switchType) => switches.IsParameterizedSwitchSet(switchType) ? switches[switchType] : null; From 9d8f715c6601054877d5758c461f1d91223c3196 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 17:32:25 +0000 Subject: [PATCH 7/7] Restore comment at end of parameterized switches array Co-authored-by: YuliiaKovalova <95473390+YuliiaKovalova@users.noreply.github.com> --- src/MSBuild/CommandLine/CommandLineSwitches.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MSBuild/CommandLine/CommandLineSwitches.cs b/src/MSBuild/CommandLine/CommandLineSwitches.cs index f2da4f2fb3b..1f37c4e45d6 100644 --- a/src/MSBuild/CommandLine/CommandLineSwitches.cs +++ b/src/MSBuild/CommandLine/CommandLineSwitches.cs @@ -300,6 +300,7 @@ internal ParameterizedSwitchInfo( new ParameterizedSwitchInfo( ["multithreaded", "mt"], ParameterizedSwitch.MultiThreaded, null, false, null, true, false, "HelpMessage_49_MultiThreadedSwitch"), new ParameterizedSwitchInfo( ["parentpacketversion"], ParameterizedSwitch.ParentPacketVersion, null, false, null, false, false, null), new ParameterizedSwitchInfo( ["nologo"], ParameterizedSwitch.NoLogo, null, false, null, true, false, "HelpMessage_5_NoLogoSwitch") + // Add to ParameterizedSwitch enum (before NumberOfParameterizedSwitches): }; ///