0

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

4

2 回答 2

2

我怀疑您没有正确安装 CR 的运行时。很多人犯了错误并使用 msi 安装程序而不是 exe 安装运行时。msi 没有将 CR 与 VS 集成,exe 可以。正如 Raphael 在他的评论中指出的那样,这篇文章有一个很好的线索和 Ludek 的解释,他是 SAP 最敏锐的头脑之一。你可以在这里下载exe 。

希望有帮助,

克里斯

于 2013-10-29T23:18:14.777 回答
0

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.

于 2013-10-29T08:02:11.000 回答