I can’t figure out why I keep getting this error, is this something anyone can help with? The one thing I’m wondering is I did recently update my license but I am still using an older version of aspose. Are there any requirements around that that could be causing it?
│ Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=[redact] │
│ File name: 'System.Text.Encoding.CodePages, Version=8.0.0.0, Culture=neutral, PublicKeyToken=[redact]' │
│ │
│ │
│ Fatal error. Internal CLR error. (0x80131506) │
│ at Aspose.WrpGen.Interop.ExchangeHost.InitServices()
It looks like you’re encountering a System.IO.FileLoadException related to the System.Text.Encoding.CodePages assembly. This issue can arise if the required assembly is not available in your project or if there are version mismatches.
Cause: The error typically occurs due to missing assembly references or incompatible versions of the libraries in your project.
Solution: Here are some steps you can take to troubleshoot and resolve the issue:
Check Assembly Reference: Ensure that the System.Text.Encoding.CodePages assembly is referenced in your project. You can add it via NuGet if it’s missing:
Install-Package System.Text.Encoding.CodePages
Version Compatibility: Verify that the version of Aspose you are using is compatible with your version of .NET and the assemblies you have. Newer licenses may require the latest versions of the libraries.
Update Packages: Update all your NuGet packages to their latest versions to resolve any compatibility issues:
Update-Package
Clean and Rebuild: After making changes, clean your solution and rebuild it to ensure that all references are correctly updated.
Check for Conflicts: If you have multiple projects in your solution, ensure that they are all referencing compatible versions of the assemblies.
Next Steps: Follow these steps and check if the issue persists. If you continue to encounter problems, please provide more details about your project setup, and I will assist you further.
Thank you for your patience, and I look forward to helping you resolve this issue!
It seems your application or Aspose (.NET) API version may not be compatible with .NET 8, especially older Aspose API versions which were built for .NET 4.x or .NET Core 3.1/.NET 5/6. If you’re using an older Aspose DLL with a newer .NET runtime, you might hit compatibility issues, especially with assemblies like System.Text.Encoding.CodePages. It is best you use and upgrade to latest version of the Aspose APIs.
Anyways, could you please specify which Aspose (.NET) API/component (Aspose.Words, Aspose.PDF, etc.) you are using and which version?
I was using
“aspose-cells-python==25.4.0”,
“aspose-email-for-python-via-net==25.4”,
“aspose-pdf==25.4.0”,
“aspose-slides==25.4.0”,
“aspose-words==25.4.0”,
Though I tried swapping these to 25.7 and got the same error
Refreshing the license is unlikely to cause such an issue. Would you kindly create a standalone sample project (source code using Aspose APIs without compilation errors) to help us reproduce the issue on our end? We will check your issue soon.
PS. please don’t include your license with the project, we will use a valid license to test your scenario/case.