lazyload the images

最新精選 Featured post

漫畫 - 異世界 清單

訂閱


每月雙數周日為固定發佈日

本站內任何媒體的內容,包括但不限於 影片/聲音檔/文章/圖片,純屬資訊分享和教學用途, 本站內容只作為一般用途,它並沒有考慮您的個人需要、投資目標及特定財政狀況。 本站內容並非投資意見,亦不構成任何投資產品之要約、招攬或建議購買或出售任何存款或投資任何下述投資產品。

投資者須注意,所有投資涉及風險(包括可能會損失投資本金),投資產品的價格可升或可跌, 而所呈列的過往表現資料並不表示將來亦會有類似的表現。

投資者在作出任何投資決定前,投資者應進行所須或適當的獨立調查,包括評估所涉及的投資風險。

15/07/2026

crystal report SP37 cannot load file log4net

文章分類:

 



call crystal report 時報 cannot load file log4net


Error Details




System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

   at CrystalDecisions.Shared.SharedUtils..cctor()

   --- End of inner exception stack trace ---

   at CrystalDecisions.Shared.SharedUtils.get_CurrentControl()

   at CrystalDecisions.Shared.SharedUtils.GetEffectiveCulture()

   at CrystalDecisions.CrystalReports.Engine.CREngineRes.GetString(String name)

   at CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime()

   at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()

   --- End of inner exception stack trace ---


Scope

64bit .net 4.7 program

build in anyCPU

要generate report as pdf

那特別在 windows client 時沒有報錯



windows client 安裝 SP27 64bit runtime 便能跑

windows server 安裝 SP27 64bit runtime 後一直報錯


Try and Error

在windows server試了一大輪,

安裝 SP27 64 bit runtime 不行,一直報錯

都刪除,安裝 SP29 不行

都刪除,安裝 SP37 不行


都刪除,安裝了 SP37  32bit runtime

便沒有報錯,可以跑了


Solution 解決方法



海豚也不明白,怕32bit runtime少了什麼,因為一直都是用64bit runtime

所以連64bit 都安裝在win server上算了



Reference

log4net.dll and other errors like CrystalDecisions.ReportAppServer.*

https://community.sap.com/t5/technology-q-a/log4net-dll-and-other-errors-like-crystaldecisions-reportappserver/qaq-p/7583743

Downloads for SAP Crystal Reports, SAP Crystal Presentation Design and SAP Crystal Dashboard Design

https://origin.softwaredownloads.sap.com/public/site/index.html

No comments:

Post a Comment