Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1318
  • Last Modified:

Can't Add Crystal Reports to WPF Application in Visual Studio 2010

After downloading and installing the Crystal Reports package for VS 2010 and adding a generic report I get the following errors and warnings:

Errors...
-The type or namespace name 'Shared' does not exist in the namespace
-             "                                  'ReportSource'                "
...

Warnings...
The referenced assembly "CrystalDecisions.Shared, Version=14.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
...

It looks like it only works for a web project.  Will Crystal work in a WPF Application?  If so, how?
0
sbooth1117
Asked:
sbooth1117
  • 2
1 Solution
 
13598Commented:
That is because you are using .net framework 4 Client.
Change it to .net framework 4 not client. That should resolve this error message.
0
 
13598Commented:
To change the target .NET Framework version or profile
In Visual Studio, open the project you want to change.

Right-click the project in Solution Explorer and then click Properties.

In the Project Designer, locate the Target Framework list, as follows:
For Visual Basic projects, click the Compile tab and then click Advanced Compile Options. The Target Framework list is in the Advanced Compiler Settings dialog box.

For Visual C# projects, the Target Framework list is on the Application tab of the Project Designer. For more information, see Application Page, Project Designer (C#).

For Visual F# projects, the Target Framework list is on the Application tab of the Project Designer.


In the Target Framework list, select  .NET Framework 4 (only 4 NOT 4 Client).
When you click OK, the project unloads and then reloads in the integrated development environment (IDE). The project now targets the .NET Framework version that you just selected.
0
 
sbooth1117Author Commented:
Great, that was it.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now