Reputation: 139
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?)
I've tried the following to resolve this:
Added Namespaces :
CrystalDecisions.CrystalReports.Engine;
CrystalDecisions.Shared;
CrystalDecisions.ReportSource;
Target Framework set to .Net Framework 4.
Upvotes: 6
Views: 35741
Reputation: 33
I have also experience the same issue, i just install the crystalReport run time file and work for me . you can take help from (https://www.tektutorialshub.com/crystal-reports/how-to-download-and-install-crystal-report-runtime/)
Upvotes: 0
Reputation: 41
I also experienced the same issue. So I realized that my project target framework had changed to 3.5 and I upgraded the framework to 4.5. It helped to resolve my issue.
Upvotes: 0
Reputation: 124
Try this:
Locate your C# project file ( YourProjectName.csproj ).
Open it using Notepad++ or any other text editor.
Press Ctrl + F and find for <Reference Include=
There should be a CrystalDecisions.CrystalReports.Engine
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" />
Upvotes: 2
Reputation: 424
I reopen the project folder by File>Open>Web Site...
and save anoter solution, and the error missing.
Upvotes: 0
Reputation: 935
I just faced this error while running a windows forms application in VS 2019 and below were the steps I took to resolve it:
What I noticed was just that the .Net framework version for the packages in the packages.config file was changed from net45 to net40.
So apparently, I have been referencing the wrong .Net version but I wouldn't have realized because the project was building fine before I switched to VS2019.
Upvotes: 2