Skip to content

dotnet reference list looks for empty project name when option not specified #48555

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

Open
nkolev92 opened this issue Apr 17, 2025 · 4 comments
Open
Assignees
Labels
Area-CLI untriaged Request triage from a team member

Comments

@nkolev92
Copy link
Contributor

dotnet list reference previously had project as an argument with a default.
dotnet reference list no longer has project as an argument, but as an option.

However, if I don't specify the project option, the error message makes it seem that it attempted to lookup an empty string for project. Instead, it should have a default of the project in the current directory, as the old command did, or it should tell me I must provide an option for project.

Old behavior

dotnet list reference
There are no Project to Project references in project C:\users\eagoodso\source\repos\ConsoleApp8\ClassLibrary1.

New unexpected behavior

dotnet reference list
Could not find project or directory ``.

Image

Moved from https://github.com/NuGet/client.engineering/issues/3227, filled originally by @donnie-msft

cc @Nigusu-Allehu

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CLI untriaged Request triage from a team member labels Apr 17, 2025
@aortiz-msft
Copy link
Contributor

@baronfel - This is a regression in 9.0.3xx. Would you please take a look?

cc @marcpopMSFT

@Forgind
Copy link
Member

Forgind commented Apr 28, 2025

I haven't attempted to reproduce this yet, but I believe that the most likely issue behind this was addressed in the change to ParseResultExtensions in this commit

That commit is only in main, however. Is this a problem in main or only in 9.0.3xx?

@aortiz-msft
Copy link
Contributor

@donnie-msft, would you please answer the question above?

@donnie-msft
Copy link
Contributor

Hi @Forgind, our bug bash was after the commit you linked. The issue existed in both 9.0.3xx and main at that time. I just retested both to hopefully clarify:

C:\users\eagoodso\source\repos\ConsoleApp8\ClassLibrary1> dotnet --version
9.0.300-preview.0.25177.5
C:\users\eagoodso\source\repos\ConsoleApp8\ClassLibrary1> dotnet reference list
Could not find project or directory ``
C:\users\eagoodso\source\repos\ConsoleApp8\ClassLibrary1> rm .\global.json
C:\users\eagoodso\source\repos\ConsoleApp8\ClassLibrary1> dotnet --version
10.0.100-preview.4.25211.20
C:\users\eagoodso\source\repos\ConsoleApp8\ClassLibrary1> dotnet reference list
Could not find project or directory ``.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

4 participants