Solved

VB.Net Deployment Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version=9.1.5000

Posted on 2010-08-13
15
1,372 Views
Last Modified: 2013-11-07
We have a project which was converted from VS2003 to VS2008. The project references have been changed to crystal 11, however on deployment, it still gives the above message which relates to CR 9 which comes with VS2003.

What is the best solution :

Can I remove the requirement for CR9 in the project (I can't find any reference to it) or do I build a setup file for the project or is there another alternative?

Note the deployment machine has a version of crystal installed on a Windows 7 environment.

Also - the strange thing is the version 2003 works on the deployment machine yet we've made no changes to the reports in the new version.

Thanks.
0
Comment
Question by:Lehause
  • 9
  • 4
15 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 33429503
Remove the reference to CR9 from the project and make sure it is not in the web.config. Also verify that the dll isn't in the bin. After that it should build just fine.
0
 
LVL 1

Author Comment

by:Lehause
ID: 33431195
Thanks for your input.
Check the references and there is none to CR9, in the app.config (win form project) and it also looks fine.

Here is more history on this saga!

Project was converted from 2003 to 2008 VS.NET.
Initially we had an issue with the converted project referencing incorrect version of Crystal.
We eventually managed to remove the incorrect reference and assign it to Crystal X1.

Tested and all is well.

Except for when it comes to the 1st deployment, laptop is windows 7, throws the error listed above when running the app.
We decided to cheat and install the runtime files for CR9 on the laptop (as well as SP1 & 2) as nothing was working for us (Crystal X1 was already installed).

Now we have a version on the laptop which will run without the error above but fails to run any reports - get invalid object message.

If I re-set the references and re-create the exe and install it on the laptop, once it tries to load a report it crashes on application error.

I've checked the GAC on the laptop and all versions expected are listed.

So suggestions:

1) The laptop has got issue with Crystal - uninstall all versions/patches and re-install again?
2) Re-convert the project from 2003 in case there was some corruption issue 1st time round (getting very vague here)
3) There is something missing in the build?

Any opinion welcome??

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 33434642
What version of CR XI is installed?
Open Crystal
Click HELP --> ABOUT CRYSTAL

There is a service pack to upgrade CR XI to be compatible with Winodws 7.

mlmcc
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 1

Author Comment

by:Lehause
ID: 33447220
Thanks - Crystal runs fine itself in Windows 2007, but I found the following:

" Unknown to me Crystal Reports XI does not work with VS2008 as it throws all sorts of errors due to a conflict I suspect with the built in version of Crystal V10. There are various posts listed on the SAP web site that confirm this position"

This was posted Dec 2009.
The SP release 2 for crystal was released in 2007 to ensure compatibility with VS2005.
The last SP(4) listed was released in Jun 2008.

Seeing as my App works fine in XP but fails in Crystal, I don't think SP will resolve this for me.

This guy suggested a workaround by developing his report handling in VS 2003/2005 in a control and calling that from VS2008. He had the same issue as me :

--
"
The following code was used very successfully until I updated the program from VS2005 to VS2008 and the machine to windows 7


            'open new instance of report viewer form and set report to show and selection criteria
            Dim ViewerForm As New CReportViewer
            Dim cReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            cReport.Load(stReport)

Since the upgrades the code crashes the entire program at Dim cReport..."
--


0
 
LVL 1

Author Comment

by:Lehause
ID: 33447262
I meant to say :

Seeing as my App works fine in XP but fails in Windows 7, I don't think SP will resolve this for me.

And when I refer to Crystal, I refer to Crystal X1.
0
 
LVL 1

Author Comment

by:Lehause
ID: 33453692
To round this off and due to time constraints, I've decided to develop the report section of the app in a VS2005 control and call this from VS2008. Will confirm when this is complete and tested.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 33458159
WHat exact version of Crystal XI

Open Crystal
Click HELP --> ABOUT CRYSTAL

mlmcc
0
 
LVL 1

Author Comment

by:Lehause
ID: 33476670
Exact version is : 11.0.0.1994
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 33482089
That is Crystal XI Release 1 which doesnt work with VS2005.  I suspect it may not work with VS2008 since they have dropped support for it.

Release 2 CRystal XI is version 11.5.x.xxxx

mlmcc
0
 
LVL 1

Author Comment

by:Lehause
ID: 33486469
Ok - installed Release 2 (SP 1,2,3 & 4). Crystal version on the Windows 7 PC is now : 11.5.10.1263

When I attempt to run the application which references Crystal X1, it causes a crash in Windows 7 when it references a report.
Same app will work on XP.

Will look to install these SP's on the build machine, re-reference the crystal controls to the new versions and go from there.

Time is ticking on this so will probably finish developing the control in VS2005 and call the reports from this.

Will update again..
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 100 total points
ID: 33490430
Release 2 has a later SP that provides compatibility with Win 7
I think it is SP6

Yes, you will need to update the application to use the new dlls.

mlmcc
0
 
LVL 1

Author Comment

by:Lehause
ID: 33500581
Thanks mlmcc,

Cannot locate SP 6 for Crystal X1 rel 2, there is a mention of SP 5 but I cannot seem to find the download for it. Will continue to check and will update later..
0
 
LVL 1

Author Comment

by:Lehause
ID: 33500736
Ignore that last post - located links to SP 5 and SP 6. Will test with these and come back..
0
 
LVL 1

Accepted Solution

by:
Lehause earned 0 total points
ID: 33511113
Ok folks, due to time constraints, we decided to bite the bullet on this one and upgrade to Crystal 2008.
We found some calls on the Crystal site to say that VS2008 is not supported with Crystal X1 so after banging our head off the desk for the last week, we decided to upgrade.

Installed Crystal 2008, SP 1 & 3. Built application.
Installed runtime SP 3 for crystal 2008 on the deployed machine and hey presto everything appears correctly.

There is 1 report that displays no data (it's the only XSD source report in the reports) but that is a separate question.

Thanks for all your input on this, was helpful.

Advice to anyone using VS2008 with Crystal X1 - upgrade!!

Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question