{"id":37432,"date":"2021-11-08T01:50:23","date_gmt":"2021-11-08T08:50:23","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=37432"},"modified":"2021-11-08T09:17:41","modified_gmt":"2021-11-08T16:17:41","slug":"announcing-asp-net-core-in-net-6","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-asp-net-core-in-net-6\/","title":{"rendered":"Announcing ASP.NET Core in .NET 6"},"content":{"rendered":"<p>.NET 6 is now <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-6\/\">released<\/a>! ASP.NET Core in .NET 6 includes everything you need to build rich modern web UI and powerful back-end services.<\/p>\n<h2>What&#8217;s new?<\/h2>\n<p>Here&#8217;s a sampling of the great new features and improvements in ASP.NET Core for .NET 6:<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/tooling#net-hot-reload\">Hot reload<\/a><\/strong>: Apply changes to Razor, C#, and CSS source files into your running app during development without the need to rebuild and restart the app.<\/li>\n<li><strong>Minimal APIs<\/strong>: Create a new ASP.NET Core app with just a few lines of code using the latest C# features and a simplified hosting model.<\/li>\n<li><strong>Async streaming<\/strong>: Asynchronously stream data from the server without any need for buffering.<\/li>\n<li><strong>IAsyncDisposable<\/strong>: Support for <code>IAsyncDisposable<\/code> on controllers, page models, and view components.<\/li>\n<li><strong>Bootstrap 5.1<\/strong>: ASP.NET Core now comes with integrated Bootstrap 5.1 support.<\/li>\n<li><strong>Null-state analysis<\/strong>: All ASP.NET Core templates now have C# null-state analysis enabled by default.<\/li>\n<li><strong><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/razor-pages\/#css-isolation\">CSS isolation for pages and views<\/a><\/strong>: Scope CSS styles to specific pages or views using <em>.cshtml.css<\/em> files.<\/li>\n<li><strong><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/javascript-interoperability\/#load-a-script-from-an-external-javascript-file-js-collocated-with-a-component\">JavaScript modules<\/a><\/strong>: Place related JavaScript modules alongside pages, views, and components using <em>.cshtml.js<\/em> and <em>.razor.js<\/em> files.<\/li>\n<li><strong>Blazor improvements<\/strong>:\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/components\/#render-razor-components-from-javascript\">Render components from JavaScript<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/components\/prerendering-and-integration#preserve-prerendered-state\">Preserve prerendered state<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/fundamentals\/handle-errors#error-boundaries\">Error boundaries<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/components\/event-handling#custom-event-arguments\">Custom event args<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/components\/templated-components#infer-generic-types-based-on-ancestor-components\">Infer generic type parameters from ancestor components<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/components\/#component-parameters\">Required component parameters<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/fundamentals\/routing#query-strings\">Handle query string parameters<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/components\/control-head-content\">Control HTML head content<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/fundamentals\/startup#javascript-initializers\">JavaScript initializers<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/components\/dynamiccomponent\">Dynamically render components<\/a><\/li>\n<\/ul>\n<\/li>\n<li><strong><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/blazor\/host-and-deploy\/webassembly#ahead-of-time-aot-compilation\">.NET WebAssembly build tools<\/a><\/strong>: Ahead-of-time (AOT) compilation for Blazor WebAssembly apps, as well as support for runtime relinking and native dependencies.<\/li>\n<li><strong>Single-page apps<\/strong>: Built-in support for Angular 12 and React 17 based on a flexible template pattern that can be used with other popular frontend JavaScript frameworks.<\/li>\n<li><strong>Socket control<\/strong>: More control over socket creation and handling.<\/li>\n<li><strong>Strongly-typed headers<\/strong>: Accessing HTTP headers in a strongly-typed way.<\/li>\n<li><strong><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/fundamentals\/http-logging\">HTTP<\/a> &amp; <a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/fundamentals\/w3c-logger\">W3C logging<\/a><\/strong>: Log HTTP traffic, and log using the W3C Extended Log File Format.<\/li>\n<li><strong><a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/fundamentals\/servers\/kestrel\/http3\">HTTP\/3 (Preview)<\/a><\/strong>: Preview of server support for HTTP\/3 based on the new QUIC transport.<\/li>\n<\/ul>\n<p>For a full list of everything that&#8217;s new in ASP.NET Core in .NET 6, check out the <a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/release-notes\/aspnetcore-6.0\">ASP.NET Core in .NET 6 release notes<\/a>.<\/p>\n<h2>Get started<\/h2>\n<p>To get started with ASP.NET Core in .NET 6, <a href=\"https:\/\/dotnet.microsoft.com\/download\">install the .NET 6 SDK<\/a>. .NET 6 is also included with Visual Studio 2022. Mac users should use the latest Visual Studio 2022 for Mac preview.<\/p>\n<h2>Upgrade an existing project<\/h2>\n<p>To upgrade an existing ASP.NET Core app from .NET 5 to .NET 6, follow the steps in <a href=\"https:\/\/docs.microsoft.com\/aspnet\/core\/migration\/50-to-60\">Migrate from ASP.NET Core 5.0 to 6.0<\/a><\/p>\n<p>To upgrade an existing ASP.NET Core app from .NET 6 RC2 to .NET 6, update all package references to <code>6.0.0<\/code>.<\/p>\n<p>That&#8217;s it! You should be all set to enjoy the benefits of .NET 6.<\/p>\n<p>See also the full list of <a href=\"https:\/\/docs.microsoft.com\/dotnet\/core\/compatibility\/6.0\">breaking changes<\/a> in ASP.NET Core for .NET 6.<\/p>\n<h2>Join us for the .NET 6 release at .NET Conf 2021<\/h2>\n<p>Come celebrate with us and learn all about the .NET 6 release at <a href=\"https:\/\/dotnetconf.net\">.NET Conf 2021<\/a>, a FREE, three day virtual developer event with over 80 sessions featuring speakers from the .NET team and the broader .NET community. The conference starts tomorrow and goes from November 9-11. We hope you can join us!<\/p>\n<h2>Azure Functions, Web Apps, and Static Web Apps support .NET 6<\/h2>\n<p>Azure App Service teams have been working around the clock to make sure .NET 6 is supported across your favorite Azure PaaS services like Web Apps and Functions, so you don&#8217;t have to wait to deploy. At the time of this post, .NET 6 is being actively deployed to the worldwide network of servers and configured to build and run .NET 6 apps.<\/p>\n<p>For more information on the various Azure services and their roll-out of supporting .NET 6, which should conclude by the end of this week, see the following links:<\/p>\n<ul>\n<li>Azure Functions now supports <a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2178604\">running serverless functions in .NET 6<\/a><\/li>\n<li>The <a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2178304\">App Service .NET 6 GA Announcement<\/a> has information and details for ASP.NET Core developers excited to get going with .NET 6 today. One thing to note &#8211; if you&#8217;re already running a .NET 6 preview build on App Service, your app will be auto-updated on the first restart once the .NET 6 runtime and SDK are deployed to your region &#8211; you don&#8217;t have to rebuild or do anything, it&#8217;ll just update if you&#8217;re not running a self-contained app.<\/li>\n<li>Azure Static Web Apps now supports <a href=\"https:\/\/go.microsoft.com\/fwlink\/?linkid=2178605\">full-stack .NET 6 applications with Blazor WebAssembly frontends and Azure Function APIs<\/a><\/li>\n<\/ul>\n<p>We&#8217;re sure you&#8217;ll enjoy the immediate availability of Azure App Service to run your ASP.NET Core and Serverless .NET apps. And don&#8217;t forget to try using <a href=\"https:\/\/azure.microsoft.com\/services\/container-apps\/\">Azure Container Apps<\/a> if you&#8217;re keen on building some background microservices using the <a href=\"https:\/\/docs.microsoft.com\/dotnet\/core\/extensions\/workers\">.NET Core Worker Service<\/a> template, too.<\/p>\n<h2>Thank you!<\/h2>\n<p>Thank you to everyone in the community who helped make this release of .NET 6 possible! This release represents the culmination of many GitHub issues, pull requests, design feedback comments and documentation updates contributed by many members of the .NET community. We couldn&#8217;t have made it to this point without you!<\/p>\n<p>We hope you enjoy this release of ASP.NET Core in .NET 6. We&#8217;re eager to hear about your experiences building with it. Let us know about your creative efforts on <a href=\"https:\/\/github.com\/dotnet\/aspnetcore\/issues\">GitHub<\/a>.<\/p>\n<p>Thanks again, and happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>.NET 6 is now available! Check out all the new features and improvements in ASP.NET Core in .NET 6.<\/p>\n","protected":false},"author":417,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,197,7509,327,7251],"tags":[],"class_list":["post-37432","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-aspnet","category-aspnetcore","category-azure","category-blazor"],"acf":[],"blog_post_summary":"<p>.NET 6 is now available! Check out all the new features and improvements in ASP.NET Core in .NET 6.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/37432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/417"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=37432"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/37432\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=37432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=37432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=37432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}