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

Enable template author to select the default framework to be used #8

Open
RehanSaeed opened this issue Nov 3, 2020 · 5 comments
Open

Comments

@RehanSaeed
Copy link

RehanSaeed commented Nov 3, 2020

In my template.json file I default the Framework to use netstandard2.1 (see below), however the UI always shows netcoreapp3.1 by default and the drop down does not actually contain the list of target frameworks that I've listed below.

    "Framework": {
      "type": "parameter",
      "description": "The target framework for the project.",
      "datatype": "choice",
      "choices": [
        {
          "choice": "net5.0",
          "description": ".NET 5 (net5.0)"
        },
        {
          "choice": "netstandard2.1",
          "description": ".NET Standard 2.1 (netstandard2.1)"
        },
        {
          "choice": "netstandard2.0",
          "description": ".NET Standard 2.0 (netstandard2.0)"
        },
        {
          "choice": "netcoreapp3.1",
          "description": ".NET Core 3.1 (netcoreapp3.1) - Long Term Support (LTS)"
        },
        {
          "choice": "netcoreapp3.0",
          "description": ".NET Core 3.0 (netcoreapp3.0)"
        },
        {
          "choice": "netcoreapp2.2",
          "description": ".NET Core 2.2 (netcoreapp2.2)"
        },
        {
          "choice": "netcoreapp2.1",
          "description": ".NET Core 2.1 (netcoreapp2.1) - Long Term Support (LTS)"
        }
      ],
      "replaces": "netstandard2.1",
      "defaultValue": "netstandard2.1"
    },

image

Ideally, the UI should pick up the list from the choices array and respect the defaultValue in the template.json.

@RehanSaeed RehanSaeed changed the title The Target Framework The Target Framework Always Defaults to netcoreapp3.1 Nov 3, 2020
@sayedihashimi
Copy link
Owner

I think the default framework is picked by the IDE. I'm not sure if we have the capability for this yet.

The main developer for this area is currently out of office, I will discuss with him when he is back.

@sayedihashimi sayedihashimi changed the title The Target Framework Always Defaults to netcoreapp3.1 Enable template author to select the default framework to be used Nov 3, 2020
@sayedihashimi
Copy link
Owner

FYI I changed the title

@RehanSaeed
Copy link
Author

Do we still require the Framework symbol in 16.9 or 16.10?

@sayedihashimi
Copy link
Owner

I think that fix is going into 16.10

@RehanSaeed
Copy link
Author

RehanSaeed commented Nov 5, 2021

It seems that if I specify a Framework symbol, it uses that now and VS 2022 hides the drop down on the previous screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants