Regenerate XAML during build
MSBuild Asset Pipeline
Make vector asset conversion repeatable and reviewable in the normal build.
Explore source ↗Capability
SvgToXaml.Build consumes SvgFiles items, combines many sources into one ResourceDictionary or emits individual AXAML files, and exposes conversion, compatibility, resource reuse, geometry, opacity, filter, clip, mask, and newline settings.
- 01
Combined ResourceDictionary output
- 02
Per-file AXAML output
- 03
Build item metadata configuration
- 04
Resource reuse and geometry transforms
How it composes
From intent
to working system.
Collect
MSBuild item globs identify SVG inputs and per-item settings.
Group
Output file or directory rules decide combined versus individual generation.
Convert
The shared engine maps each asset with requested compatibility options.
Emit
Generated AXAML joins the application build as a deterministic artifact.
Quick start
Adopt this
capability.
Start with the primary module, then add the related packages only when the application needs those layers. Replace VERSION with the current NuGet version.
dotnet add package SvgToXaml.Build<PackageReference Include="SvgToXaml.Build" Version="VERSION" /><PackageVersion Include="SvgToXaml.Build" Version="VERSION" /><ItemGroup> <SvgFiles Include="Assets/**/*.svg" OutputFile="Assets/Icons.axaml" UseResources="true" ReuseExistingResources="true" TransformGeometry="true" /></ItemGroup>Modules in this capability
Use one layer.
Compose the rest.
Source of truth
Read the module beside the complete system.
The implementation, samples, issues, and release notes stay in the parent repository so module details remain connected to the product architecture.