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