Add `dotnet inspect` command
See original GitHub issueThis is the experience creating a console app.
rich@M1 ~ % dotnet new console -o console
The template "Console Application" was created successfully.
Processing post-creation actions...
Running 'dotnet restore' on /Users/rich/console/console.csproj...
Determining projects to restore...
Restored /Users/rich/console/console.csproj (in 129 ms).
Restore succeeded.
rich@M1 ~ % cat console/Program.cs
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
Invariably, the first line of Program.cs
will be deleted by the user. That’s unfortunate UX.
Please consider putting/sharing this comment in the template creation output and/or in the project file instead.
Some combination of the following would be great, with a bias to updating the console output only.
rich@M1 ~ % dotnet new console -o console
The template "Console Application" was created successfully.
See https://aka.ms/new-console-template for more information
on the new .NET 6 templates.
Processing post-creation actions...
Running 'dotnet restore' on /Users/rich/console/console.csproj...
Determining projects to restore...
Restored /Users/rich/console/console.csproj (in 129 ms).
Restore succeeded.
rich@M1 ~ % cat console/Program.cs
Console.WriteLine("Hello, World!");
rich@M1 ~ % cat console/console.csproj
<Project Sdk="Microsoft.NET.Sdk">
<!--
See https://aka.ms/new-console-template for more information
on the new .NET 6 templates.
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
As an aside, there is no mention of async at https://aka.ms/new-console-template. That’s probably a missed opportunity that IMO helps motivate the move to top-level statements.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
dotnet command - .NET CLI
Runs the application from source. dotnet sdk check, Shows up-to-date status of installed SDK and Runtime versions. dotnet sln, Options to add, ...
Read more >dotnet test command - .NET CLI
The dotnet test command is used to execute unit tests in a given project. ... TestAdapter.dll are inspected. If not specified, the directory ......
Read more >dotnet-dump diagnostic tool - .NET CLI
The dotnet-dump global tool is a way to collect and analyze dumps on Windows, Linux, and macOS without any native debugger involved.
Read more >Inspect assembly contents using MetadataLoadContext
This sample is a .NET console application that loads a specified assembly and prints its custom attributes and defined types.
Read more >dotnet-sos diagnostic tool - .NET CLI
Learn how to install and use the dotnet-sos CLI tool to manage the SOS debugger extension, which is used with native debuggers on...
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 FreeTop 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
Top GitHub Comments
More ideas:
dotnet inspect foo.dll
It tells you (among other things) which TFM and/or RIDs the binary targets/supports.
dotnet inspect foo.npkg
It tells you (among other things) author, publish date, and dependencies.
This is probably a good project to start and then we can decide if we should integrate it into the SDK or leave it as a .NET tool.
We didn’t design for self-help. We’d have to intentionally design the UX we want and then augment the product to deliver it.
The
dotnet list
direction looks good. We’d also want a variant that was a complete spew of data to be used for support purposes. This is the analog todocker inspect
(which I use a fair bit).docker inspect
works the opposite direction. It starts with a huge bag of data and then enables various experiences for chopping it down to what you want. I think that’s the “better way”. It prioritizes richness of data over experience and then transitions the discussion away from fidelity to UX.