Apr 22, 2023·1 min read

Microsoft Unveils .NET Community Toolkit 8.2 with Enhanced MVVM Support

Microsoft recently launched .NET Community Toolkit 8.2, advancing its focus on robust MVVM development. The update brings enhanced MVVM Toolkit functionality, better runtime performance, and optimizations for incremental pipelines ensuring minimal memory usage.

Microsoft Unveils .NET Community Toolkit 8.2 with Enhanced MVVM Support

Microsoft introduces the .NET Community Toolkit 8.2, continuing to elevate its support for model-view-viewmodel (MVVM) development. This comes on the heels of the preceding 8.1 release, which also concentrated on enhancing MVVM capabilities for developers.

The .NET Community Toolkit features a set of APIs and helpers designed for .NET developers, irrespective of the UI platform they use. The source code for version 8.2, announced on April 27th, is available on GitHub for public access.

In the latest .NET Community Toolkit release, the MVVM Toolkit now allows for custom attributes when using [RelayCommand]. With this enhancement, developers can leverage the native field: and property: C# syntax for specifying custom attribute targets, granting them complete authority over the attributes of generated members when deploying [RelayCommand] to produce an MVVM command. Microsoft asserts that custom attribute support is especially relevant when a viewmodel requires JSON serialization and must explicitly disregard the generated property.

Moreover, the MVVM Toolkit offers two new property change hooks for all [ObservableProperty] fields in version 8.2. This feature addresses a prior issue that arose when using [ObservableProperty] without the necessary infrastructure to easily inject state change logic for old and new values being set. In the context of the MVVM framework, a common scenario entails having a 'selected item' observable property, which might represent the presently selected user or nested viewmodel. In earlier iterations, modifying a property value often necessitated adjustments to both old and new instances.

Furthermore, the 8.2 update of the MVVM Toolkit introduces built-in code fixers for two previously added diagnostic analyzers. These analyzers generate a warning in cases of incorrect field access marked with [ObservableProperty] and when declaring a type with [ObservableProperty] and similar attributes while employing inheritance.

MVVM source generators in this latest update also underwent performance improvements. Microsoft focused on optimizing their incremental pipelines to reduce memory usage and ensure no redundant objects linger during concurrent executions. Additionally, all generated types and members now come adorned with full XML documentation, making it easier to comprehend the inspected code produced by these source generators.

Beside these improvements, the .NET Community Toolkit 8.2 release also demonstrates enhanced runtime performance. The toolkit incorporates the following libraries:

These components see usage in numerous inbox apps included with Windows, such as the Microsoft Store and the Photos app.

As the demand for powerful and flexible development tools grows, solutions like .NET Community Toolkit and AppMaster demonstrate the potential to dramatically improve developers' productivity. No-code and low-code platforms like AppMaster cater to a broad range of users, from small businesses to enterprise-level clients, by offering an innovative approach for building web, mobile, and backend applications swiftly and cost-effectively.

Easy to start
Create something amazing

Experiment with AppMaster with free plan.
When you will be ready you can choose the proper subscription.

Get Started