Regenerate XAML during build

MSBuild Asset Pipeline

Make vector asset conversion repeatable and reviewable in the normal build.

Explore source
Parent systemSvgToXaml
StatusMaintained
Modules1
RepositorySvgToXaml/SvgToXaml.Build

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.

  1. 01

    Combined ResourceDictionary output

  2. 02

    Per-file AXAML output

  3. 03

    Build item metadata configuration

  4. 04

    Resource reuse and geometry transforms

From intent
to working system.

01

Collect

MSBuild item globs identify SVG inputs and per-item settings.

02

Group

Output file or directory rules decide combined versus individual generation.

03

Convert

The shared engine maps each asset with requested compatibility options.

04

Emit

Generated AXAML joins the application build as a deterministic artifact.

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.

01 · Install
Terminal
dotnet add package SvgToXaml.Build
02 · Use · xml
MainWindow.axaml
<ItemGroup>
<SvgFiles Include="Assets/**/*.svg"
OutputFile="Assets/Icons.axaml"
UseResources="true"
ReuseExistingResources="true"
TransformGeometry="true" />
</ItemGroup>

Use one layer.
Compose the rest.

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.

SvgToXaml

Search everything.

Loading the index…

move open esc close

Preparing metadata and full-text search…