In the last blog post I introduced you to MvvmGen, the new MVVM library built with a strong focus on C## Source Generators. Some of you asked in the comments of the blog post and also per email if also the library could be generated, so that there is no runtime dependency.

Today, I’m happy to announce that this is now possible. Check out the requested special edition on NuGet: MvvmGen.PureCodeGeneration. This edition generates everything for you, not only the ViewModels, but also the full library. That means, there is no runtime dependency for your application. Let’s look at this edition in this blog post, and let me also show you what’s new in version 1.1.0.

Before we look at the details, let’s look at the structure of the normal MvvmGen NuGet package.

The Normal MvvmGen NuGet Package

When you reference the MvvmGen NuGet package in your project, you’ll get two things:

a) A development dependency: The ViewModelGenerator, which generates your ViewModels

b) A runtime dependency: The MvvmGen.dll

The MvvmGen.dll contains MvvmGen‘s ViewModelBase class, the EventAggregator, the DelegateCommand, and all the attributes like ViewModel and Property that you use to decorate your ViewModel classes. When you look at the following screenshot, you can see in the Solution Explorer the ViewModelGenerator and also the MvvmGen.dll.

#.net #c# #maui #mvvm #mvvmgen #uwp

MvvmGen 1.1.0 and the New Special Edition: PURE CODE GENERATION
1.60 GEEK