You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
help command shouldn't emit error messages as if I'm running the command #323
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.0-rc4-004788
@mlorbetske@sayedihashimi
For this situation, I'm thinking we should show help for the specific template if either:
The template specification is unambiguous within the current context.
The template specification is unambiguous ignoring context. But when the context is wrong, we should still show the context mismatch message - the first output in the screenshot.
In the release following RTW, contexts will no longer switch implicitly but can be set explicitly via --type {project/item/other}.
While this error message will still show, it will only show in a case where a project template or item template is selected but has been explicitly filtered out. The list of templates that are valid in the context will also be shown instead of the empty grid.
@mlorbetske I don't quite understand the change you're describing, but I don't get why I'd still get the error. I shouldn't get the error if what I'm requesting is to see help.
With the change, dotnet new mvc -h will not produce an error no matter what directory you're in. This is because we've removed the automatic switching of "contexts" where we'd go into showing/using item templates (gets rid of the confusing circumstance where dotnet new web executed twice in the same place has different results). This filtering is now explicit, so you can specify dotnet new --list --type project or dotnet new --list --type item to see just project templates or item templates respectively. Now, if you combine the type switch and a template instead of the list switch, let's say "dotnet new mvc --type item --help", you'll see an error that says that mvc is not an item template & to try again without the --type switch.
Activity
seancpeters commentedon Feb 15, 2017
@mlorbetske @sayedihashimi
For this situation, I'm thinking we should show help for the specific template if either:
Thoughts?
mlorbetske commentedon Feb 25, 2017
In the release following RTW, contexts will no longer switch implicitly but can be set explicitly via
--type {project/item/other}.While this error message will still show, it will only show in a case where a project template or item template is selected but has been explicitly filtered out. The list of templates that are valid in the context will also be shown instead of the empty grid.
mairaw commentedon Mar 1, 2017
@mlorbetske I don't quite understand the change you're describing, but I don't get why I'd still get the error. I shouldn't get the error if what I'm requesting is to see help.
mlorbetske commentedon Mar 1, 2017
With the change, dotnet new mvc -h will not produce an error no matter what directory you're in. This is because we've removed the automatic switching of "contexts" where we'd go into showing/using item templates (gets rid of the confusing circumstance where dotnet new web executed twice in the same place has different results). This filtering is now explicit, so you can specify dotnet new --list --type project or dotnet new --list --type item to see just project templates or item templates respectively. Now, if you combine the type switch and a template instead of the list switch, let's say "dotnet new mvc --type item --help", you'll see an error that says that mvc is not an item template & to try again without the --type switch.