I have created a WinForms application using C# 2010. It contains a report created using Crystal Reports for C# 2010. The target framework is .Net Framework 4 and the target platform is x86.
When I run the application on the customer’s computer it displays this error:
http://img824.imageshack.us/img824/6223/errorro.png
On my computer it works just fine. His OS is Windows Vista x64. My OS is Windows 8 x64. I have tried installing the x86 and the x64 runtimes but none worked. I have installed the x86 framework and tried to clear the temp folder, install all the updates, install the .Net Framework 4 distributable and mostly every suggestion I found on the internet, but this error keeps appearing.
The program also has a config file with the following content, without which the Report doesn’t work on any computer (I think it is a known bug):
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
</configuration>
It works on another computer running Windows 7 x64 with the x86 CR Runtime and it works on mine but I cannot get it to work on his computer and another one running Windows 7 x64. I have been trying to get it to work for days but to no avail. The program works perfectly, except for the form containing the Crystal Report. Any help is greatly appreciated.
I found the solution. Although the client had a version of .Net Framework 4 installed [not the Client Profile], it required the extended version found here:
http://www.microsoft.com/en-us/download/details.aspx?id=17851
Hope all the time I wasted comes to good use for anyone having the same problem.