New to Telerik Document Processing? Download free 30-day trial

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

Version Product Author
2024.2.426 RadWordsProcessing Desislava Yordanova


When using the RadWordsProcessing in a WPF/WinForms project which targets .NET 6.0 , a System.IO.FileNotFoundException error may occur, stating that the file for assembly 'System.Text.Encoding.CodePages, Version=' could not be found. This issue arises while utilizing the Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.

WPF project Net6

Encoding CodePages Error


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

  1. Right-click on your project to select it and edit .csproj file.

Edit proj file

  1. Include the necessary PackageReference entry for System.Text.Encoding.CodePages and add a FunctionsPreservedDependencies entry for it.
  <PackageReference Include="Telerik.Windows.Documents.Flow" Version="2024.2.426" />
  <PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
  <FunctionsPreservedDependencies Include="System.Text.Encoding.CodePages.dll" />

Add PackageReference

By adding these entries to your .csproj file, the required package references will be included in your project, resolving the FileNotFoundException.


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

See Also

In this article