CS0246: The type or namespace name 'CrystalDecisions' could not be found

19,142

Try this:

  1. Locate your C# project file ( YourProjectName.csproj ).

  2. Open it using Notepad++ or any other text editor.

  3. Press Ctrl + F and find for <Reference Include=

  4. There should be a CrystalDecisions.CrystalReports.Engine

  5. If it isn't add this, use the correct version:

    <Reference Include="CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
    <Reference Include="CrystalDecisions.ReportSource, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
    <Reference Include="CrystalDecisions.Shared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
    <Reference Include="CrystalDecisions.Windows.Forms, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
    <Reference Include="FlashControlV71, Version=1.0.3187.32366, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    
Share:
19,142
Paulius
Author by

Paulius

I'm a bright, ambitious and self-motivated web developer, currently developing my programming skills, specializing in HTML5, CSS3 and JavaScript. I know who is jQuery, AngularJS, Bootstrap, AJAX. Currently working with ASP.NET, C# applications.

Updated on June 07, 2022

Comments

  • Paulius
    Paulius almost 2 years

    I trying open already created ASP.NET project in another PC locally via IIS manager. But I'm getting this error:

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

    enter image description here

    I've tried the following to resolve this:

    1. Added Namespaces :

      CrystalDecisions.CrystalReports.Engine;
      
      CrystalDecisions.Shared;
      
      CrystalDecisions.ReportSource;
      
    2. Target Framework set to .Net Framework 4.

    3. Installed CrystalDecisions.CrystalReports.Engine via NuGet Package manager.