Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project argument should be optional to nuget why #13782

Open
ericstj opened this issue Sep 11, 2024 · 3 comments
Open

Project argument should be optional to nuget why #13782

ericstj opened this issue Sep 11, 2024 · 3 comments
Labels
Type:DCR Design Change Request

Comments

@ericstj
Copy link

ericstj commented Sep 11, 2024

NuGet Product(s) Affected

dotnet.exe

Current Behavior

When running nuget why I always need to specify a project file. Other dotnet commands like build, restore, clean, publish do not require this.

Desired Behavior

Use the same heuristic for locating a project or solution file when running nuget why and one is not specified.

Additional Context

No response

@ericstj ericstj added Triage:Untriaged Type:DCR Design Change Request labels Sep 11, 2024
@jaredpar
Copy link

Definitely agree that the project should be optional here for consistency with other commands. One work around I've found is that you can use . and the command will use the project file in the current directory:

> dotnet why . System.Formats.Asn1

@ericstj
Copy link
Author

ericstj commented Sep 11, 2024

Thanks for sharing that. I hadn't realized that would work - I guess it's because you can specify a directory. I still think this should be the default for consistency with other commands. The fact that a directory works means nuget already has the project locator heuristic so it's simply allowing the "current working directory" to be the default value.

@baronfel
Copy link

I expect this to be fixed in RC2 by NuGet/NuGet.Client#5969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

4 participants