首页 > 解决方案 > 无法加载文件或程序集'System.Text.Encoding.CodePages,版本 = 4.1.2.0

问题描述

我收到此错误:

An exception of type 'System.IO.FileLoadException' occurred in Neodynamic.SDK.WebClientPrint.dll but was not handled in user code
Additional information: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.2.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)

我试过的:

  1. 下载的示例项目

  2. 运行这个文件:WebClientPrint3WebFormsCS

  3. 添加 assemble:neodynamic.sdk.webclientprint.6.0.0项目成功运行后,但单击打印时出现错误:

    An exception of type 'System.IO.FileLoadException' occurred in Neodynamic.SDK.WebClientPrint.dll but was not handled in user code Additional information: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.2.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)

  4. 添加最新版本System.Text.Encoding.CodePages 5.0.0之后,它也会给出相同的错误Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.2.0

  5. 在谷歌上我搜索了 4.1.2.0,但不可用

  6. 我也尝试卸载和安装程序集文件,清理构建但也显示相同的错误

如果有人有任何与此相关的解决方案,请提供帮助。

标签: fileloadexception

解决方案


推荐阅读