Skip to content

Blazor based templates not adhering to modifiers #1942

Closed
@isaacrlevin

Description

@isaacrlevin

I am updating the Blazor templates for 3.0 and I am running across an issue when I dotnet new the new template I created. I created a new options called hosted that will toggle whether or not the Blazor Web Assembly project should use an ASP.NET Core backend.

dotnetcli.host.json

      "Hosted": {
        "longName": "hosted"
      }

Symbol

    "Hosted": {
      "type": "parameter",
      "datatype": "bool",
      "defaultValue": "false",
      "description": "Whether to use ASP.NET Core Hosted Backend."
    }

Modifiers

           "condition": "(!Hosted)",
          "exclude": [
            "BlazorHosted-CSharp/Server/**",
            "BlazorHosted-CSharp/Shared/**"
          ]
        },
        {
          "condition": "(Hosted)",
          "exclude": [
            "BlazorHosted-CSharp/Client/wwwroot/sample-data/**"
          ]
        }

So basically if hosted is false, I should only have one project generated. This is not working, though I assume I may be doing something wrong. I talked with @seancpeters and he mentioned it may be an issue, so I am tracking here.

Metadata

Metadata

Assignees

Labels

size:3.0triagedThe issue was evaluated by the triage team, placed on correct area, next action defined.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions