I have a report that is using an EntityDataSource to access data from an EntityFramework context in a separate assembly. When I try to view this report in preview, I see the following message in the Preview tab: "Exception has been thrown by the target of an invocation. Could not load type '<My EF Context Type>' from assembly '<My EF Context Assembly>" This appears to be all the help I get with this issue. How can I move forward? Is there any form of logging that I can access etc. etc? I have subscribed to the report's Error event but that isn't fired.
By the way: I have also written a console application that instantiates the report and exports it to PDF using the ReportProcessor. This works just fine so I know the issue isn't a simple missing reference or similar. Clearly, the report preview functionality has some extra requirements that I am not fulfilling.
Windows 7 64-bit, VSTS 2017 targeting .NET 4.5, Telerik Reporting 22.214.171.1244.
- My context has a constructor that accepts a connection string and when run through the console app, a break point reveals a correct connection string going in and being passed to the base EF context class.
- I have added the assembly that defines my EF context into the Telerik section of the Telerik report assembly's app.config, in the <assemblyReferences> section.
- My EF context is database first.
- The assembly (project) that defines the report references EF, EF,SqlServer and my own assembly that defines my EF context.
I'm not sure what else you will need so I'll leave it like this for now. Let me know if you need anything else.