Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dotnet run swallows -bl arguments even if they follow double dash (--) #54715

Open
Labels
Area-RunIssues relating to `dotnet run` untriagedRequest triage from a team member

Description

Describe the bug

dotnet run -- -bl should run an app and pass -bl to it as command-line argument. Instead dotnet run itself uses the -bl argument.

Steps to reproduce

Create a simple command-line app that can echo its arguments, for example:

Console.WriteLine($"args({args.Length}):{string.Join(";", args)}");
  • dotnet run -- --no-build -> args(1):--no-build OK
  • dotnet run -- -bl -> args(0): WRONG

Expected behavior

-bl should be passed to the app since it's after --.

Actual behavior

-bl is consumed by dotnet run CLI.

Is this a regression?

No.

Are there any workarounds?

No.

dotnet --info output

.NET 10.0.300

IDE version

No response

Other details

No response

Metadata

Metadata

Labels

Area-RunIssues relating to `dotnet run` untriagedRequest triage from a team member

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /