Avatar of NoraWil
NoraWil
Flag for Belgium asked on

Crystal Reports 2010 for Visual Studio still depending on framework 2.0.50727?

Hi Experts,
I want to convert a Visual Basic 2010. It is now targered for framework 3.5 and I want to use framework 4.0. Everything works fine except for the Crystal Reports modules. They are still dependent on v.2.0.50727. I have installed the newest version of Crystal Reports 2010 for Visual Studio (it's called Crystal Reports for Framework 4.0).
I know there is a workaround by adding some code to app.config to make the runtime work in a kind of legacy mode, but that is not what I want.
I thought it is possible to run Crystal Reports in a true framework 4 environment. What am i doing wrong?
Visual Basic.NETCrystal Reports.NET Programming

Avatar of undefined
Last Comment
NoraWil

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike McCracken

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
NoraWil

ASKER
Thank your for your reaction.
I think I did. The path of the files points to a .NET 4 location.
I include an image with the properties for one of the modules.
crystal.png
Haver Ramirez

you must use crystal reports v13 not v14 this version has problems,
http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp
i use netframework 4 in my aplications without problems
NoraWil

ASKER
Thanks for the reply.
As you probably noticed in the image I attached to my previous posting, I do use version 13.
Actually I build my reports in Crystal Reports 2008 (which is version 12) and I show them using the reportviewer of Crystal Reports for Visual Studio 2010 (= version 13).

Adding

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
</configuration>

to my config file does the trick. This solution is probably not that bad because .NET 4 is uses when possible and lower versions are only used when the higher version does not work.
So why bother? Well, I don't like the idea of using legacy modes, when there is no need to.
When the latest version of CR for VS is able to work in full .NET 4 mode, I would like to accomplish this, but I still don' know how.
Even when I start a new project and I only add the necessary code to show a basic report, I get the same error.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Haver Ramirez

<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>

Open in new window

SOLUTION
Haver Ramirez

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
NoraWil

ASKER
This isn't the solution I was hoping for (because I knew this approach already), but it looks like there is no beter solution.