Blazicons.Generating
3.1.16-alpha
See the version list below for details.
dotnet add package Blazicons.Generating --version 3.1.16-alpha
NuGet\Install-Package Blazicons.Generating -Version 3.1.16-alpha
<PackageReference Include="Blazicons.Generating" Version="3.1.16-alpha"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Blazicons.Generating" Version="3.1.16-alpha" />
<PackageReference Include="Blazicons.Generating"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Blazicons.Generating --version 3.1.16-alpha
#r "nuget: Blazicons.Generating, 3.1.16-alpha"
#:package Blazicons.Generating@3.1.16-alpha
#addin nuget:?package=Blazicons.Generating&version=3.1.16-alpha&prerelease
#tool nuget:?package=Blazicons.Generating&version=3.1.16-alpha&prerelease
Blazicons.Generating
Provides support for generating Blazicon library packages.
See the changelog for change history.
Overview
Blazicons.Generating is a library designed to assist in generating code for Blazicon icon library implementations. It does this by providing helper classes for reading the source repositories of open-source font libraries and for the generation of Blazicon libraries.
Getting Started
Installation
Add a reference to the Blazicons.Generating package in your project.
Basic Configuration
Configure your .csproj file with the required properties to generate icon classes:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<BlaziconsRepoUrl>https://github.com/example/icons/archive/refs/heads/main.zip</BlaziconsRepoUrl>
<BlaziconsSvgPattern>^src\/svg\/.*.svg$</BlaziconsSvgPattern>
<BlaziconsClassName>MyIcon</BlaziconsClassName>
<BlaziconsSvgFolderPath>src/svg</BlaziconsSvgFolderPath>
<BlaziconsPropertyNameRemovalPattern>-(original|plain|line)</BlaziconsPropertyNameRemovalPattern>
<BlaziconsGeneratedCodeOutputPath>Generated</BlaziconsGeneratedCodeOutputPath>
<BlaziconsGeneratorPath>MyIcons.Generating/MyIcons.Generating.MyIconsGenerator</BlaziconsGeneratorPath>
</PropertyGroup>
</Project>
Property Name Removal Example:
When BlaziconsPropertyNameRemovalPattern is set to -(original|plain|line), file names are transformed as follows:
react-plain.svg→React(instead ofReactPlain)angular-original.svg→Angular(instead ofAngularOriginal)vue-line.svg→Vue(instead ofVueLine)
Configuration Properties
| Property | Required | Description | Example |
|---|---|---|---|
BlaziconsRepoUrl |
Yes* | URL to a .zip file containing the icon repository | https://github.com/my-team/myicons/archive/refs/heads/main.zip |
BlaziconsRepoPath |
Yes* | Local path to a repository (alternative to RepoUrl) | C:\Source\icons |
BlaziconsSvgPattern |
Yes | Regex pattern to filter SVG files | ^src\/svg\/.*.svg$ |
BlaziconsClassName |
Yes | Name of the generated icon class | MyIcon |
BlaziconsSvgFolderPath |
No | Relative path within the repo to the SVG folder | src/svg |
BlaziconsPropertyNameRemovalPattern |
No | Regex pattern to remove from file names when generating property names | -(original\|plain\|line) |
BlaziconsGeneratedCodeOutputPath |
Yes | Output directory for generated code | Generated |
BlaziconsGeneratorPath |
No | Generator namespace/path structure for the generated file | Blazicons.MyIcons.Generating/Blazicons.MyIcons.Generating.MyIconsGenerator |
* Either BlaziconsRepoUrl or BlaziconsRepoPath must be specified.
Advanced Configuration
Generating Multiple Icon Classes
For cases where multiple icon sets are desired in one package (e.g., different aspect ratios or styles), the recommended approach is to create separate non-packable generator projects that output to your main project.
my-icons/
├─ MyIcons.csproj (main project, packable)
├─ MyIcons.Filled/
│ ├─ MyIcons.Filled.csproj (generator project, non-packable)
├─ MyIcons.Outlined/
│ ├─ MyIcons.Outlined.csproj (generator project, non-packable)
Build-Time Generation Control
Code generation is controlled by the BlaziconsEnableCodeGeneration property, which is automatically set based on configuration file presence. To manually control generation:
<PropertyGroup>
<BlaziconsEnableCodeGeneration>true</BlaziconsEnableCodeGeneration>
</PropertyGroup>
Troubleshooting
Code not generating
- Ensure
BlaziconsEnableCodeGenerationis set totrue - Verify all required properties are configured
- Check that the
BlaziconsRepoUrlorBlaziconsRepoPathis valid and accessible - Review build output for error messages from the generator
Build errors after generation
- Clean the solution and rebuild
- Verify the generated code is in the expected output directory
- Ensure the target frameworks match your project requirements
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- CodeCasing (>= 4.0.5)
- HtmlAgilityPack (>= 1.12.4)
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 |
|---|---|---|
| 3.3.35 | 116 | 3/15/2026 |
| 3.3.35-beta | 86 | 3/15/2026 |
| 3.3.34-alpha | 90 | 3/15/2026 |
| 3.3.32-alpha | 89 | 2/28/2026 |
| 3.3.31-alpha | 89 | 2/28/2026 |
| 3.3.30-alpha | 86 | 2/28/2026 |
| 3.2.28 | 134 | 2/23/2026 |
| 3.2.28-beta | 90 | 2/23/2026 |
| 3.2.27-alpha | 91 | 2/21/2026 |
| 3.2.26-alpha | 93 | 2/21/2026 |
| 3.2.25-alpha | 89 | 2/21/2026 |
| 3.2.22-alpha | 92 | 2/21/2026 |
| 3.1.19 | 105 | 2/20/2026 |
| 3.1.19-beta | 88 | 2/20/2026 |
| 3.1.17-alpha | 93 | 2/20/2026 |
| 3.1.16-alpha | 95 | 2/19/2026 |
| 3.1.15-alpha | 89 | 2/19/2026 |
| 3.1.14-alpha | 91 | 2/19/2026 |
| 3.1.11-alpha | 90 | 2/18/2026 |
| 3.0.8-beta | 86 | 2/17/2026 |