Skip to content

GH4456: DotNetMSBuild Use MSBuild /verbosity not dotnet --verbosity#4756

Merged
devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-4456
Mar 7, 2026
Merged

GH4456: DotNetMSBuild Use MSBuild /verbosity not dotnet --verbosity#4756
devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-4456

Conversation

@devlead
Copy link
Copy Markdown
Member

@devlead devlead commented Mar 4, 2026

Use MSBuild /verbosity switch instead of dotnet --verbosity for DotNetMSBuild, since dotnet msbuild forwards arguments to MSBuild, which does not accept --verbosity and fails with MSB1016.

  • Add verbosity to MSBuild args in AppendMSBuildSettings via GetMSBuildVerbosityValue (quiet, minimal, normal, detailed, diagnostic)
  • Call Run() directly from DotNetMSBuildBuilder.Build() so AppendCommonArguments (and thus --verbosity) is not appended
  • Add unit test that verbosity is emitted as /verbosity:x and not --verbosity
  • Use Verbosity.Quiet in DotNetMSBuild integration task to cover the fix
  • fixes DotNetMSBuild alias generates extra verbosity argument #4456

…-verbosity

Use MSBuild /verbosity switch instead of dotnet --verbosity for
DotNetMSBuild, since dotnet msbuild forwards arguments to MSBuild,
which does not accept --verbosity and fails with MSB1016.

- Add verbosity to MSBuild args in AppendMSBuildSettings via
  GetMSBuildVerbosityValue (quiet, minimal, normal, detailed, diagnostic)
- Call Run() directly from DotNetMSBuildBuilder.Build() so
  AppendCommonArguments (and thus --verbosity) is not appended
- Add unit test that verbosity is emitted as /verbosity:x and not --verbosity
- Use Verbosity.Quiet in DotNetMSBuild integration task to cover the fix
- fixes cake-build#4456
@devlead devlead enabled auto-merge March 4, 2026 21:48
@devlead devlead requested a review from a team March 4, 2026 21:48
Copy link
Copy Markdown
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@devlead devlead merged commit 444d354 into cake-build:develop Mar 7, 2026
17 checks passed
@gep13
Copy link
Copy Markdown
Member

gep13 commented Mar 7, 2026

@devlead thank you for getting this fixed up!

This was referenced May 22, 2026
This was referenced May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DotNetMSBuild alias generates extra verbosity argument

2 participants