Skip to content

Update ASP.NET Core C# project templates to use new minimal hosting APIs in .NET 6 #33944

@DamianEdwards

Description

@DamianEdwards

The ASP.NET Core project templates included in the SDK should be updated to use the new minimal hosting APIs introduced in .NET 6 as they represent the new idiomatic way to bootstrap (configure and start) the relevant host for the majority of scenarios.

  • The CreateHostBuilder method would be removed as the patterns that were previously reliant on this are no longer necessary
  • The Startup class would be removed and its contents applied as applicable to the calls to WebApplicationBuilder in Program.cs
  • Change to Blazor WebAssembly hosted templates tracked in Update blazorwasm-hosted templates to use minimal host #32471

Metadata

Metadata

Assignees

Labels

User StoryA single user-facing feature. Can be grouped under an epic.area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-minimal-hostingfeature-templates

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions