Skip to content

[Bug]: Specifying -graphBuild twice causes misleading error MSB1057 #10596

@DalekBaldwin

Description

@DalekBaldwin

Issue Description

For ordinary MSBuild command-line arguments, redundant arguments are accepted (for instance, setting defaults in Directory.Build.rsp and overriding them at the command line). But if -graphBuild is specified more than once, an error occurs.

Steps to Reproduce

dotnet msbuild -t:Build -graphBuild:True -graphBuild:True MyProj.csproj

Expected Behavior

Argument override is accepted.

Actual Behavior

MSBuild version 17.10.4+10fbfbf2e for .NET
MSBUILD : error MSB1057: Graph build value is not valid.
Switch: True

Analysis

No response

Versions & Configurations

dotnet: 8.0.304
MSBuild: 17.10.4.21802

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions