Blazicons.Generating 3.1.16-alpha

This is a prerelease version of Blazicons.Generating.
There is a newer version of this package available.
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
                    
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.1.16-alpha">
  <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.1.16-alpha" />
                    
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.1.16-alpha
                    
#r "nuget: Blazicons.Generating, 3.1.16-alpha"
                    
#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.1.16-alpha
                    
#: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.1.16-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Blazicons.Generating&version=3.1.16-alpha&prerelease
                    
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>
    <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.svgReact (instead of ReactPlain)
  • angular-original.svgAngular (instead of AngularOriginal)
  • vue-line.svgVue (instead of VueLine)

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

  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

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 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
Loading failed