DevWinUI.SourceGenerator 10.8.0

dotnet add package DevWinUI.SourceGenerator --version 10.8.0
                    
NuGet\Install-Package DevWinUI.SourceGenerator -Version 10.8.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DevWinUI.SourceGenerator" Version="10.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevWinUI.SourceGenerator" Version="10.8.0" />
                    
Directory.Packages.props
<PackageReference Include="DevWinUI.SourceGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DevWinUI.SourceGenerator --version 10.8.0
                    
#r "nuget: DevWinUI.SourceGenerator, 10.8.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DevWinUI.SourceGenerator@10.8.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DevWinUI.SourceGenerator&version=10.8.0
                    
Install as a Cake Addin
#tool nuget:?package=DevWinUI.SourceGenerator&version=10.8.0
                    
Install as a Cake Tool

<h3 align="center"> <a href="https://ghost1372.github.io">Documentation</a> <span> · </span> <a href="https://ghost1372.github.io/ReleaseNotes">Release notes</a> <span> · </span> <a href="https://github.com/ghost1372/DevWinUI/tree/main/dev/DevWinUI.Gallery">Samples</a> <span> · </span> <a href="https://apps.microsoft.com/detail/DevWinUI%20Gallery%20App/9nmx5x5dlsrq?launch=true &mode=mini">Gallery App (Store)</a> </h3>

<center>

<div align="center">

Packages Download/Installation Documentation
NuGet Version NuGet Download Document

</div>


DevWinUI.SourceGenerator

Install

Install-Package DevWinUI.SourceGenerator

Or

dotnet add package DevWinUI.SourceGenerator

Example

For generating BreadcrumbPageMappings you need to define <AdditionalFiles Include="@(Page)" />, for navigation mappings add each JSON file as an AdditionalFile, and for StringsPropertyGenerator you need to define <AdditionalFiles Include="Strings\en-US\Resources.resw" Link="%(RecursiveDir)%(Filename)%(Extension)" Visible="false"/>. Each valid JSON file generates its own mapping class. A single file keeps the NavigationPageMappings name; with multiple files, AppData.json (or the first file by path if absent) generates NavigationPageMappings, while other files use their filename as a suffix (for example, AppDataGlyph.json generates NavigationPageMappingsAppDataGlyph).

<ItemGroup>
  <AdditionalFiles Include="Assets\NavViewMenu\AppData.json" Link="%(RecursiveDir)%(Filename)%(Extension)" Visible="false"/>
  <AdditionalFiles Include="Assets\NavViewMenu\AppDataGlyph.json" Link="%(RecursiveDir)%(Filename)%(Extension)" Visible="false"/>
  <AdditionalFiles Include="@(Page)" />
  <AdditionalFiles Include="Strings\en-US\Resources.resw" Link="%(RecursiveDir)%(Filename)%(Extension)" Visible="false"/>
</ItemGroup>

you can define namespace for each file in csproj and PropertyGroup section:

<StringsNamespace>myStringsNamespace</StringsNamespace>
<NavigationMappingsNamespace>MyNavigationMappingsNamespace</NavigationMappingsNamespace>
<BreadcrumbMappingsNamespace>MyBreadcrumbMappingsNamespace</BreadcrumbMappingsNamespace>

Demo

See the Gallery app to see how to use it

Documentation

See Here for Online Documentation

GalleryApp

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.8.0 0 10/15/2026
10.2.0 242 8/24/2026
10.1.0 355 7/14/2026
10.0.0 263 6/11/2026
10.0.0-Preview4 102 6/3/2026
10.0.0-Preview3 108 5/12/2026
10.0.0-Preview2 95 5/5/2026
10.0.0-Preview1 111 4/29/2026
9.9.0 1,296 1/7/2026