Update ASP.NET Core C# project templates to use new minimal hosting APIs in .NET 6
See original GitHub issueThe 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 toWebApplicationBuilder
in Program.cs - Change to Blazor WebAssembly hosted templates tracked in #32471
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Tutorial: Create a minimal API with ASP.NET Core
Learn how to build a minimal API with ASP.NET Core. ... Overview; Prerequisites; Create an API project; Add NuGet packages; The model and ......
Read more >Migrate from ASP.NET Core 5.0 to 6.0
The new .NET 6 minimal hosting model for ASP.NET Core apps requires only one file and a few lines of code. Apps migrating...
Read more >Building Minimal APIs In .NET 6 - NET Core Tutorials
The 'dotnet new' templates in .Net 6 default to top level statement and implicit usings. If you don't want to use these features,...
Read more >Minimal APIs in .NET 6 — A Complete Guide(Beginners ...
Create a new Project. Create a new project using Visual Studio 2022 and select the “ASP.NET Core Empty” project template.
Read more >Migration to ASP.NET Core in .NET 6
The new project templates all use top-level statements, but these new hosting APIs can be used in any .NET 6 application to host...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
FYI @jmprieur @jennyf19
Fixed in #7699bab0fc5b1451272c7873af45990932d3d148