问题
I'm using Visual Studio 10 with Crystal Reports for .Net installed. My development environment is a 64 bit pc with Windows 8 on. Everything works fine on my development pc but when I install the app on the client pc I get an Appcrash windows error on the SetDataSource of the reportclass. The only info on the crash is the KernelBase.dll is the fault module. When I look at Windows Event viewer it says there was a filenotfoundexception, but doesnt give the name of the file it is looking for.
The client pc is a 32 bit windows 7 pc. I installed the latest 32 bit runtime files on it.
Can you please help me to figure out what the problem is?
Thanks
回答1:
Bit late, but for those who encounter this common problem. yourApp.exe.config contains this line
`<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
change it to
<startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
and problem is solved
回答2:
I know this thread is old, but I ran into a similar problem (appcrash in kernelbase.dll) when upgrading my project to VS 2017 with Crystal Reports. Got the crash on the SetDataSource call. Added the line to my app.config file and the problem was solved. Hope this can help someone else as this solution really helped me!
来源:https://stackoverflow.com/questions/15951142/appcrash-on-setdatasource-of-crystal-report