System.IO.FileNotFoundException: 未能加載檔案或程式集“Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”或它的某一個依賴項。系統找不到指定的檔案。
檔案名:“Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91”
報錯堆棧,意思是:用戶端缺少了 Microsoft.ReportViewer.Common 檔案,
然後我搜尋整個計算機找到對應的dll檔案後,還是報錯,上網搜了好久,
缺少哪些檔案或程式集,到程式開發計算機下找到對應的烤到用戶端的程式啟動目錄下即可(項目烤到Bin\\Debug目錄下)
隻能用指令的方式烤:
11.0.0.0 是版本号,89845dcd8080cc91 你打開 C:\WINDOWS\assembly\ 看一下就知道什麼意思了
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Design.resources\11.0.0.0_zh-CHS_89845dcd8080cc91\Microsoft.ReportViewer.Design.resources.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.ProcessingObjectModel.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebDesign\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebDesign.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebDesign.resources\11.0.0.0_zh-CHS_89845dcd8080cc91\Microsoft.ReportViewer.WebDesign.resources.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WebForms.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms.resources\11.0.0.0_zh-CHS_89845dcd8080cc91\Microsoft.ReportViewer.WebForms.resources.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.WinForms.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms.resources\11.0.0.0_zh-CHS_89845dcd8080cc91\Microsoft.ReportViewer.WinForms.resources.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Types\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Types.dll C:\
copy C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Types.resources\11.0.0.0_zh-CHS_89845dcd8080cc91\Microsoft.SqlServer.Types.resources.dll C:\
rdlc報表winform用戶端的配置安裝是個麻煩事,老報錯,記下,僅供參考!
版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。