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

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events