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 at Converge 360.

comments powered by Disqus

Featured

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

  • Copilot Agentic AI Dev Environment Opens Up to All

    Microsoft removed waitlist restrictions for some of its most advanced GenAI tech, Copilot Workspace, recently made available as a technical preview.

Subscribe on YouTube