question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 #32471

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Tratchercommented, Jun 29, 2021
0reactions
DamianEdwardscommented, Jul 7, 2021

Fixed in #7699bab0fc5b1451272c7873af45990932d3d148

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found