Inconsistent casing of template parameters
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Describe the bug
Template for grpc uses Framwork, which becomes --Framework
and -F
rather than --framework
and -f
that other templates use, e.g. console, mstest, winforms.
The settings are case-sensitive on purpose:
https://github.com/dotnet/templating/issues/3237 https://github.com/dotnet/templating/issues/3238
Expected Behavior
Please consider using, -f
framework.
Steps To Reproduce
C:\t\grpc1> dotnet --version
7.0.100-preview.2.22153.17
C:\t\grpc1> dotnet new grpc --help
ASP.NET Core gRPC Service (C#)
Author: Microsoft
Description: A project template for creating a gRPC ASP.NET Core service.
Usage:
dotnet new grpc [options] [template options]
Options:
-n, --name <name> The name for the output being created. If no name is specified, the name of the output directory is used.
-o, --output <output> Location to place the generated output.
--dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation.
--force Forces content to be generated even if it would change existing files.
--no-update-check Disables checking for the template package updates when instantiating a template.
-lang, --language <C#> Specifies the template language to instantiate.
--type <project> Specifies the template type to instantiate.
Template options:
-F, --Framework <net5.0|net6.0|net7.0|netcoreapp3.1> The target framework for the project.
Type: choice
net7.0 Target net7.0
net6.0 Target net6.0
net5.0 Target net5.0
netcoreapp3.1 Target netcoreapp3.1
Default: net7.0
Exceptions (if any)
No response
.NET Version
7.0.100-preview.2.22153.17
Anything else?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Template Template Arguments Inconsistent with Deduced ...
The issue with the function is that it matches against a template class that takes exactly 2 arguments. In reality, std::tuple has the ......
Read more >P1907R0: Inconsistencies with non-type template parameters
This is a case of both a type (A) and a type (B) inconsistency, because a pointer-to-member used as a class data member...
Read more >Inconsistent behavior for normal parameters when template is ...
Inconsistent behavior for normal parameters when template is renamed (metarunner -> template -> build configuration case). Relates to 1 ...
Read more >Inconsistent behavior between `{{ variables.secretVar}}` ...
We are trying to use Azure DevOps syntax for passing the environment variables to a script that uses those for uploading to `AWS`....
Read more >readability-inconsistent-declaration-parameter-name
In the case of multiple redeclarations or function template specializations, a warning is issued for every redeclaration or specialization inconsistent with ...
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
Ah, so the inconsistency is this is missing from grpc’s
dotnetcli.host.json
:https://github.com/dotnet/aspnetcore/blob/4966b6cc3d85117ab7fb0cdcbf1134be552f9a1d/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/.template.config/dotnetcli.host.json#L47-L49
gRPC is fixed (–Framework vs --framework)
I’ve renamed this issue to be generic to other templates with parameters than need to be looked at.