Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet list reference help text and output

See original GitHub issue

Steps to reproduce

  1. dotnet list reference --help
  2. dotnet list reference solution-name.sln
  3. dotnet list reference on a folder that contains a project with no P2P references

Expected behavior

  1. It seems that dotnet list reference doesn’t accept solution files as a parameter but its description was changed in 2.2 SDK to say it supports solution files. I’d expect that dotnet list reference --help wouldn’t say that is either a project or solution if solution files aren’t supported.
  2. I’m assuming this shouldn’t work by design. So, fixing the help text would avoid confusions. Or if it’s supposed to be supported, then it should list the P2P references from the solution.
  3. For a project that has no P2P references, I’d expect a cleaner output, such as: There are no project-to-project references in project C:\Users\mairaw\Documents\GitHub\samples\core\getting-started\unit-testing-using-nunit\PrimeService\.

Actual behavior

  1. dotnet list reference --help tells me I can provide a project or solution in .NET Core 2.2 SDK
  2. dotnet list reference solution-name.sln doesn’t work
  3. For a project that has no P2P references, the output is a bit garbled. For example: There are no Project to Project references in project C:\Users\mairaw\Documents\GitHub\samples\core\getting-started\unit-testing-using-nunit\PrimeService\. ;; Project to Project is the type of the item being requested (project, package, p2p) and C:\Users\mairaw\Documents\GitHub\samples\core\getting-started\unit-testing-using-nunit\PrimeService\ is the object operated on (a project file or a solution file).

Environment data

dotnet --info output

.NET Core SDK (reflecting any global.json):
 Version:   2.2.100
 Commit:    51868761f2

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

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  2.0.0 [C:\Program Files\dotnet\sdk]
  2.1.300-preview1-008174 [C:\Program Files\dotnet\sdk]
  2.1.300 [C:\Program Files\dotnet\sdk]
  2.2.100 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-preview1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-preview1-final [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-preview1-26216-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

KathleenDollardcommented, Feb 28, 2019

Looks good.

peterhuenecommented, Feb 16, 2019

Actually, I think I spotted a way that would work without having to touch the command line parser (there’s a protected property that we may be able to exploit). I’ll get back to you 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet list reference command - .NET CLI
The dotnet list reference command provides a convenient option to list project references for a given project.
Read more >
List<T> Class (System.Collections.Generic)
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
Read more >
Documentation comments - C# language specification
This appendix describes XML comments that are used to document your program.
Read more >
Command-line syntax overview for System.CommandLine
Description: List references or packages of a .NET project. Usage: dotnet [options] list [<PROJECT | SOLUTION>] [command] Arguments: <PROJECT | ...
Read more >
dotnet list package command - .NET CLI
The 'dotnet list package' command provides a convenient option to list the package references for a project or solution.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found