Microsoft has unveiled version 8.3 of the .NET Community Toolkit, a significant update that introduces support for .NET 8 and NativeAOT across all libraries, along with a range of performance enhancements. Released on August 27, this update expands the toolkit’s capabilities, ensuring that developers can leverage the latest features of .NET 8 while benefiting from better performance and improved compatibility with NativeAOT, which compiles code ahead of time for more efficient execution.
The .NET Community Toolkit is a platform-agnostic successor to the Windows Community Toolkit. It offers a variety of helpers, extensions, custom controls, and APIs for .NET developers, without being tied to any specific UI platform. This flexibility makes it a versatile tool for .NET developers across different environments. The source code for the toolkit is open-source and available on GitHub, allowing the community to contribute and benefit from the latest improvements.
In the 8.3 update, Microsoft has taken steps to ensure that all APIs in the toolkit are fully compatible with trimming and ahead-of-time (AOT) compilation, making the toolkit more efficient in scenarios where these features are used. This is especially important for developers working with .NET 8, as it guarantees that applications using the toolkit will run smoothly and efficiently when utilizing trimming or AOT features. Additionally, the MVVM Toolkit now supports the net8.0-windows10.0.17763.0 target, ensuring full compatibility with WinAppSDK (WinUI 3). This update ensures that all types marshaled to WinRT will have the necessary interop code generated, further enhancing compatibility with modern Windows applications.
Performance improvements are another highlight of the 8.3 update, particularly for the MVVM Toolkit. Microsoft focused on optimizing the support for INotifyPropertyChanging, making it a “pay-for-play” feature. This means that when INotifyPropertyChanging is not needed, no additional overhead will be incurred. If the feature is not in use, all associated code in ObservableObject will be trimmed out, leading to better performance in applications. Additionally, the update includes several bug fixes, such as resolving an issue where OnPropertyChanging methods were not invoked for dependent properties using the [NotifyPropertyChangedFor] attribute. The ObservableValidator.HasError property will also no longer appear automatically in dynamically generated table views, improving the toolkit’s overall functionality.