Microsoft launches .NET Community Toolkit

Microsoft has officially launched the .NET Community Toolkit, a collection of wizards and APIs that work for all .NET developers. The Toolkit is part of the .NET Foundation and is maintained and published by Microsoft, which claims the Toolkit is independent of any specific UI platform.


This is not a brand new launch; all .NET Community Toolkit libraries were originally part of the Windows Community Toolkit. It’s a collection of wizards, extensions, and custom controls designed to simplify building UWP and .NET apps for Windows 10 and Windows 11.

Toolkit APIs were originally aimed at Windows development, but over time an increasing number are just for .NET in general rather than having Windows-specific dependencies, so the new Toolkit consists of these Windows-independent APIs put together for .NET developers not doing any Windows development.

One of the main components of the .NET Community Toolkit is the MVVM Toolkit, which Microsoft describes as a modern, fast, platform-independent, and modular MVVM library used by the Microsoft Store and the Photos app. It is described as “inspired by MvvmLight” and is also its official replacement now that the library is deprecated.

The MVVM toolkit in this release includes new MVVM source generators, which are intended to significantly reduce the boilerplate code needed to set up an application using MVVM. Source generators allow C# developers to inspect user code as it is compiled. The generator can create new C# source files on the fly which are added to the user’s compilation. This way you have code that runs while compiling. It inspects your program to produce additional source files which are compiled with the rest of your code.

community toolkit

This image shows the source generator attributes in action. On the left side is the original handwritten example using the MVVM Toolkit. The right side shows how to use the new attributes to automatically generate the exact same code.

.NET Community Toolkit is now available on GitHub.

More information

.NET Community Toolkit on GitHub

Related Articles

MAUI Compatibility for Xamarin Community Toolkit

.NET celebrates the 20th anniversary of its launch

Microsoft releases .NET 6 and Visual Studio 2022

.NET 6 Developer Preview Released

Windows UWP Community Toolkit

To be informed of new articles on I Programmer, subscribe to our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook Where LinkedIn.

Banner


pythondata



comments

or send your comment to: [email protected]

Sam D. Gomez