dotnet / dotnet/aspnetcore

ASP.NET Core Web App template should not have 2 short names defined

Open
#33,067 13 comments 0 reactions 2 assignees Assigned to @danroth27 View on GitHub
area-mvc breaking-change bug feature-templates
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

`dotnet new CLI` and template engine core is going to deprecate the support of having multiple short names for the template. We are cutting off from template.json schema shortly, but the template engine/dotnet new will still support it for a while (at least in .NET 6).

The main reason of this change is that short name is supposed to be unique, but names pool is limited and we don't want to encourage authors taking multiple names. @KathleenDollard can provide more details on it.
We made a discovery and identified that only ASP.NET Core Web App is using this feature (https://github.com/dotnet/aspnetcore/blob/028470e31304cde30aebacd44be2abc34ee99f62/src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/.template.config/template.json#L15-L18).

Please consider removing multiple names from ASP.NET Core Web App template.

Note that in case the multiple short names won't be removed since next .NET preview the template will be shown in the `dotnet new list` as following: https://github.com/dotnet/templating/pull/3191#issuecomment-845869363 as it has multiple short names defined. Previously only first name was shown in the list, which led to confusion as the user can instantiate the template with any of short names (i.e. `dotnet new webapp` and `dotnet new razor` are same commands), but due to `razor` was not listed it led to confusion why the template was instantiated successfully (see https://github.com/dotnet/templating/issues/3038 for more details).

I can make PR making the actual change, in case you confirm which one of short names you prefer to keep.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.