Microsoft has unveiled version 8.3 of the .NET Community Toolkit, marking a significant update that introduces support for .NET 8 and NativeAOT (Ahead of Time Compilation). This release brings enhancements to all libraries, ensuring a smoother experience for developers working with .NET 8 and improving performance across the toolkit. The update, announced on August 27, is a part of Microsoft’s ongoing efforts to evolve the platform-agnostic .NET Community Toolkit, which provides developers with a collection of helpers, extensions, custom controls, and APIs that are not tied to any specific UI platform. The source code for the toolkit remains accessible on GitHub, where developers can explore and contribute to its continued development.
One of the most notable features in this update is the full annotation of APIs across all toolkit packages to ensure compatibility with trimming and AOT scenarios. This enhancement allows the toolkit to work seamlessly in environments where only a minimal subset of code is included, such as in AOT compilation, which is crucial for performance-sensitive applications. Additionally, the MVVM Toolkit in version 8.3 introduces support for the net8.0-windows10.0.17763.0 target, making it fully compatible with WinAppSDK (WinUI 3). This ensures that all types that may be marshaled to WinRT (Windows Runtime) will have the appropriate interop code generated, improving overall compatibility and ease of use for developers working within the Windows ecosystem.
The update also brings notable performance improvements to the MVVM Toolkit. Specifically, there has been a focus on optimizing the implementation of the INotifyPropertyChanging interface. In this version, when INotifyPropertyChanging is not required, there will be no unnecessary overhead, reducing the impact on performance. This is achieved by trimming out all related code in the ObservableObject class when the interface is not in use, further optimizing the framework’s efficiency and responsiveness for developers.
In addition to these new features and improvements, version 8.3 includes several important bug fixes. A notable fix addresses a situation where the OnPropertyChanging methods were not being invoked for dependent properties when using the [NotifyPropertyChangedFor] attribute. Another fix ensures that the ObservableValidator.HasError property will no longer automatically appear in table views in frameworks that dynamically generate columns based on declared properties. This update follows last year’s version 8.2, which also focused on enhancing the MVVM features and improving performance for MVVM source generators. With these ongoing updates, the .NET Community Toolkit continues to solidify its place as a valuable resource for .NET developers, offering powerful tools and improved performance for a wide range of applications.