Assembly Used in ObjectDataSource is Not Loaded by the Standalone Report Designer
|Product||Progress® Telerik® Reporting|
The Standalone Report Designer may not recognize the main ObjectDataSource assembly even though the assembly is properly added to the designer folder and registered in its configuration file when this assembly depends on other assemblies.
The reason is that the Standalone Report Designer cannot find the external assemblies when trying to get the data source schema.
You may use Fuslogvw to investigate the issue. The idea is to see which dependencies the designer tries to load and eventually which ones cannot be found. Here we demonstrate the approach step-by-step with an ObjectDataSource that utilizes EntityFrameworkCore version 3.1.1.
- Start Fuslogvw in Developer Command Prompt for Visual Studio - screenshot StartFuslogvw.png
- Setup Fuslogvw to record the failures in a custom folder, for example, 'c:\temp' - screenshot SetupFuslogvw.png
- Add the assembly (e.g. ClassLibrary2) with the DataSource/DataMember of the ObjectDataSource in the Standalone Report Designer folder and register it in the designer configuration file - Extending Report Designer
- Open the Standalone Report Designer and start the ObjectDataSource Wizard to configure it. If ClassLibrary2 is not discovered by the wizard, as shown in screenshot DataSourcesNotFound.png, the Fuslogvw should have logged a failure in the '(specified folder)\Default\Telerik.ReportDesigner.exe', in our case 'C:\temp\Default\Telerik.ReportDesigner.exe'. The particular log file is Microsoft.EntityFrameworkCore, Version=220.127.116.11, Culture=neutral, PublicKeyToken=adb9793829ddae60.HTM and indicates that this assembly was not found
- Add the above assembly to the designer folder. You may check where to find the assembly in the assembly properties in the Visual Studio - screenshot AssemblyPathInVS.png or in the folder where NuGet packages for the user are generally stored - 'C:\Users\username\.nuget\packages\packagename\version\lib\framework', for example, 'C:\Users\arabadzhiev.nuget\packages\microsoft.entityframeworkcore\3.1.1\lib\netstandard2.0'.
Some packages can be used globally on the machine and are stored in 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder\packagename\version\lib\framework', for example 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore\3.1.1\lib\netstandard2.0'.
- Close the designer and repeat steps 4-6 until the assembly is discovered by the designer.
Note that there may be other failures to discover assemblies logged by Fuslogvw. Those assemblies are used internally by the designer - you don't need to add them. The FuslogvwLogs.zip file contains the ObjectDataSource-relevant logs for the example. A screenshot of the entire log folder can be seen on FuslogvwForReportDesigner.png.