FileLoadException: Could Not Load File or Assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0

Facing below issue in Words, PPT, DOC, Excel, PDF, IMG etc…

FileLoadException: Could not load file or assembly ‘System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

OS: Windows 11 Enterprise

@hemalp Could you please create a simple console application that will allow us to reproduce the problem on our side? We will check the issue and provide you more information.

Aspose.Words for .NET Standard and .NET6 has a dependency on System.Text.Encoding.CodePages (>=4.5.0). As is seen here:
https://www.nuget.org/packages/Aspose.Words

If you add reference to Aspose.Words via NuGet, the required dependencies should be added automatically.

@hemalp,

For Aspose.Cells (.NET Standard 2.0, .NET6.0, .NET7.0 and .NET8.0), it has dependency, i.e., System.Text.Encoding.CodePages (>= 4.7.0), which should be installed. If possible, try installing the Aspose.Cells for .NET version from NuGet repos. directly in your project. When you get/install Aspose.Cells from nuget repos., it will automatically install the following additional dependency (API):

otherwise, you got to install these namespaces manually into your project.

I can see your Aspose.Words.dll references and found that the reference of System.Text.Encoding.CodePages.dll version is 4.1.1.0.

Please refer below attached image.

@hemalp 4.1.1.0 is a version of System.Text.Encoding.CodePages.dll from 4.5.0 package.

Anyways, could you please create and attach a simple console application that will allow us to reproduce your problem?