New to Telerik Document ProcessingStart a free 30-day trial

Resolving Namespace Conflicts in Telerik Document Processing Libraries

Updated on Jun 9, 2026

Environment

VersionProductAuthor
2024.4.1106Telerik Document ProcessingDesislava Yordanova

Description

When a .NET Core project uses both the .NET Standard and .NET Framework versions of a Document Processing library (for example, Telerik.Documents.Spreadsheet and Telerik.Windows.Documents.Spreadsheet), a namespace conflict occurs because the Workbook class exists in both packages. This conflict causes a compiler error that prevents successful compilation.

Installed Packages

Do not install the .NET Standard and .NET Framework versions of the Document Processing libraries simultaneously in the same project. Install the NuGet package that is compatible with the application's target framework and target OS.

Conflicting Assemblies Error

This article also answers the following questions:

  • How do you resolve type conflicts in .NET Core projects that use Telerik Document Processing libraries?
  • What is the correct way to handle namespace conflicts when you use Telerik Document Processing in mixed .NET environments?
  • How do you use the C# extern alias feature to differentiate between similar types in different assemblies?

Solution

Depending on the target framework of your project (.NET Framework, .NET Standard, .NET 8, .NET 9 and .NET 10, and so on), install the matching library version. If you need to install both versions, use the C# extern alias feature to resolve the compile-time error caused by the conflicting Workbook type. This approach lets you differentiate between assemblies and use types from both without conflict. Follow these steps:

  1. Assign Alias to NuGet Packages

    • For the Telerik.Documents.Spreadsheet NuGet package, set its alias to StandardHelper (or any preferred alias).
    • For the Telerik.Windows.Documents.Spreadsheet NuGet package, set its alias to FrameworkHelper (or any preferred alias).

    StandardHelper Alias

    FrameworkHelper Alias

  2. Use Extern Alias in Your Code

    • At the top of your source file where you intend to use the conflicting types, add the extern alias directive for each alias you assigned. This directive differentiates the assemblies and allows you to reference each type explicitly.
csharp
extern alias StandardHelper;
//extern alias FrameworkHelper;

using StandardHelper::Telerik.Windows.Documents.Spreadsheet.Model;
//using FrameworkHelper::Telerik.Windows.Documents.Spreadsheet.Model;

namespace YourNamespace
{
    internal class Program
    {
        static void Main(string[] args)
        {
           Workbook workbook;
        }
    }
}

These steps resolve the namespace conflict and allow you to use the Workbook class from the desired NuGet package in your .NET Core project.

See Also