locked
The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?) RRS feed

  • Question

  • Hi,

    I designed an application using VS2005 , and I used the CrystalReports in it.

    Now , I am trying to run it using VS2010 , but I have got the following exception :

    "Error 62 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?)"

    How can I resolve this problem,

    Thanks a lot in advance.

    Aya.

    Monday, April 25, 2011 4:53 PM

Answers

  • I would try deleting the references to the libraries then add them back.
    public enum Answers { Everything = 0x2A }
    Monday, April 25, 2011 5:46 PM
  • Ya, as the prior suggestion, delete the references first.
    Remove the .rpt file from the Solution Explorer, then right click the project name in the Solution Explorer --> Add --> Existing Item... to choose the .rpt file and add it. After perform this, the following references will be added automatically:

    CrystalDecisions.CrystalReports.Engine
    CrystalDecisions.ReportSourc
    CrystalDecisions.Shared


    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 28, 2011 8:36 AM
  • Yes, I have installed VS2005 in order to try my application on it, once it installed the problem of the vs 2012 is solved. that is because the vs 2005 solved the problem of the absence of CrystalRepors in vs 2012.


    Aya Zoghby

    • Marked as answer by ZoghbyAya Wednesday, October 3, 2012 6:22 PM
    Wednesday, October 3, 2012 6:22 PM

All replies

  • I would try deleting the references to the libraries then add them back.
    public enum Answers { Everything = 0x2A }
    Monday, April 25, 2011 5:46 PM
  • Ya, as the prior suggestion, delete the references first.
    Remove the .rpt file from the Solution Explorer, then right click the project name in the Solution Explorer --> Add --> Existing Item... to choose the .rpt file and add it. After perform this, the following references will be added automatically:

    CrystalDecisions.CrystalReports.Engine
    CrystalDecisions.ReportSourc
    CrystalDecisions.Shared


    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 28, 2011 8:36 AM
  • just changed target .net farmawork to 4.0

    good luck

    :D

    Friday, May 4, 2012 10:32 AM
  • Leo Liu [MSFT] I had to run custom tool before they were added automatically. Right click, "Run Custom Tool" viola! The references are back. I am now going to make sure my target framework is set correctly if this doesn't work right... (two minutes... okay I'm back...)

    Okay, I followed the other directions to change the target framework from ".NET Framework 4 Client Profile" (the default) to ".NET Framework 4". It compiles... Now I can proceed. I also noticed that the CrystalDecisions objects appeared in the Object Browser -- a dead giveaway that something was amiss!

    When deploying a WPF application should these dlls be marked as copy local too?

    HAL_2010 (Hello Dr. Chandra...)

    Friday, September 28, 2012 12:34 AM
  • Thanks all for your replies.

    I have tried to remove the CrystalReport.rpt file and adding it again, BUT I couldn't found it in the Add --> Existing Item list!!

    Also, I have tried to change the framework to be .Net 4.0, but the problem still appears.Waiting your suggestions.

    Thanks so much.


    Aya Zoghby

    Wednesday, October 3, 2012 8:22 AM
  • Thanks all for your replies.

    I have tried to remove the CrystalReport.rpt file and adding it again, BUT I couldn't found it in the Add --> Existing Item list!!


    I have found it as a hidden file in the backup directory, but even I added it, the references:

    CrystalDecisions.CrystalReports.Engine
    CrystalDecisions.ReportSourc
    CrystalDecisions.Shared

    are Still missing, they aren't added automatically.


    Aya Zoghby

    Wednesday, October 3, 2012 9:23 AM
  • If i am right, Crystal doesn't came included in VS2010, only the older versions, you probably should download the Crystal and then add the needed references.

    Web Developer

    Wednesday, October 3, 2012 12:04 PM
  • Yes, I have installed VS2005 in order to try my application on it, once it installed the problem of the vs 2012 is solved. that is because the vs 2005 solved the problem of the absence of CrystalRepors in vs 2012.


    Aya Zoghby

    • Marked as answer by ZoghbyAya Wednesday, October 3, 2012 6:22 PM
    Wednesday, October 3, 2012 6:22 PM
  • Thanks, its working..........
    Thursday, July 3, 2014 6:14 AM
  • In my case i checked assembly in VS 2010 project add reference option and could not found. So i tried to add missing assemblies by NuGet package. I search missing assembly name online and add required. It solved my problem.

    Thank,

    Muhammd Yaseen

    Wednesday, December 21, 2016 9:32 AM