-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make nologo switch accept boolean values to enable explicit logo display control #12541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: rainersigwald <[email protected]>
nologo
switch a bool, which is false when unspecified, true when specified with no value (as it is today), but able to accept -nologo:false
and display the logo.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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot update HelpMessage_5_NoLogoSwitch
to mention that you can also pass -nologo:false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the help message to document the boolean parameter support. The help text now shows -noLogo[:true|false]
and explicitly mentions that users can specify -nologo:false
to show the logo. (c3b9b87)
Co-authored-by: rainersigwald <[email protected]>
@copilot fix the failing test |
… adjust for nologo switch order Co-authored-by: rainersigwald <[email protected]>
Fixed the failing test by updating the expected command line switch order. Since nologo moved from parameterless to parameterized, it now appears alphabetically with other parameterized switches rather than first. Updated test expectations accordingly. (53e44d8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the nologo
MSBuild command-line switch to accept boolean parameters, enabling explicit control over logo display. Previously, nologo
was a parameterless switch that could only suppress the logo. Now it supports -nologo:false
to explicitly show the logo and -nologo:true
(equivalent to -nologo
) to suppress it.
Key changes:
- Migrated
nologo
from parameterless to parameterized switch architecture - Added boolean parameter processing with proper error handling for invalid values
- Updated help documentation to reflect new syntax options
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/MSBuild/XMake.cs | Updated logo processing logic to handle parameterized boolean nologo switch |
src/MSBuild/CommandLineSwitches.cs | Moved nologo from parameterless to parameterized switch enumeration |
src/MSBuild/Resources/Strings.resx | Added error message for invalid nologo values and updated help text |
src/MSBuild/Resources/xlf/*.xlf | Updated localization files with new help text and error message |
src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs | Updated and added tests for new boolean nologo behavior |
src/Build.UnitTests/BinaryLogger_Tests.cs | Fixed test expectations to account for switch ordering changes |
Implementation Plan: Make
nologo
switch a boolean parameterAnalysis Complete:
nologo
behavior (parameterless switch)Implementation Complete:
nologo
fromParameterlessSwitch
toParameterizedSwitch
inCommandLineSwitches.cs
nologo
entry to parameterized switches map with boolean supportnologo
as a boolean switch usingProcessBooleanSwitch
-nologo:false
functionality-nologo
) defaults totrue
-nologo:false
displays the logo-nologo:true
hides the logo (same as-nologo
)false
(show logo by default)Files Modified:
src/MSBuild/CommandLineSwitches.cs
- Moved nologo to parameterized switchessrc/MSBuild/XMake.cs
- Updated processing logic for boolean nologosrc/MSBuild/Resources/Strings.resx
- Added InvalidNoLogoValue error message and updated help textsrc/MSBuild.UnitTests/CommandLineSwitches_Tests.cs
- Updated and added testssrc/Build.UnitTests/BinaryLogger_Tests.cs
- Fixed test expectation for switch orderManual Testing Results:
-nologo
: Hides logo-nologo:true
: Hides logo-nologo:false
: Shows logo-nologo:invalid
: Shows MSB1071 error-noLogo[:true|false]
syntaxTest Fix Details:
Fixed the failing
BinaryLoggerTests.SuppressCommandOutputForNonDiagVerbosity
test by updating the expected command line order. Sincenologo
moved from parameterless to parameterized, it now appears in alphabetical order with other parameterized switches:Before:
-nologo -bl:... -verbosity:diag
After:
-bl:... -nologo -verbosity:diag
The implementation is complete and all tests are passing.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.