Blazicons.Generating 3.3.35

dotnet add package Blazicons.Generating --version 3.3.35
                    
NuGet\Install-Package Blazicons.Generating -Version 3.3.35
                    
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="Blazicons.Generating" Version="3.3.35">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Blazicons.Generating" Version="3.3.35" />
                    
Directory.Packages.props
<PackageReference Include="Blazicons.Generating">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 Blazicons.Generating --version 3.3.35
                    
#r "nuget: Blazicons.Generating, 3.3.35"
                    
#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 Blazicons.Generating@3.3.35
                    
#: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=Blazicons.Generating&version=3.3.35
                    
Install as a Cake Addin
#tool nuget:?package=Blazicons.Generating&version=3.3.35
                    
Install as a Cake Tool

Blazicons.Generating

Provides support for generating Blazicon library packages.

See the changelog for change history.

Nuget

Build Status

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>
    <BlaziconsPropertyNameRemovalPatterns>^My_Icon_;_24_\w*$;-(original|plain|line)</BlaziconsPropertyNameRemovalPatterns>
    <BlaziconsSkipColorScrub>true</BlaziconsSkipColorScrub>
    <BlaziconsGeneratedCodeOutputPath>Generated</BlaziconsGeneratedCodeOutputPath>
    <BlaziconsGeneratorPath>MyIcons.Generating/MyIcons.Generating.MyIconsGenerator</BlaziconsGeneratorPath>
  </PropertyGroup>
</Project>

Property Name Transformation Examples:

Patterns are applied in order. Use regex anchors to control where matching occurs:

  • ^pattern - Removes from the start (prefix removal)
  • pattern$ - Removes from the end (suffix removal)
  • pattern - Removes anywhere in the filename

Example with the above configuration:

  • Ic_Fluent_Activity_24_regular.svgActivity (prefix ^Ic_Fluent_ removed, then suffix _24_\w*$ removed)
  • Ic_Fluent_Person_24_filled.svgPerson (prefix ^Ic_Fluent_ removed, then suffix _24_\w*$ removed)
  • react-plain.svgReact (pattern -(original|plain|line) removed)
  • angular-original.svgAngular (pattern -(original|plain|line) removed)

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
BlaziconsPropertyNameRemovalPatterns No Semicolon-delimited regex patterns to remove from file names: ^pattern (prefix), pattern$ (suffix), pattern (anywhere) ^My_Icons_;_24_\w*$;-(original\|plain\|line)
BlaziconsSkipColorScrub No Skip color scrubbing for SVG content true
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
BlaziconsPreserveExtractedFiles No Preserve extracted repository files after generation for debugging path issues true

* 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>

Debugging Path Issues

When experiencing "SVG folder not found" errors, use the BlaziconsPreserveExtractedFiles property to preserve temporary files for inspection:

<PropertyGroup>
  <BlaziconsPreserveExtractedFiles>true</BlaziconsPreserveExtractedFiles>
</PropertyGroup>

Build the project and check the build output for the message "Extracted files preserved at: [path]". You can then navigate to that directory to verify the folder structure and determine the correct BlaziconsSvgFolderPath value. Remember to set this property back to false for production builds.

Troubleshooting

Code not generating

  1. Ensure BlaziconsEnableCodeGeneration is set to true
  2. Verify all required properties are configured
  3. Check that the BlaziconsRepoUrl or BlaziconsRepoPath is valid and accessible
  4. Review build output for error messages from the generator

SVG folder not found

  1. Use BlaziconsPreserveExtractedFiles set to true to keep temporary extracted files
  2. Check the build output for the "Extracted files preserved at" message
  3. Navigate to that directory to verify the actual folder structure
  4. Adjust BlaziconsSvgFolderPath to match the relative path from the extracted files root
  5. Remember to set BlaziconsPreserveExtractedFiles back to false for normal use

Build errors after generation

  1. Clean the solution and rebuild
  2. Verify the generated code is in the expected output directory
  3. Ensure the target frameworks match your project requirements
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
3.3.35 90 3/15/2026
3.3.35-beta 74 3/15/2026
3.3.34-alpha 76 3/15/2026
3.3.32-alpha 76 2/28/2026
3.3.31-alpha 78 2/28/2026
3.3.30-alpha 78 2/28/2026
3.2.28 117 2/23/2026
3.2.28-beta 81 2/23/2026
3.2.27-alpha 83 2/21/2026
3.2.26-alpha 86 2/21/2026
3.2.25-alpha 82 2/21/2026
3.2.22-alpha 83 2/21/2026
3.1.19 93 2/20/2026
3.1.19-beta 77 2/20/2026
3.1.17-alpha 86 2/20/2026
3.1.16-alpha 87 2/19/2026
3.1.15-alpha 80 2/19/2026
3.1.14-alpha 85 2/19/2026
3.1.11-alpha 85 2/18/2026
3.0.8-beta 79 2/17/2026
Loading failed