Search code examples
c#visual-studio-2010telerik-reporting

Telerik Reporting Class Library not found C#


I created a new Telerik reporting class library (single report for now) which builds successfully in VS2010 [10.0.30319.1 RTMRel]

I want to test/debug, so I add a WinForms project called "Tester" to my solution containing the above class library, and I make Tester the startup project.

In Solution Explorer, I right click on the References node beneath project Tester and choose "Add Reference" from the context menu. From the Projects tab of the dialog, I select MyTelerikClassLibrary.

Back in WinForm1 in the Tester project, I want to declare an instance of Report1, and Intellisense shows me MyTelerikClassLibrary.Report1:

        MyTelerikClassLibrary.Report1 R1 = new MyTelerikClassLibary.Report1();

I examine the solution Build Order which shows this order:

MyTelerikClassLibrary
Tester

On the Dependencies tab it shows that Project Tester depends on MyTelerikClassLibrary.

HOWEVER... When I go to build the project, I get this error:

   Error    4   The type or namespace name 'MyTelerikClassLibrary' could not be found (are you   missing a using directive or an assembly reference?

MyTelerikClassLibrary.DLL has been created and resides in the /bin/debug directory beneath the class library project director.

Why can't I build the project?


Solution

  • So your winform project, besides referencing your class library. Do you also have references for Telerik.Reporting, and Telerik.ReportViewer.WinForms ?

    And when you look at the reference for "MytelerikClassLibrary" try setting Copy Local to True.