BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Releases .NET 8 Preview 6

Microsoft Releases .NET 8 Preview 6

Earlier this month, Microsoft released the sixth preview of .NET 8. The new version of the framework, expected to be released later this year, will be a Long Term Support (LTS) release. This preview brings performance improvements and features such as a new WASM mode, more source generators, library updates, and NativeAOT support on iOS.

One of the most important features in this preview is related to the System.Text.Json source generator. Native AOT gets a significant boost, aiming to align it with the capabilities of reflection-based serializers. Among the improvements are the enhanced caching for the incremental generator, ensuring smoother IDE performance for large projects. The formatting of source-generated code was also refined, and new diagnostic warnings were added to the generator. Other improvements include fixing a number of bugs, including the ones related to supporting recursive collection types and nullable structs.

The introduction of JsonStringEnumConverter<TEnum> provides a complementary feature to the existing JsonStringEnumConverter class. Also, the new nullable property JsonConverter.Type allows developers to query for the type of a non-generic JsonConverter instance. This release also brings new overloads for ZipFile methods, emphasizing efficient disk usage.

There were also relevant enhancements in source generators and logging. The new options validation source generator is aimed at reducing startup overhead and improving the validation feature set. The LoggerMessageAttribute constructor also received new overloads for additional flexibility. The source generator to provide AOT configuration in ASP.NET Core, introduced in Preview 3, was also improved.

Other features in this release include more accurate metric and timestamp recordings in MetricCollector (formerly InstrumentRecorder), a new source generator for COM interoperability, support for the SHA-3 primitives, and changes to the generated image defaults for .NET 8 apps aimed at security and performance. The new HybridGlobalization mode on WASM allows globalization data to be partially pulled from ICU bundle and partially from calls into JS, leveraging the Web API and providing a lighter ICU bundle.

Finally, it is now possible to target iOS-like platforms with NativeAOT. Both .NET iOS and MAUI applications can now be built and run on ios, iossimulator, maccatalyst, tvos, and tvossimulator systems, opening up new opportunities for better performance and size savings. It is important to notice, however, that this feature is currently only available as an opt-in feature. Mono is still the default runtime choice for app development and deployment.

You can also find other improvements related to ASP.NET Core in this preview here. .NET 8 Preview 6 is available for Linux, macOS, and Windows.

 

About the Author

Rate this Article

Adoption
Style

BT