locked
The type or namespace name 'CrystalReports' does not exist in the namespace 'CrystalDecisions' (are you missing an assembly reference?) RRS feed

  • Question

  • I am fed up of this error as it wont show up every time but would get this error only when i build,then i again go to add reference ,and remove and add following reference again:

    CrystalDecisions.CrystalReports.Engine
    CrystalDecisions.Enterprise.Framework
    CrystalDecisions.Enterprise.InfoStore
    CrystalDecisions.ReportSource
    CrystalDecisions.Shared

    and then i get this error:

    "The type or namespace name 'CrystalReports' does not exist in the namespace 'CrystalDecisions' (are you missing an assembly reference?)"

    here
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    Am i missing any reference?

    Please help.
    • Moved by Linda Liu Friday, June 11, 2010 3:25 AM (From:Windows Presentation Foundation (WPF))
    Wednesday, June 9, 2010 1:55 PM

Answers

  • Finally was able to solve my issue.

    The framework in project properties was set as .net Framework 4 client profile and i changed it to .net Framework 4

    and it seems to be solved for now.

    Monday, June 14, 2010 6:15 AM

All replies

  • When you remove and re-add the reference, does the error go away?

    Alternatively you may not be adding all of the required Crystal assemblies as references.


    http://blog.voidnish.com
    Wednesday, June 9, 2010 2:01 PM
  •  

    yeah,it wont show up,more then that i get this in intellisense too but when i build the appn it gives that error and  CrystalDecisions.CrystalReports.Engine wont come up in intellisense too and the when i re-add the reference,it looks fine until i build the appn again.

    Once i added all the references too,but all get mess after i build. Is there any combination of references to use for crystal report as it might be possible!!!

     

    Thanks

    Wednesday, June 9, 2010 2:09 PM
  • Ok, so since you've never had a successful build, it's obvious that you are missing one or more assemblies. You'd have to check the Crystal documentation or try a Crystal specific forum to figure out what DLLs you need to add.

    You could also open one of the sample projects and see what DLLs they have referenced there to get a basic idea of what to reference.


    http://blog.voidnish.com
    Wednesday, June 9, 2010 2:16 PM
  • i got this new reference here

    http://social.msdn.microsoft.com/forums/en-US/wpf/thread/8b9a13eb-f633-4b5f-886f-e2d2196b4b10/

    but it says :

    " Add a namespace mapping in XAML....

    Use WindowsFormsHost to host the CrystalReportViewer control..... "

     which i cant do as i am making a class and it has no XAML!

     

     

    still looking for a help!


    Wednesday, June 9, 2010 2:41 PM
  • Finally was able to solve my issue.

    The framework in project properties was set as .net Framework 4 client profile and i changed it to .net Framework 4

    and it seems to be solved for now.

    Monday, June 14, 2010 6:15 AM
  • My problem is almost identical. In the properties folder of the project I have these items

    app.manifest

    AssemblyInfo.cs

    Resources.resx

    Settingd.settings

    A search of these and a search of the entire solution did no produce a reference to "framework".  Am I looking for the right thing?

     Pls disregard. I found it .

    Thanks,

     

     

     


    swirling in .NET
    Tuesday, July 27, 2010 4:48 PM
  • good answer, thanks a lot.
    laputa
    Tuesday, April 19, 2011 5:11 PM
  • Correct, CR for VS 2010 requires the full Framework and is also the only version that support 4.0 framework.

    Also, CR for VS 2010 does not have any Enterprise Dll's, no connectivity to Business Object Enterprise in this version. So remove these 2 references also:

    CrystalDecisions.Enterprise.Framework
    CrystalDecisions.Enterprise.InfoStore
    Thank you
    Don

    Don Williams
    Tuesday, April 19, 2011 8:57 PM