Menu
Microsoft .NET Community Toolkit backs .NET 6

Microsoft .NET Community Toolkit backs .NET 6

Preview 1 of .NET Community Toolkit 8.0.0 adds .NET 6 support and brings a number of enhancements to the MVVM toolkit.

Credit: Elle Aon / Shutterstock

Microsoft is previewing .NET Community Toolkit 8.0.0, a new version of the .NET toolkit that adds .NET 6 support and new MVVM (Model-View-ViewModel) toolkit capabilities.

The .NET Community Toolkit is a collection of APIs and helpers for all .NET developers, agnostic of any UI platform. Version 8 is the first release from the new .NET Community Toolkit Repository, which will be the home for all .NET libraries moving forward.

With Preview 1, unveiled January 25, the .NET Community Toolkit 8.0.0 adds support for the recently released .NET 6 software development platform as a new target across available libraries. This brings improvements when running on the latest .NET runtime, including trimming support for all libraries, support for nint and nuint in the Count<T> extension in the HighPerformance package, and optimisations for .NET 6.

The toolkit also includes a revamped preview of source generators for the MVVM Toolkit, which is part of the .NET Community Toolkit. Generators have been rewritten to be incremental, meaning they will be faster and keep the IDE fast and responsive even when used with large-scale projects. 

These APIs reduce boilerplate when working with MVVM. They also make it easier to create commands, by using a new ICommand attribute, and allow the MVVM toolkit to automatically generate commands using RelayCommand types in the library.

Further, new attributes from the MVVM toolkit make it easier to write observable properties. The source generator can create observable properties behind the scenes. And for view model composition, the MVVM toolkit introduces attributes for code generation that allow injecting logic from types into arbitrary classes. This addresses a situation in which C# lacks multiple inheritance, which can be an issue.

Source code for the .NET Community Toolkit can be found on GitHub.


Show Comments