.NET Community Toolkit v8.0 Preview revamps the MVVM library — Visual Studio Magazine


.NET Community Toolkit v8.0 Preview revamps MVVM library

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

This .NET Foundation project is a collection of wizards and APIs that work for all .NET developers and are independent of any specific UI platform. It is one of many similar toolkits, which are typically collections of helper functions, custom controls, and application services designed to simplify and demonstrate common developer tasks for software projects. different types. For example, under the guise of Community Toolbox GitHub repo are kits for Windows, .NET MAUI and more.

The included .NET Community Toolkit was the result of an effort by Microsoft to separate 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 post page lists all major changes, bug fixes, improvements, and new features from Preview 1. New features and improvements include:

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

A 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 these source generators. They now run faster, offer simplified commands, add new observable property attributes, and include an adjustment to Viewmodel composition to work around C#’s lack of multiple inheritance support.

“All builders have been rewritten from the ground up to be incremental builders, which means they’ll run much faster than before and help keep the IDE fast and responsive even when working on projects on a large scale,” Sergio Pedri of the Microsoft Store customer team said in a January 25 blog post. Publish. “These APIs are intended to greatly reduce the boilerplate needed when working with MVVM, with helpers ranging from observable properties to commands.”

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

  • Slicing support is now enabled for all libraries.
  • The Count() extension in HighPerformance package now also supports nint and nuint.
  • Several optimizations were introduced on .NET 6.

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

“The libraries in this new toolkit are not dependent on any specific UI framework, so they can be used by all developers regardless of which framework or runtime environment they choose to work on. their plans,” Pedri said. “That is, the .NET Community Toolkit can be referenced by apps and libraries targeting .NET, .NET Core, .NET Standard, .NET Framework, WPF, UWP, MAUI, Xamarin, Unity, and Moreover !”

About the Author

David Ramel is an editor and writer for Converge360.

Sam D. Gomez