New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Using an Older Telerik.SvgIcons Version with the Icon Overrides Service

Updated on Nov 11, 2026

Environment

ProductProgress Telerik UI for ASP.NET Core
Telerik UI for ASP.NET Core version2026.4.1111 and later

Description

Telerik UI for ASP.NET Core references a specific version of the Telerik.SvgIcons package. How can I use the Icon Overrides service to display icons from an older version, such as the filled v4 set, without changing the existing package reference?

This article shows how to supply the older icons to the SetIcons API in an ASP.NET Core application.

Solution

Keep the Telerik.SvgIcons version required by Telerik UI for ASP.NET Core. The components are compiled against that version and depend on its API. To use older artwork without replacing that dependency, make both icon sets available to the application.

Both package versions use the same assembly name (Telerik.SvgIcons), public key token, namespaces, and type names. Although their assembly versions differ, adding both as ordinary references creates naming conflicts. A namespace is not part of an assembly's identity.

Rebuild the older icon set with a different assembly name and namespace. The icon classes contain icon data and do not require additional libraries. The application can then reference both assemblies without custom assembly-loading code.

1. Get the Icon Sources

The icon sources live in the telerik/kendo-icons repository under packages/svg-icons/src-cs. Clone the repository and check out the tag of the version you need:

sh
git clone https://github.com/telerik/kendo-icons.git
cd kendo-icons
git checkout v4.11.0

If you already have the repository and do not want to change its current checkout, export the folder at that tag instead. Replace <staging-folder> with an existing destination folder:

sh
git archive v4.11.0 packages/svg-icons/src-cs | tar -x -C <staging-folder>

The folder contains:

ItemContents
Telerik.SvgIcons/Models/ISvgIcon.csThe icon contract - Name, Content, ViewBox, and Variants.
Telerik.SvgIcons/Models/SvgIconBase.csThe base class that implements the contract.
Telerik.SvgIcons/Icons/*.csOne class per icon. Version 4.11.0 contains 827 files.
Telerik.SvgIcons/SvgIcon.csA generated static class that exposes every icon as a property.
Telerik.SvgIcons/Telerik.SvgIcons.csprojThe original project file.

2. Build the Assembly Under a Different Identity

Copy the Icons and Models folders and SvgIcon.cs into a new folder. Do not reuse the original project file, because it sets PackageId to Telerik.SvgIcons and signs the output with the Telerik key.

Every source file declares namespace Telerik.SvgIcons. From the folder containing the copied sources, run the following PowerShell script to change these declarations to a distinct namespace, such as Telerik.SvgIcons.V4:

powershell
Get-ChildItem -Recurse -Filter *.cs | ForEach-Object {
    $text = [System.IO.File]::ReadAllText($_.FullName)
    $text = $text -replace 'namespace Telerik\.SvgIcons(?!\.)', 'namespace Telerik.SvgIcons.V4'
    [System.IO.File]::WriteAllText($_.FullName, $text)
}

Setting the RootNamespace property alone is not sufficient. It does not change explicit namespace declarations in existing files.

Add a project file next to the copied sources:

XML
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <AssemblyName>Telerik.SvgIcons.V4</AssemblyName>
    <RootNamespace>Telerik.SvgIcons.V4</RootNamespace>
    <AssemblyVersion>4.11.0.0</AssemblyVersion>
    <SignAssembly>False</SignAssembly>
    <NoWarn>$(NoWarn);618</NoWarn>
  </PropertyGroup>
</Project>

The 618 warning is suppressed because the older icon set marks some of its own members as obsolete, and SvgIcon.cs references them.

Build the project:

sh
dotnet build -c Release

Build with the .NET SDK. The icon sources require no additional libraries, and the netstandard2.0 target is compatible with supported ASP.NET Core applications.

Confirm the identity of the result:

powershell
[System.Reflection.AssemblyName]::GetAssemblyName("bin\Release\netstandard2.0\Telerik.SvgIcons.V4.dll").FullName

The output assembly identifies itself as Telerik.SvgIcons.V4, Version=4.11.0.0, PublicKeyToken=null, which no longer conflicts with the referenced Telerik.SvgIcons assembly. Copy Telerik.SvgIcons.V4.dll to a folder in your solution, for example lib.

3. Reference the Assembly

Add an assembly reference next to the existing package reference. Keep the package version required by your installed Telerik UI for ASP.NET Core version; 5.5.0 is used here as an example. Adjust HintPath to match the location of the rebuilt assembly:

XML
<ItemGroup>
  <PackageReference Include="Telerik.SvgIcons" Version="5.5.0" />
  <Reference Include="Telerik.SvgIcons.V4">
    <HintPath>..\lib\Telerik.SvgIcons.V4.dll</HintPath>
    <Private>true</Private>
  </Reference>
</ItemGroup>

Private set to true copies the assembly to the output folder. Because the two assemblies no longer share an identity, no load context, probing path, or copy target is required.

4. Create the Icons Collection

The Override method requires an ISvgIcon instance of the referenced package. The rebuilt assembly exposes its own ISvgIcon under the new namespace, which is a distinct CLR type, so the icon data must be copied into an SvgIconBase of the referenced package.

Add the following KendoV4IconSource class to the application. It reads the older icon types and creates compatible instances from the referenced package:

C#
using System;
using System.Collections.Generic;
using System.Linq;
using Telerik.SvgIcons;
using V4 = Telerik.SvgIcons.V4;

public static class KendoV4IconSource
{
    public static IReadOnlyDictionary<string, ISvgIcon> All { get; } = typeof(V4.ISvgIcon).Assembly
        .GetExportedTypes()
        .Where(type => type.IsClass && !type.IsAbstract && typeof(V4.ISvgIcon).IsAssignableFrom(type))
        .Select(type => (V4.ISvgIcon)Activator.CreateInstance(type))
        .Where(icon => !string.IsNullOrEmpty(icon.Name) && !string.IsNullOrEmpty(icon.Content))
        .ToDictionary(icon => icon.Name, icon => (ISvgIcon)new SvgIconBase
        {
            Name = icon.Name,
            Content = icon.Content,
            ViewBox = icon.ViewBox
        }, StringComparer.OrdinalIgnoreCase);

    public static ISvgIcon Get(string name)
    {
        ISvgIcon icon;

        if (!All.TryGetValue(name, out icon))
        {
            throw new ArgumentException(string.Format("Telerik.SvgIcons.V4 does not contain an icon named '{0}'.", name), "name");
        }

        return icon;
    }
}

The filter on Name and Content skips SvgIconBase, which implements the contract but carries no icon data. Version 4.11.0 yields 829 icons.

The Telerik.SvgIcons package contains icon types named Path and File, which can conflict with System.IO.Path and System.IO.File. Use aliases or fully qualified names if the file also uses these System.IO types.

5. Register the Overrides

The Icon Overrides service keeps a map of icon names to replacements and consults it whenever a component resolves an icon. It has two scopes:

  • Global applies to every component.
  • Component applies to a specific component type and takes precedence over the global map when both define the same icon name.

Register the configuration in Program.cs:

C#
using Kendo.Mvc;

builder.Services.AddKendo(options =>
{
    options.SetIcons(icons => icons
        .Global(global =>
        {
            foreach (var icon in KendoV4IconSource.All)
            {
                global.Override(icon.Key, icon.Value);
            }
        }));
});

Overrides are applied in two ways:

  • Components that render their icons on the server apply the overrides directly in the HTML response.
  • Components that render their icons with JavaScript rely on the client-side configuration generated by OverrideIcons.

Add the following call to the shared layout after the Kendo UI scripts and before component initialization. Without it, only server-rendered icons use the overrides:

Razor
@Html.Kendo().OverrideIcons()

In Telerik UI for ASP.NET Core, the Menu, ContextMenu, PanelBar, and TabStrip pass a component name on the server, so their overrides appear in the initial HTML. The TreeView and Grid build their icons on the client and depend on the OverrideIcons payload.

For more details, see the Icon Overrides article.

6. Map Renamed and Missing Icons

Iterating All only overrides names that exist in both sets. Comparing 4.11.0 with 5.5.0 gives:

GroupCountResult of the global loop
Names present in both versions666Overridden - the older artwork is rendered.
Names present only in 5.5.0161Not overridden - the loop has no entry for them, so the newer artwork remains.
Names present only in 4.11.0163Added to the map but never requested by a component.

The 161 names found only in 5.5.0 need additional handling. Some icons were renamed between versions, so the older set contains equivalent artwork under a different name. The v4 to v5 migration guide lists these renames.

The guide maps an old name to its new replacement, so read it in reverse for this scenario. For example, the guide lists microphone-solid as replaced by microphone. Version 5.5.0 therefore has microphone while 4.11.0 only has microphone-solid and microphone-outline, and the global loop never produces a microphone entry. Add the mapping explicitly:

C#
builder.Services.AddKendo(options =>
{
    options.SetIcons(icons => icons
        .Global(global =>
        {
            foreach (var icon in KendoV4IconSource.All)
            {
                global.Override(icon.Key, icon.Value);
            }

            global.Override("microphone", KendoV4IconSource.Get("microphone-solid"));
            global.Override("users", KendoV4IconSource.Get("users-solid"));
            global.Override("laptop", KendoV4IconSource.Get("laptop-solid"));
            global.Override("lightbulb", KendoV4IconSource.Get("lightbulb-outline"));
            global.Override("superscript", KendoV4IconSource.Get("supscript"));
        }));
});

Add these mappings to the registration from step 5 rather than registering the service again. Place the explicit Override calls after the loop so the loop cannot overwrite them.

Of the 161 missing names, the migration guide resolves 43. The remaining 118 have no counterpart in 4.11.0, including tree-view, map-pin, and rocket. These icons retain their newer artwork unless you supply a custom ISvgIcon. The following example illustrates the configuration; replace the placeholder Content with valid SVG path markup:

C#
global.Override("rocket", new SvgIconBase
{
    Name = "rocket",
    Content = "<path d=\"...\" />",
    ViewBox = "0 0 512 512"
});

See Also