MSvg: SVG Icons for .NET and Blazor

MultipleSVG is a .NET project for developers who want ready-to-use SVG icons without manually copying files into their apps.

The main NuGet package is MSvg.All. See  the icons at https://ignatandrei.github.io/MultipleSVG/icons

It exposes icons as strongly typed SvgIconGenerator.IconDto values in the MSvg.All namespace.

The package is useful in console apps, ASP.NET Core projects, tools, and any code that needs icon metadata, SVG markup, or icon lookup by name.

It includes multiple libraries such as Lucide, Bootstrap Icons, Tailwind Heroicons, Azure Public Service Icons, Dynamics 365, Microsoft 365, Iconoir, Leungwensen, Susty Icons, and more.

If you build with Blazor, the companion package MSvg.Blazor adds the SvgIconPreview component and a ready-made /icons browser page.

Install the packages

dotnet add package MSvg.All
dotnet add package MSvg.Blazor

Use the core package in C#

using MSvg.All;

var icon = LucideIcons.Activity;
Console.WriteLine(icon.Name);
Console.WriteLine(icon.InnerContent);

var byName = LucideIcons.FromName("activity");
var allNames = AllIconNames.IconNames;

Use it in Blazor

@using MSvg.All
@using MSvg.Blazor.Components

<SvgIconPreview Icon="@LucideIcons.Activity" Size="40" />

Add the built-in Icons page

<Router AppAssembly="@typeof(App).Assembly"
        AdditionalAssemblies="new[] { typeof(MSvg.Blazor.Pages.Icons).Assembly }">
</Router>

How the project is built

The solution is split into two NuGet packages: MSvg.All for the generated icon data and MSvg.Blazor for the Blazor UI layer.

MSvg.All includes SVG files as project AdditionalFiles, grouped by source library such as Lucide, Bootstrap, Heroicons, Azure, and Microsoft 365.

During build, the project uses SvgIconGenerator and RSCG_Templating to generate strongly typed icon classes and lookup helpers from those SVG assets.

This means the final package ships compiled .NET types instead of asking consumers to parse raw SVG files themselves.

MSvg.Blazor is built as a Razor Class Library on top of MSvg.All, so Blazor apps can reuse the same generated icon data through components and pages.

The result is a clean build pipeline: source SVG files go in, generated icon classes come out, and the Blazor package adds rendering and browsing on top.


Posted

in

, , , ,

by

Tags: