S E L L C O R P

Microsoft Enhances .NET Community Toolkit with .NET 8 and NativeAOT Capabilities -

Microsoft Enhances .NET Community Toolkit with .NET 8 and NativeAOT Capabilities

August 31, 2024 Garnet Comments Off

Microsoft has rolled out version 8.3 of its .NET Community Toolkit, introducing substantial updates, including support for .NET 8 and NativeAOT across all included libraries. This release also brings notable improvements in performance and resolves several bugs.

Key Highlights of the 8.3 Update

Released on August 27, the latest version of the .NET Community Toolkit—a successor to the Windows Community Toolkit—offers a robust set of tools, extensions, and APIs that cater to .NET developers, regardless of the user interface platform they work with. This platform-agnostic toolkit has its source code available on GitHub for developers to explore and contribute to.

With the arrival of version 8.3, Microsoft has ensured that APIs in all toolkit packages are fully compatible with trimming and AOT scenarios. This enhancement guarantees that the toolkit functions seamlessly, even in complex environments that require trimming or Ahead-of-Time (AOT) compilation.

One of the significant additions in this release is the inclusion of the net8.0-windows10.0.17763.0 target framework in the MVVM Toolkit. This addition ensures that the toolkit remains trim and AOT-compliant when used with the WinAppSDK (WinUI 3). By supporting this target, Microsoft has made sure that all types marshaled to WinRT have the necessary interop code generated, ensuring smooth operations.

Performance Enhancements and Bug Fixes

The 8.3 version of the toolkit also focuses on performance optimization, particularly within the MVVM toolkit. Microsoft has worked to ensure that the INotifyPropertyChanging interface operates on a pay-for-play basis. This means that when the interface is not required, there will be no extra performance overhead. Furthermore, if the property is set to false, all related code within the ObservableObject class will be removed during the trimming process.

Several bugs were addressed in this update. For instance, an issue where the OnPropertyChanging methods were not triggered for dependent properties when using the [NotifyPropertyChangedFor] attribute has been corrected. Additionally, the ObservableValidator.HasError property will no longer be automatically displayed in table views for frameworks that dynamically generate columns from declared properties.

Looking Back and Moving Forward

This latest release builds on the foundation laid by version 8.2, which was launched last year. Version 8.2 also introduced new features for the MVVM Toolkit and enhanced the performance of MVVM source generators. With the continuous improvements and new features in version 8.3, Microsoft demonstrates its commitment to evolving the .NET Community Toolkit to meet the growing needs of developers.