![]() |
|
ASP.NET Core Updates in .NET 5 Preview 7 - Printable Version +- Sick Gaming (https://sickgaming.net) +-- Forum: Programming (https://sickgaming.net/forum-76.html) +--- Forum: C#, Visual Basic & .NET (https://sickgaming.net/forum-79.html) +--- Thread: ASP.NET Core Updates in .NET 5 Preview 7 (/thread-97161.html) |
ASP.NET Core Updates in .NET 5 Preview 7 - xSicKxBot - 09-10-2020 ASP.NET Core Updates in .NET 5 Preview 7 Sourabh July 21st, 2020 .NET 5 Preview 7 is now available and is ready for evaluation. Here’s what’s new in this release:
Get started To get started with ASP.NET Core in .NET 5 Preview 7 install the .NET 5 SDK. You need to use Visual Studio 2019 16.7 Preview 5 or newer to use .NET 5 Preview 7. .NET 5 is also supported with the latest preview of Visual Studio for Mac. To use .NET 5 with Visual Studio Code, install the latest version of the C# extension. Upgrade an existing project To upgrade an existing ASP.NET Core app from .NET 5 Preview 6 to .NET 5 Preview 7:
See the full list of breaking changes in ASP.NET Core for .NET 5. Upgrade existing Blazor WebAssembly projects To upgrade an existing Blazor WebAssembly project, update the following properties: From Code: <TargetFramework>netstandard2.1</TargetFramework>
<RazorLangVersoin>3.0</RazorLangVersion>To Code: <TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<UseBlazorWebAssembly>true</UseBlazorWebAssembly>Also, remove any package references to Code: Microsoft.AspNetCore.Components.WebAssembly.BuildWhat’s new? Blazor WebAssembly apps now target .NET 5 Blazor WebAssembly 3.2 apps have access only to the .NET Standard 2.1 API set. With this release, Blazor WebAssembly projects now target .NET 5 ( Code: net5.0Code: PlatformNotSupportedExceptionUpdated debugging requirements for Blazor WebAssembly To enable debugging of Blazor WebAssembly apps in Visual Studio Code, you previously needed to install the JavaScript Debugger (Nightly) extension. This is no longer required as the JavaScript debugger extension is now shipped as part of VS Code. If you’ve previously installed the JavaScript Debugger (Nightly) extension you can now uninstall it. Enabling the preview version of the JavaScript debugger through the Visual Studio Code settings is still required. Blazor accessibility improvements The built-in Blazor input components that derive from Code: InputBaseCode: aria-invalidBlazor performance improvements One of the major areas of investment for Blazor WebAssembly in .NET 5 is improving runtime performance. This is a multifaceted effort. Below are some of the high-level areas being optimized:
Improving Blazor WebAssembly runtime performance for .NET 5 in an ongoing effort. This release contains some initial performance improvements, and we expect to share more details on the results of this performance work for future .NET 5 updates. Certificate authentication performance improvements We have added caching to certificate authentication in ASP.NET Core. Caching certificate validation significantly improves the performance of certificate authentication. Our benchmarks show a 400% improvement in requests per second once caching was enabled. You don’t need to make any changes to your app to take advantage of performance improvements; caching is on by default. There are options to tune or disable caching if you wish. Find out more about certificate authentication in ASP.NET Core in the docs. Sending HTTP/2 PING frames HTTP/2 has a mechanism for sending PING frames as a way of ensuring whether an idle connection is still functional. This is especially useful to have when working with long-lived streams that are often idle but only intermittently see activity (for example, gRPC streams). We have added the ability to send periodic PING frames in Kestrel by setting limits on Code: KestrelServerOptionsCode: public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.ConfigureKestrel(options => { options.Limits.Http2.KeepAlivePingInterval = TimeSpan.FromSeconds(10); options.Limits.Http2.KeepAlivePingTimeout = TimeSpan.FromSeconds(1); }); webBuilder.UseStartup<Startup>(); });Building upon new API introduced in Code: System.Net.SocketsCustom header decoding in Kestrel We added the ability to specify which Code: System.Text.EncodingCode: RequestHeaderEncodingSelectorCode: KestrelServerOptionsCode: public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.ConfigureKestrel(options => { options.RequestHeaderEncodingSelector = encoding => { switch (encoding) { case "Host": return System.Text.Encoding.Latin1; default: return System.Text.Encoding.UTF8; } }; }); webBuilder.UseStartup<Startup>(); });
Give feedback We hope you enjoy this release of ASP.NET Core in .NET 5! We are eager to hear about your experiences with this latest .NET 5 release. Let us know what you think by filing issues on GitHub. Thanks for trying out ASP.NET Core! |