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.16k stars 9.92k forks source link

Modify the Blazor Web App template #53381

Open javiercn opened 7 months ago

javiercn commented 7 months ago

Discussed in https://github.com/dotnet/aspnetcore/discussions/52853

Originally posted by **kevon-vems** December 16, 2023 The default template for Blazor Web App contains boilerplate code, samples for Counter and Weather. We all know and love these. However, they're the first thing to go when using this template as a starting point for creating a real website. The template uses the Counter to load additional assemblies. If you remove the Counter, it is not intuitive that you need to replace Counter with something else, and further not intuitive what that might be. If you alter the template to use the MainLayout instead, it would make removing the counter more straight forward, and generally make it so you would never need to change the AddAdditionalAssemblies(typeof(THING).Assembly) ever again. If someone could point me at where the template lives, I'd happily create the PR myself. Change ``` app.MapRazorComponents() .AddInteractiveServerRenderMode() .AddInteractiveWebAssemblyRenderMode() .AddAdditionalAssemblies(typeof(Counter).Assembly); ``` to ``` app.MapRazorComponents() .AddInteractiveServerRenderMode() .AddInteractiveWebAssemblyRenderMode() .AddAdditionalAssemblies(typeof(MainLayout).Assembly); ```
ghost commented 7 months ago

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

MattyLeslie commented 4 months ago

Looking at the comments on https://github.com/dotnet/aspnetcore/discussions/52853, it seem's this may have been completed?