ASP.NET Core 8.0 Preview.1



What's new in .NET 8:

            Welcome to .NET 8! The first preview is ready for you to download: claim your copy of the first .NET 8 preview and start building applications today. Scroll down to see the list of features included in this preview. .NET 8 is a long-term support (LTS) release.  .NET 8 preview and release candidate builds will be delivered monthly. As usual, the final release will be delivered sometime in November at .NET Conf.

ASP.NET Core Runtime 8.0.0-preview.1

            The ASP.NET Core Runtime enables you to run existing web/server applications. On Windows, we recommend installing the Hosting Bundle, which includes the .NET Runtime and IIS support.

.NET Desktop Runtime 8.0.0-preview.1

            The .NET Desktop Runtime enables you to run existing Windows desktop applications. This release includes the .NET Runtime; you don't need to install it separately.

System.Text.Json serialization

Various improvements have been made to System.Text.Json serialization and deserialization functionality.

  • Performance and reliability enhancements of the source generator when used with ASP.NET Core in Native AOT apps.

  • The source generator now supports serializing types with required and init properties. These were both already supported in reflection-based serialization.

  • Customize handling of members that aren't in the JSON payload.

  • Support for serializing properties from interface hierarchies. The following code shows an example where the properties from both the immediately implemented interface and its base interface are serialized.

Performance-focused types

.NET 8 introduces several new types aimed at improving app performance.

  • The new System.Collections.Frozen namespace includes the collection types FrozenDictionary<TKey, TValue> and FrozenSet<T>. These types don't allow any changes to keys and values once a collection created. That requirement allows faster read operations (for example, TryGetValue()). These types are particularly useful for collections that are populated on first use and then persisted for the duration of a long-lived service.

Code generation

.NET 8 includes improvements to code generation and just-in time (JIT) compilation:

  • Arm64 performance improvements
  • SIMD improvements
  • Cloud-native improvements
  • Profile-guided optimization (PGO) improvements
  • Support for AVX-512 ISA extensions
  • JIT throughput improvements
  • Loop and general optimizations.

.NET container images

The following changes have been made to .NET container images for .NET 8:

  • The container images now use Debian 12 (Bookworm). Debian is the default Linux distro in the .NET container images.

  • Images include a non-root user. This user makes the images non-root capable. To run as non-root, add the following line at the end of your Dockerfile (or a similar instruction in your Kubernetes manifests):

  • Binary incompatible - When run against the new runtime or component, existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.

  • Source incompatible - When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.

  • Behavioral change - Existing code and binaries may behave differently at run time. If the new behavior is undesirable, existing code would need to be updated and recompiled.

New behavior

Starting in .NET 8, when writing to a FileStream whose underlying pipe is closed or disconnected, the write fails and an IOException is thrown.




Comments

Popular posts from this blog

Angular 15 Update Upcoming

ChatGPT

Azure Cosmos DB