question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent casing of template parameters

See original GitHub issue

Is 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.

https://github.com/dotnet/aspnetcore/blob/main/src/ProjectTemplates/Web.ProjectTemplates/content/GrpcService-CSharp/.template.config/template.json#L53

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:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

0reactions
JamesNKcommented, Dec 22, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found