msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

Add the missing help messages for some switches

Open JaynieBai opened this issue 1 year ago • 6 comments

Fixes #9710

Context

Some of the supported command line switches are not mentioned in the help message

Changes Made

List the relevant string resource ID in s_parameterlessSwitchesMap / s_parameterizedSwitchesMap. And iterate the resource ids in the ShowHelpMessage

Testing

Before: msbuildBefore.txt

dotnetmsbuildBefore.txt

After: msbuildAfter.txt netMsbuildAfter.txt

Notes

JaynieBai avatar Feb 08 '24 11:02 JaynieBai

Looks good.

I agree that getTargetResult should probably specify that the specified target will be executed.

Thanks, have updated the help message for this property.

JaynieBai avatar Apr 02 '24 07:04 JaynieBai

Thank you, I've left a few comments inline. For testing, can you please compare the help output before and after, and from both MSBuild.exe and dotnet build?

I upload the text based on test. There is a change in the order of the switches. Please have a look if that is acceptable. -help is earlier than other no parameters switches since the https://github.com/dotnet/msbuild/blob/563c7b091b63874dd7e343dc8742690174fe165d/src/MSBuild/CommandLineSwitches.cs#L204-L227 image

JaynieBai avatar Apr 03 '24 10:04 JaynieBai

/azp run

JaynieBai avatar Apr 07 '24 11:04 JaynieBai

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Apr 07 '24 11:04 azure-pipelines[bot]

There are conflicts since the new analyzer switch in the commit https://github.com/dotnet/msbuild/commit/f744eb5b855c02c7a55490de6a16c688931fa618#diff-c0f68f9abf837e0ecb1e4de52b83e9e81d6934c5596bc213e4b1de45e591d7ce But there is no help message for this analyzer switch. @JanKrivanek , Could you give more info about this switch? Should we show the help message for this switch?

JaynieBai avatar Apr 17 '24 07:04 JaynieBai

There are conflicts since the new analyzer switch in the commit f744eb5#diff-c0f68f9abf837e0ecb1e4de52b83e9e81d6934c5596bc213e4b1de45e591d7ce But there is no help message for this analyzer switch. @JanKrivanek , Could you give more info about this switch? Should we show the help message for this switch?

Disccussed offline. -analyze should not be included in help message now

JanKrivanek avatar Apr 17 '24 08:04 JanKrivanek