News

.NET Community Toolkit v8.0 Preview Revamps MVVM Library

Microsoft announced the first preview of .NET Community Toolkit v8.0.0, which revamps the MVVM library and introduces a new GitHub repo to host the project.

This .NET Foundation project is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. It's one of a number of similar toolkits, which typically are collections of helper functions, custom controls and app services designed to simplify and demonstrate common developer tasks for projects of varying types. For example, under the guise of the Community Toolkit GitHub repo are kits for Windows, .NET MAUI and more.

The included .NET Community Toolkit resulted from a Microsoft effort to split out its .NET-specific libraries from the existing Windows Community Toolkit into their own dedicated repository. The .NET Community Toolkit contains libraries for MVVM, Diagnostics, High Performance and more.

The project's GitHub release page lists all breaking changes, bug fixes, improvements and new features in Preview 1. The new features and improvements include:

New Features and Improvements
[Click on image for larger view.] New Features and Improvements (source: GitHub).

One key component of the .NET kit provides MVVM source generators to augment the MVVM library, and Preview 1 includes a revamped and improved preview of those source generators. They now run faster, feature simplified commands, add new observable properties attributes and include a Viewmodel composition tweak to get around C#'s lack of multiple inheritance support.

"All generators have been rewritten from scratch to be incremental generators, meaning they will run much faster than before and they will help keep the IDE fast and responsive even when working on large scale projects," said Sergio Pedri of the Microsoft Store client team in a Jan. 25 blog post. "These APIs are meant to greatly reduce the necessarily boilerplate when working with MVVM, with helpers ranging from observable properties to commands."

Also, .NET 6 is now supported as a new target across all libraries, which adds these benefits:

  • Trimming support is now enabled for all libraries.
  • The Count<T>() extension in the HighPerformance package now also supports nint and nuint.
  • Several optimizations have been introduced when on .NET 6.

The new GitHub repo for the project, meanwhile, is where all .NET libraries can be found from now on.

"Libraries in this new toolkit have no dependencies on any specific UI frameworks, so they can be used by all developers regardless of the framework or runtime they choose to work on their projects," Pedri said. "That is, the .NET Community Toolkit can be referenced by applications and libraries targeting .NET, .NET Core, .NET Standard, .NET Framework, WPF, UWP, MAUI, Xamarin, Unity, and more!"

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube