dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.5k stars 10.04k forks source link

Razor component item template uses wrong extension #10945

Closed SteveSandersonMS closed 5 years ago

SteveSandersonMS commented 5 years ago

Steps:

  1. In VS solution explorer, right-click on a folder inside a Blazor project (e.g., the Pages folder) and choose Add -> Item
  2. From the dialog, choose Razor Component

Expected: Prompted file extension should be .razor Actual: It's .cshtml

Sidenote: It would be great if the Razor Component item template also appeared in the initial context menu alongside Razor Page and Controller

image

NTaylorMullen commented 5 years ago

@ryanbrandenburg do we control this?

ryanbrandenburg commented 5 years ago

No clue. I thought it might be controlled by something in https://github.com/aspnet/Scaffolding but I don't see any evidence of that. You'll have to find someone on the VS tooling team.

NTaylorMullen commented 5 years ago

@seancpeters Do you happen to know who controls this?

phenning commented 5 years ago

As to the first question about the incorrect default filename for Razor Component, I checked in a fix to the vstemplate file stub for that template yesterday. It should flow into Visual Studio builds in the next few days.

In regards to the sidenote, this is something that would need to be implemented in the VS Web Tools component.

mkArtakMSFT commented 5 years ago

Thanks @phenning!