You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
One of the most prominent inconsistencies in the dotnet CLI is that dotnet run requires you to supply --project, whereas all the other commands (publish, build, restore at least) require you not to supply it. I hit this at least once a week and it's annoying every time.
Describe the solution you'd like
Surely these invocations could all accept both --project foo and the current positional foo interchangeably? And throw if there's a spare positional argument when --project was supplied, so you can't try and supply both.
The text was updated successfully, but these errors were encountered:
I see where you are coming from, yet: dotnet run without --project would have very high ambiguity: the parameter could be an argument to dotnet run, aka which project to run, OR it could be an arg for the program you are running. We could try to change the semantics to match build and publish by providing other ways in the command to reduce the ambiguity with a newer approach like this, but that is highly likely to break a lot of existing scripts and CI/CD, we'd need to consider this for Preview 1 of .NET 10 if we decide to do this.
Perhaps we should document this with some specific examples.
Certainly having dotnet runrequire--project seems good to me, for the reason you state. I'd be quite happy to resolve the inconsistency in the other direction: have the dotnet foo commands accept--project.
Is your feature request related to a problem? Please describe.
One of the most prominent inconsistencies in the
dotnet
CLI is thatdotnet run
requires you to supply--project
, whereas all the other commands (publish
,build
,restore
at least) require you not to supply it. I hit this at least once a week and it's annoying every time.Describe the solution you'd like
Surely these invocations could all accept both
--project foo
and the current positionalfoo
interchangeably? And throw if there's a spare positional argument when--project
was supplied, so you can't try and supply both.The text was updated successfully, but these errors were encountered: