Could not load file or assembly 'PDFLibNet, Version=1.0.6.6, Culture=neutral, PublicKeyToken=26d87f7d66fb2aee' or one of its dependencies


  最近开发一个项目,里面用到了PdfLibNet.dll这个组件来转图片,我的开发环境是windows server2003(32bit)的,当时开发后在自己机器上部署访问都是没有问题的,但是当部署到客户机器上时候,就出现了一个很严重的问题。如下图所示:

  3

    发现问题就要解决问题,于是通过google来寻找答案,还真有出现类似的问题,解决方案也大不一样,其中最常见的解决方法如下:

    解决方法:

    1.将应用程序 生成为 目标平台:Any CPU;
    2.程序部署到64bit的环境中去,把iis 应用程序池 --高级设置--启用32位应用程序 :true;

    这种方法是解决程序中引用文件不兼容的问题,是可以解决常见的asp.net中的”未能加载文件或程序集或它的某一个依赖项”这样的问题。但是问题又来了,这样的问题解决了兼容问题,那么部署到64bit的环境中会影响到已经存在的系统吗?这个我没尝试,希望有经验的朋友能给出答案。

    以上出现的问题和查找到的解决方法都无法解决我的问题,经过反复的研究,终于找到了解决我这里出现的问题的真正原因和解决方案,如下:

    原因:

    1.我们引用了32bit的PdfLibNet.dll文件,而服务器是64bit的,不兼容;

    2.在PdfLibNet.dll文档中也提到了,在引用此文件时确实会有此问题,即使引用64bit的PdfLibNet.dll也会如此;

    解决方法:

    1.引用64bit的PdfLibNet.dll;

    2.下载安装”vcredist_x64.exe”;

    我这里通过以上两步便将问题完全解决。 

   以下是解决问题中用到的资料文件:

   PdfLibNet.dll(32bit):http://download.csdn.net/detail/qixing_gan/4348710

   PdfLibNet.dll(64bit):http://download.csdn.net/detail/qixing_gan/4348719

   PDFlib-in-.NET-HowTo:http://download.csdn.net/detail/qixing_gan/4348732

   vcredist_x64.exe:http://www.microsoft.com/en-us/download/details.aspx?id=15336


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Could not load file or assembly 'System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not mat Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definiti Could not load file or assembly 'System.Private.ServiceModel, Version=4.1.2.4, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its depe Could not load file or assembly 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Could not load file or assembly 'Microsoft.Extensions.Hosting.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. .net core System.IO.FileNotFoundException: Could not load file or assembly 'xxxx, Version=xxx, Culture=neutral, PublicKeyToken=null'. 系统找不到指定的文件。 Could not load type 'System.Reflection.AssemblySignatureKeyAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c hangfire报错 Could not load file or assembly 'DynamicProxyGenAssembly2, Culture=neutral, PublicKeyToken=null'. 系统找不到指定的文件。 "Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b7
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM