Vlad Schnakovszki
Vlad Schnakovszki

Reputation: 8601

C# / Crystal Reports Error

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.

Upvotes: 0

Views: 1402

Answers (3)

Vlad Schnakovszki
Vlad Schnakovszki

Reputation: 8601

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.

Upvotes: 1

b.pell
b.pell

Reputation: 4278

The error message on that image is talking about "System.Web" missing. So, if you're running a WinForms application then I suspect that you're using the ".Net Framework 4 Client Profile" and not the full ".Net Framework 4".

In your project settings, change the target framework to be ".Net Framework 4" and NOT ".Net Framework 4 Client Profile". This will at least probably fix the cannot load assembly System.Web error.

Upvotes: 1

Val Bakhtin
Val Bakhtin

Reputation: 1464

If it is missing .net assembly, you can use fusion log msdn to check what library is missing, if .net part is fine, check with dependency walker link.

If all dependencies are fine - check windows event log for errors, there may be some hints on security part.

And it may not be exactly it, but I solved my problem with this link.

Upvotes: 0

Related Questions