Home Dashboard Directory Help

VS 2010 .NET 2: Cannot found CrystalReports references by Sergiu Dudnic


 as Not Reproducible Help for as Not Reproducible

Sign in
to vote
Type: Bug
ID: 560630
Opened: 5/21/2010 4:26:50 AM
Access Restriction: Public
User(s) can reproduce this bug


We have installed CR v.11 on machines.
Our solution (with mainly VB.NET projects) with the VS 2005 everything worked.

When moved to VS 2010.
The references to CrystalReports (Engine.dll, Shared.dll) in the References tab of a project ptoperties "The system cannot found the reference specifies".

So, I browse for these dlls and add it explicitly. Any effect, "The system cannot find the reference specified" still persists.

When I tried to set the target Framework to 4.0 (by default set to 2.0) the references to CrystalReports reappeared.
Sign in to post a comment.
Posted by ooooccc on 4/26/2011 at 1:01 AM
thanks Karl NZ for your solution it helped me.
Posted by Nolan Sunico Zambo on 11/7/2010 at 4:57 PM
In Visual Studio 2010 Crystal Report 11 will no longer be supported but SAP have provided us way to integrate Crystal Reports for Visual Studio 2010 by mean its Beta 2 version prior to this posting, soon new release will be available. To use Crystal Report 2010 in Visual Studio 2010 I have found links for you browse on, and honestly it really works for me.
Posted by Karl NZ on 9/29/2010 at 6:35 PM
Just wanted to post a follow up to anyone else having this problem. I have experienced this when upgrading a dotnet solution to VS2010 recently.

After some digging, I stumbled on this post which has the start of a work around: http://connect.microsoft.com/VisualStudio/feedback/details/538201/referencing-crystaldecisions-enterprise-framework-v12

What I have found is, that this happens when you have a Crystal Reports List xml file in the RedistList folder under %WINDIR%\Microsoft.NET\Framework\v2.0.50727\RedistList folder (and possibly one under the v4 framwork folder, but not v3.0 or v3.5), and that file has incorrect information in it about the current version of the assemblies you are trying to reference. The file name varies depending on what you have installed that created it but is usually something like "CrystalReportsList.xml" or CrystalReports12List.xml".

Looking at some of the machines around our office, I think these files get added by the Crystal Design-time installer, because only those machines with the design environment installed have these files In all cases the machine without it, or with version 12(2008) of it, they have no problems. In my case, it had old version info in the file (because I had installed an older version of the design time quite a while ago, but now am using Crystal 2008).

So, seeing that many other devs in my office DONT have this file, I just deleted it and everything worked again for all target platform versions. The workaround in the post says to edit it to the correct values, so if just removing it causes you problems you can try changing the file contents as suggested there.

Of course the other alternative for those who dont like messing with files, would be to try and install the Crystal 2008 Design Time components - I havent tried but presumably it would then create the correct list file here and solve the issue too (something I didnt want to do).

Hope this helps someone...
Posted by Microsoft on 7/9/2010 at 2:55 PM
We have not heard from you in a week. Thus, I am resolving this bug as Not Repro. Please reactivate as appropriate.
Posted by Microsoft on 7/9/2010 at 1:02 PM
Hi Ron

We do not think this is caused by the targeted project platform, but I want to confirm it just in case.

I see you mentioned .NET Framework 2.0, then 4.0 then 3.5. Can you clarify which framework are you targeting when it doesn't work? If you are not retargeting after conversion, then the project you get loaded in Visual Studio 2010 after conversion should target the same framework you were targeting in Visual Studio 2005, before the conversion. Is it 3.5 that you were targeting initially, in Visual Studio 2005?

If so, you also mention that after retargeting it was working, what was the framework you retargeted your project to? 4.0? If that is the case, can you check the project properties and see if you target a profile after conversion, in Visual Studio 2010? The reason I ask you that is because at least one of the Crystal Reports assemblies depends on System.Web, so if you target a profile, System.Web is not going to be there and Visual Studio won't be able to resolve the Crystal Reports references.

It would be of huge help if you could attach the build log, generated with diagnostic verbosity (you can change that from Tools - Options - Projects and Solutions - Build and Run - MSBuild project build output verbosity). After you set it, just build and copy the contents of the output window in a file.

A small suggestion, if you are installing Crystal Reports, I believe the assemblies are installed in AssemblyFoldersEx, that means you don't need to browse to the reference, but just add them from the .NET tab. That will also make it easier during conversion and you won't be tied on fixed reference paths (currently you have a HintPath).
Posted by Microsoft on 7/2/2010 at 7:25 PM
Could you set Tools | Options | Projects and Solutions | Build and Run | MSBuild Project Build Verbosity = Diagnostic? Then build the solution, copy/paste the text in the output window to a .txt file, and attach the file to this bug?
Posted by RonSchuler on 6/1/2010 at 1:26 PM
Had to go to the Compile Tab --> Advanced Compile Options --> Target CPU = x86
Then the 'The system cannot find the reference specified' message went away and I was able to compile.
I'm thinking that a "Cannot use 32-bit only assembly with a project configured for 'AnyCPU'" would be a more appropriate error message.
Posted by RonSchuler on 6/1/2010 at 8:28 AM
Forgot to mention, I am using .Net 3.5
Posted by RonSchuler on 6/1/2010 at 8:26 AM
Reference path is 'C:\~~Project\MyProject\References'
Project file path = 'C:\~~Project\MyProject\Framework\DDI.BLL'

Proj file contents:

    <Reference Include="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
    <Reference Include="CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
    <Reference Include="CrystalDecisions.Enterprise.InfoStore, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304">
    <Reference Include="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
    <Reference Include="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
    <Reference Include="CrystalDecisions.Windows.Forms, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
Posted by RonSchuler on 6/1/2010 at 8:20 AM
my solution file is one level deeper than the references folder.
CrystalReport dll references are at: ../References/xxx.dll
When I browse to the dll, select it, VS2010 shows 'The system cannot find the reference specified'.
In the properties of the reference, the Path property is blank, and the Resolved property is false.
Full path should be 'C:\~~Project\MyProject\References'
Posted by Sergiu Dudnic on 5/27/2010 at 10:14 AM
Should I download Crystal Reports for Visual Studio 2010, if I already have installed Crystal Reports as a alone product - v.11?

The question is why it does not take in consideration my installed Crystal Reports dll's in under .NET 2 but only in .NET 4.

Why under .NET 4 it works?

I mean, maybe installing CR for VS 2010 will fix it, but this is already a bug.

I browse for a reference dll, select it, and... nothing happens.
Posted by Microsoft on 5/27/2010 at 10:02 AM
Do you have Crystal Reports for Visual Studio 2010 downloaded?

Crystal Reports no longer ships as part of Visual Studio.
Posted by Sergiu Dudnic on 5/27/2010 at 1:35 AM
I am sorry, the issue is exactly inverse, I fixed the text, the references are not recognized when targeting to .NET Framework 2.0 (as by default after conversion), and fixed setting the target framework to ".NET Framework 4"
Posted by Sergiu Dudnic on 5/27/2010 at 1:27 AM
.NET Framework 4.
Posted by Microsoft on 5/25/2010 at 11:45 AM
Thank you for your feedback. Could you go to the Project Properties and see whether you are targeting the ".NET framework 4" or ".NET framework 4 Client"?
Posted by Microsoft on 5/24/2010 at 1:53 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Posted by Microsoft on 5/24/2010 at 1:50 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Posted by Microsoft on 5/21/2010 at 5:02 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Nolan Sunico Zambo on 11/7/2010 at 5:04 PM
Install Crystal Report 2010 Beta 2, by downloading CR2010 beta 2 and the Crystal Report Runtime engine. you can create a prerequisites installer for Crystal report 2010 Beta using the <a href="http://www.sourcehints.com/articles/Bootstrapper_Manifest_Generator.html">Boostrapper manifest generator</a> or you can follow this link for complete details on how to use Crystal Reports 2010 in VS2010. http://www.sourcehints.com/articles/How_to_use_Crystal_Report_2010_in_VS2010.html