I have developed one software in C#.
I have used crystal report in my app.
Now i am deploying it on another system
and when try to access form which contain crystal reports. Getting error like this.
"The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument'
threw an exception
I am using visual studio to developed application.
Dot Net framework 4.7.2 is used in my application
Crystal Reports for .NET Framework 4.0 is using on my application.
Note that when i am deploying same software on windows 7 (32 bit), it is working perfectly
but
when i am deploying same software on windows 10 (62 bit), its is throwing an exception.
Error message is something like this
Error Message[
^]
I have checked that CLSID which is coming in error message is found at following location in registry
Computer\HKEY_CLASSES_ROOT\CLSID\{4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B}
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B}
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B}
What I have tried:
I have installed required Crystal Reports runtime on deployment system.
Also changed target framework of all the project in same solution to x86