문제

I am using SAP crystal reports in my wpf application, I am getting this exception at the time of initialization

              ExportOptions _ExportOptions = new ExportOptions();

this is the error I am getting "The type initializer for 'CrystalDecisions.Shared.ExportOptions' threw an exception."

and this is inner exception says

{"Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.":"log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"}

total inner exception including message is in this link

I tried to add the dll reference of the particular version, even though it is still showing the same issue. I am very worrying about this issue as I could not figure out the solution for a long time.

any help highly appreciated.

Thanks Ganesh

도움이 되었습니까?

해결책

My suspicion is that you don't have the runtime for CR installed correctly. A lot of people make the mistake and install the runtime using the msi installer instead of the exe. The msi does not integrate CR with VS, the exe does. As Raphael pointed out in his comment, this post has a very good thread and explanation by Ludek, who is one of the sharpest minds at SAP. You can download the exe here.

Hope that helps,

Chris

다른 팁

I had also faced same issue , i had change my projects Target framework to .NET Framwork 4 . you can change the same from project property->Application tab ->Target framework.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top