Skip to content
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

How does --target-framework-override work? The templates suggest it should be --TargetFrameworkOverride #3972

Closed
Thraka opened this issue Oct 1, 2021 · 1 comment
Labels
need-customer-info Requires feedback from author

Comments

@Thraka
Copy link

Thraka commented Oct 1, 2021

I can't understand why --target-framework-override is the acceptable parameter with dotnet new console. According to the template:

  "symbols": {
    "TargetFrameworkOverride": {
      "type": "parameter",
      "description": "Overrides the target framework",
      "replaces": "TargetFrameworkOverride",
      "datatype": "string",
      "defaultValue": "",
      "displayName": "Target framework override"
    },

The parameter should be --targetframeworkoverride, yet when you try that, it gives an error stating the parameter doesn't exist. Can someone explain this?

@vlada-shubina
Copy link
Member

@Thraka

It is possible to define short (with -) and long (with --) option override in dotnetcli.host.json file located along with template.json

{
  "$schema": "http://json.schemastore.org/dotnetcli.host",
  "symbolInfo": {
    "TargetFrameworkOverride": {
      "isHidden": "true",
      "longName": "target-framework-override",
      "shortName": ""
    },

For most of .NET templates, the host file is defining the long name override for TargetFrameworkOverride as target-framework-override. Also it hides it from help output.
We also have an issue to discuss usage of this parameter in next releases, please note that it might be removed.

@vlada-shubina vlada-shubina added the need-customer-info Requires feedback from author label Oct 4, 2021
@bekir-ozturk bekir-ozturk reopened this Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-customer-info Requires feedback from author
Projects
None yet
Development

No branches or pull requests

3 participants