sdk icon indicating copy to clipboard operation
sdk copied to clipboard

List non-project references from CLI

Open sadegr opened this issue 7 years ago • 2 comments

We can list project references using dotnet list <PROJECT> reference. I have not been able to find a way to list non-project references from the CLI, e.g. listing any external DLLs that a project references.

Is this option available somewhere and I have just been unable to find it? If not, is this something that you would consider adding to the CLI? I would be willing to (attempt to) work on this and submit a pull request if you are accepting PRs from independent contributors.

Here is the output of dotnet list reference -h currently:

C:\Users\degroosa>dotnet list reference -h
Usage: dotnet list <PROJECT> reference [options]

Arguments:
  <PROJECT>   The project file to operate on. If a file is not specified, the command will search the current directory for one.

Options:
  -h, --help   Show help information.

One way to integrate this into the CLI would be to add new options -a, --all to the dotnet list reference command, which would list ALL references for a project, not just references to other projects.

For reference, here's the output from dotnet --info on my machine with Visual Studio Enterprise 2017 installed:

C:\Users\degroosa>dotnet --info
.NET Command Line Tools (2.1.201)

Product Information:
 Version:            2.1.201
 Commit SHA-1 hash:  7932dc6179

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.201\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.7
  Build    : 2d61d0b043915bc948ebf98836fefe9ba942be11

sadegr avatar Jun 21 '18 15:06 sadegr

cc @KathleenDollard to comment on the experience.

This is definitely a gap and we would be willing to take a PR for this. Though, we need to come to an agreement with @KathleenDollard on what the experience should look like.

livarcocc avatar Jun 21 '18 18:06 livarcocc

Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.

github-actions[bot] avatar Jun 22 '24 04:06 github-actions[bot]

This issue will now be closed since it has been labeled 'stale' without activity for 30 days.

github-actions[bot] avatar Jul 22 '24 04:07 github-actions[bot]