cancel
Showing results for 
Search instead for 
Did you mean: 

Problem upgrading from Visual Studio 2008 to 2010 with Crystal Reports

Former Member
0 Kudos

Hello,

I have a web site that was developed using Visual Studio 2008, targeting the 3.5 .NET framework.  I recently tried to upgrade it to .NET 4.0 by running the conversion utility in Visual Studio 2010 that starts automatically when opening the solution there.  The converter recognized that Crystal Reports also needed to be upgraded.  I have several pages with reports that use the CrystalReportViewer to display content.  These pages no longer work after the upgrade.  I receive this error: 

"Could not load file or assembly 'CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."

I don't understand why it's looking for Version 10.5.3700.0.  The conversion utility ran without error and I was able to install the Support Pack 7 Executable for Crystal Reports (version 13.0.6.x) without a problem.  All of my reports were automatically edited to reference version 13 of CR.  All of my references in the project were automatically updated to reference version 13.  I've searched the text of my entire solution and I cannot find any references to CrystalDecisions.Web, Version 10.5.3700.0. 

Why is my solution hanging on to version 10.5 somewhere without any code referencing it?

Thanks,

Tom

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Tom

The problem - I suspect - is that you have VS 2008 and CR 10.5 (bundled with VS 2008) installed on the same computer. Unfortunately, this wil not work and you will have to uninstall CR 10.5. You should be able to do this from Add / Remove. You could remove the reference to 10.5 in the web.config and add the ref to version 13 assemblies, but as soon as you open that project the next time, CR 10.5 will insinuate it' self into the project. I am told this is an MS issue, but I don't know. I do know that uninstalling CR 10.5 will solve the issue. BTW.; this issue does not come up on runtime computers. There CR 10.5 and CRVS are side by side compatible.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi Ludek,

Thanks for the suggestion.  I looked in Add/Remove programs and I do not see a version of Crystal Reports listed there besides CR 13.  Unfortunately, that easy fix is not an opotion.

I copied this application down from a Team Foundation Server 2010 server to my local machine, which is actually fairly new and is not set up to run Visual Studio 2008.  So I'm opening this application and running the conversion for the first time on this machine using Visual Studio 2010.  However, there is a "VS 2008 Shell (integrated mode)" installed on this machine.  While I can't find any references to CR 10.5, I wonder if it's bundled into that VS 2008 shell.

Tom

former_member183750
Active Contributor
0 Kudos

Hmmm - CR 10.5 is part of the install of VS 2008,  but you had to do a custom install to get it. So, it was not part of the "shell". So, the question then will be, where is the app getting the CR 10.5 from? Perhaps using Process Monitor will tell us. Just run the app (you probably want to filter procmon for the process, else it makes pretty huge logs). Once you get the error, save the log and look for the CR 10.5 assemblies.

- Ludek

Former Member
0 Kudos

I tried running the Process Monitor, but for some reason doing so disabled my web browser.  The browser would launch, but it could not load any web pages.  It would stop responding.  I had to reboot my machine to get the browser to work properly again.

Anyway, I'm not sure I'd see CR 10.5 assemblies anyway, as I'm pretty sure I don't have any.  Otherwise, wouldn't my application be able to find them? 

I tried something else, out of curiosity.  I created a brand new web site in VS2010 with a simple Crystal Report.  That report works just fine.  Can I assume the source of my problem is not your original idea?  Since if the problem is a sneaky CR 10.5 insinuating itself into the project, it should have done the same to my new project, right?  So perhaps the problem lies in the web project itself that I'm trying to upgrade and not the system on which it's running.

- Tom

former_member183750
Active Contributor
0 Kudos

The point is that I do not expect to see the 10.5 assemblies either, but I do expect to see where the process is looking for them and this may lead us to discover why...

BTW.; they procmon one more time. I've never, ever heard of it disabling web browsers... Maybe try another web browse(?). E.g.; if you're using firefox, try IE?

- Ludek

Former Member
0 Kudos

OK, Process Monitor is working with the browser now.  Not sure what was wrong before.  I applied a filter on the Path, excluding everything that did not contain the text "crystal" and I turned up a couple of lines after I ran my application.  I'm curious if this means anything to you.  It looks like the process "WebDev.WebServer40.exe" is trying to perform the operation "RegOpenKey" on the following two paths:

HKLM\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_policy.10.5.CrystalDecisions.Web__692fbea5521e1304

HKLM\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\policy.10.5.CrystalDecisions.Web__692fbea5521e1304

In both cases the result is "NAME NOT FOUND" with a detail of "Desired Access: Read".

-- Tom

former_member183750
Active Contributor
0 Kudos

It's only a reg key, so you'd think this would not be causing as much havoc as you're seeing. What happens if for laughs, you create that reg key?

- Ludek

Former Member
0 Kudos

Adding those two reg keys allows it to move on to another set of "NAME NOT FOUND" errors.  This time looking for subkeys "2", "1", and "0" under the ones I created.  So I went ahead and created "2", "1" and "0" for more laughs. 

Now it succeeds in opening (for one example) "HKLM\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_policy.10.5.CrystalDecisions.Web__692fbea5521e1304\2"

But then it leaves a result of "NO MORE ENTRIES" for the operation "RegEnumKey" on that key it opened. 

I also see this new error show up now:  Process "devenv.exe" performs operation  "CreateFile" on the path "C:\Users\Me\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\0DIRDAZG\C__Windows_Microsoft.NET_Framework_v4.0.30319_ASP.NETClientFiles_crystalreportviewers13_js_dhtmllib_images_skin_standard_style-fds90[1]..css" with the result "NAME NOT FOUND"  and details "Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a"

- Tom

former_member183750
Active Contributor
0 Kudos

Open up every page with a viewer, go to the html view of the page and replace the 10.5.3700.0 with the 13.0.x version. 

Then, as a double check, make sure web.config only references v13 runtime, though the wizard should have done that correctly.

- Ludek

Former Member
0 Kudos

Just to be clear, you're talking about these page directives, right?

 

<%

@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR"%>

If so, the upgrade process already changed those automatically on all nine of my pages with a report viewer. 

- Tom

former_member183750
Active Contributor
0 Kudos

Yes.

If your peoject has a number of forms with the CR viewer on them, it may not be bad idea to delete the viewer(s) and re-add it.

- Ludek

Former Member
0 Kudos

Ludek!  The problem is solved.  It turns out to be a forehead slapper of a solution.  This visual studio 2008 solution I was upgrading is one I hadn't worked on in over a year.  Since the last time I used it some properties were edited to disable building of the project that contained the Crystal Reports.  So I had to get that project building again and make sure certain files weren't marked read-only.  Finally, with a freshly built DLL for the upgraded project, the pages are no longer seeking CR 10.5. 

Thanks for your time.  The process of pursuing and ruling out other things certainly led me to realize the solution. 

- Tom

former_member183750
Active Contributor
0 Kudos

Hello Tom

Many thnx for letting us know the solution. You had a few people scratching their heads around here

- Ludek

Answers (0)