-
Notifications
You must be signed in to change notification settings - Fork 5k
dotnet --info #2983
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
Comments
Yes the host information (actually hostfxr.dll, not dotnet.exe) is usually not that important as we always pick the latest. We could just remove it. However, listing the available runtimes and sdks, like How about this (shown how it would appear without SDK, or if an SDK is selected, after that information)
p.s. I just added that aka.ms download link. I'll remove it if we don't go with it. |
@KathleenDollard PTAL. Thanks |
Working on the SDK installed version was on my urgent list. I love this. If SDK's are installed, can you tell me what that will look like? You have "ASPNETCore.All" which I assume is the new metapackage. Do you know who is involved with versioning that 1.0.1 (if that is from preview)? Do you feel attached to the text of the host? I think this text is just confusing to programmers. Do we have sufficient linkage between the host and the default (no global.json) runtime that we could use a label that identified this as the default runtime? I love that we will be able to list installed runtimes!!! |
I am not sure what the released name and version of the ASP metapackage(s) will be. ASPNETCore.All is an existing metapackage that was used during prototyping of the multi-layer framework feature. I believe they plan on having two additional layers \ metapackages - one for internal assemblies, and another for external dependencies and thus may not even use ASPNETCore.All. cc @natemcmaster @davidfowl
I just left the "host" text as-is. That "host" version is just the hostfxr.dll (which sits in-between dotnet.exe and the runtime's hostpolicy.dll), and there is no guarantee of a 1:1 between that version and the runtime's version. Also note that the runtime selection is not affected by global.json, only the SDK selection. Also there is really no such thing as a "default runtime". In order to get the version of the runtime that will be used, we need to know the app (the myapp.dll), since the app's runtimeconfig.json determines which runtime to select. We could add a new option something like this: Here's a help example with some SDKs installed:
IMO the "Product Information" on the top is somewhat vague; perhaps it should say "SDK Information" |
Starting in ASP.NET Core 2.1.0-preview1, we plan to have two shared frameworks.
.All depends on .App. |
@steveharter Could you sort these both here and in --list-runtimes and --list-sdks? |
What does "Product Version" mean here? Base Path here (the only thing we know people are using) does not reflect global.json, correct? Why do we have both builds and hashes here? Does info always come from the host, not the SDK? |
I'm hoping we won't fall back into a 1.0 series as I think that would be quite confusing. |
I'm struggling for a better suggestion for "Microsoft .NET Core Shared Framework Host" I believe the only word there that contributes to meaning is the word "Host". I understand this to be important for support, and since it might not be the same as the runtime, I don't want to remove it and undermine support in that weird situation. But the current name is confusing. I wonder if shortening it to just dotnet Host would make things better or worse. |
Would nesting help make the list more readable?
|
Part of me thinks this shouldn't be part of --info but I can see the appeal because it's easier. Ideally we'd have CRUD commands for manipulating both runtime and SDK. |
Sort in what way? Alphabetically? Currently they are just taken from raw directory-read commands, so yeah that might not be sorted alphabetically all the time. Also Nate proposed a different way to sort
It's "SDK Version"
Base Path will show no matter if there's a global.json or not. If global.json exists, the SDK version there should match the version in Base Path.
I'm not sure on the relevance of hashes here.
The information above |
I'm open for changing that for |
I'm going to vote against nesting. I think if we just sort alphabetically they are going to come out in a sane order and be easy to visually parse. I don't think this iteration of --info is going to be perfect or the last, we just need it to suck less and reflect the new version numbers decently. I'm still confused by the SDK and base path. Maybe someone on the SDK is going to have to answer how global.json Edit: On global.json: I ran the tests and they are reflected in my most recent cli comments. |
This issue is associated with a similar issue in dotnet/cli Both remain as probably work will occur in both repos. |
I don't think you should prioritize script-parsability over human readability. Script-parsability is good, but the info will typically be used by humans trying to figure out what's install. Scripting support is better solved by producing a truly machine-readable format. Other tools such docker and vswhere.exe support a
Example: try this: PS> (& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -prerelease -format json | ConvertFrom-Json).installationPath |
So let's keep this issue for just the information the host gathers:
|
If we have a better format for As far as parsing Also assuming we are adding |
Base Path is just the SDK installed location. I suppose it's called "Base" because there are also other locations like the |
Sorry Steve, I wind up putting this only in the other repo. I agree with the data, I'm struggling with the headings:
Is adding JSON format realistic in your timeframe? I know that some folks like XML better, but is there a compelling reason for both (or for XML over JSON) @natemcmaster |
There may be an implementation reason to choose JSON - the dotnet host already has the "casablanca" JSON library baked in. I have a slight preference for JSON. My primary use case for this would be in bash and powershell scripts. |
JSON by default would be less readable. If we want to add a an option like |
Completely agree default has to be human friendly. We need to do the same thing host and CLI. @livarcocc for CLI |
Is everyone good with the long ugly build number instead of the hash? |
Sorry, not sure I understand the context. Can you elaborate? |
If you type dotnet --info today, you get
for the SDK and
for the host. I would like to be consistent and just randomly chose the second style. Is that good with folks? |
If there are no SDKs installed:
If there are no runtimes installed:
|
Steps to reproduce
type
dotnet --info
with no SDK installed.Expected behavior
To get the version information about the .NET Runtime
Actual behavior
I get
I'm not sure how this is useful. The version is good as long as the host and runtime are always in lockstep but I'm pretty sure people are looking for the runtime version here. Do we need a --version switch on the host?
Environment data
The text was updated successfully, but these errors were encountered: