New to Telerik Document ProcessingStart a free 30-day trial

Resolving FileNotFoundException for System.Text.Encoding.CodePages in RadWordsProcessing

Updated on Jun 9, 2026

Environment

VersionProductAuthor
2024.2.426RadWordsProcessingDesislava Yordanova

Description

When you use RadWordsProcessing in a WPF/WinForms project that targets .NET 6.0, a System.IO.FileNotFoundException error occurs. The error states that the file for assembly System.Text.Encoding.CodePages, Version=7.0.0.0 cannot be found. This issue arises when you use the Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.

WPF project Net6

Encoding CodePages Error

Solution

To resolve the FileNotFoundException for System.Text.Encoding.CodePages in a .NET 6.0 project that uses RadWordsProcessing, follow these steps:

  1. Right-click your project and edit the .csproj file.

    Edit proj file

  2. Add the PackageReference entry for System.Text.Encoding.CodePages and a FunctionsPreservedDependencies entry for it:

xml
<ItemGroup>
  <PackageReference Include="Telerik.Windows.Documents.Flow" Version="2024.2.426" />
  <PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
  <FunctionsPreservedDependencies Include="System.Text.Encoding.CodePages.dll" />
</ItemGroup>

Add PackageReference

These entries include the required package references in your project and resolve the FileNotFoundException.

Ensure that your project targets .NET 6.0 and that all NuGet package versions are compatible with your project setup.

See Also