dotnet list reference help text and output
See original GitHub issueSteps to reproduce
dotnet list reference --help
dotnet list reference solution-name.sln
dotnet list reference
on a folder that contains a project with no P2P references
Expected behavior
- 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. - 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.
- 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
dotnet list reference --help
tells me I can provide a project or solution in .NET Core 2.2 SDKdotnet list reference solution-name.sln
doesn’t work- 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:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (13 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks good.
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 😄