![](/forums/images/avatarimages/default.gif)
I am getting the following error:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'Lock' threw an exception.
Source=Telerik.Reporting
StackTrace:
at Telerik.Reporting.Cache.CacheStorage.Lock..ctor(String key)
Inner Exception 1:
FileNotFoundException: Could not load file or assembly 'System.Threading.AccessControl, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
The current packages installed from my .csproj file:
<PackageReference Include="HangFire" Version="1.6.17" />
<PackageReference Include="KendoUICore" Version="2018.1.117" />
<PackageReference Include="KendoUIProfessional" Version="2018.1.117" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" />
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.2" />
<PackageReference Include="Moq" Version="4.8.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.1-beta3" />
<PackageReference Include="System.Net.Requests" Version="4.3.0" />
<PackageReference Include="Telerik.Reporting" Version="12.0.18.117" />
<PackageReference Include="Telerik.Reporting.Services.AspNetCore" Version="12.0.18.117" />
<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2018.1.117" />
9 Answers, 1 is accepted
Such errors occur when the Telerik Reporting NuGet packages are not compatible with the project. The packages are built against the full .NET Framework because the Reporting engine relies on the GDI+ API. Therefore, the packages will not work in the project that targets .NET Core framework as GDI+ is missing there.
If you wish to use the packages in .NET Core project use the following steps for creating the project:
1. In the New Project dialog, expand Installed > Visual C# > .NET Core, and select ASP.NET Core Web Application project template. Choose a name for the project and click OK.
2. On the New ASP.NET Core Web Application dialog select from the drop downs .NET Framework and ASP.NET Core 2. Next from the list of templates select Web API.
It is important to select .NET Framework from the drop down on the second step as this will set full .NET framework as the target framework of the project. For more details check HTML5 Report Viewer in ASP.NET Core 2 help article.
If the above requirement cannot be met you can add just HTML5 Viewer in the project as it does not require any NuGet packages. Reporting REST service can be hosted separately in a project that targets full .NET framework. HTML5 Viewer will only need the address of the service set as its serviceUrl option. More details on how to host Reporting REST Service can be found in the following help articles:
How To: Add Telerik Reporting REST Web API to Web Application
How To: Self Host Telerik Reporting REST Web API.
When the service and the viewer are hosted in different domains it will be required to enable CORS in order to enable communication between the viewer and the service.
Regards,
Katia
Progress Telerik
![](/forums/images/avatarimages/default.gif)
Thank you for your suggestion. We receive an increasing amount of requests from our community related to rendering of reports on non-Windows machines. We are monitoring the available tools and libraries which we can switch to in order to provide such support. However, the task is still not clear and it will definitely take a considerable amount of time an resources to implement it.
Feel free to share your ideas in the comments for REST Report service exposing the report generation engine on Linux request logged into our feedback portal. This will help us to measure the demand for this feature, see what is expected from it and to decide if we need to move forward in this direction.
Regards,
Katia
Progress Telerik
![](/forums/images/avatarimages/default.gif)
The requirements for adding Telerik Reporting NuGet packages into a .NET Core project have not changed. The project needs to target full .NET Framework as the packages are built against it.
If the project needs to target .NET Core framework you can add just HTML5 Viewer in it and host the service in a separate project that targets full .NET framework. More details on hosting the service are provided in:
How To: Add Telerik Reporting REST Web API to Web Application
How To: Self Host Telerik Reporting REST Web API.
Regards,
Katia
Progress Telerik
![](/forums/images/avatarimages/default.gif)
Hi Stephen,
Since version R1 2019, we provide .NET Core Support. Note that we support reports that are designed in the Standalone designer as well as reports created in Visual Studio Report designer without code specific for CodeDOM classes like ResourceManager. You may find step-by-step instructions for setting-up .NET Core projects in the following articles:
- How To: Use HTML5 Report Viewer in an ASP.NET Core 2.1 and 2.2 application
- How To: Use HTML5 Report Viewer in an ASP.NET Core 3+ application
Regards,
Neli
Progress Telerik
Hi Scot,
I have just checked and it seems that the links are working on my end. Can you please test again?
Both give
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
For me.
link is https://docs.telerik.com/reporting/manual-setup-of-html5-report-viewer-in-asp-net-core-3?_ga=2.96293080.557661349.1656629100-696432566.1640292988
Hi Scott,
If I understood correctly, you would like to use Telerik Reporting in .NET Core 3.0 application. Note that this version of .NET core was deprecated on the 3rd of March 2020.I would recommend checking the How to Use HTML5 Report Viewer in an ASP.NET Core 3.1 application article.
Let me know if I can assist you further.
Hi Scott,
For .NET6, you can take a look at the How to Host Reports Service in ASP.NET Core in .NET 6 with Minimal API article.
![](/forums/images/avatarimages/default.gif)
Hi Neli,
Thanks for the response. Attempting to add a report to a .NET Core 2.2 project via the "Add -> New Item" I am not finding the Telerik templates as an option.(reference capture.png) When I do the same thing via a .NET Framework 4.7.2 it works as expected and I am able to add the report to the project (reference capture-full framework.png).
When the .NET Core 2.2 project references a report created in a .NET Framework application I am receiving a run-time exception (reference capture-runtime-issue.png).
Might be two problems here. I can easily provide the example projects if necessary. Cheers!
![](/forums/images/avatarimages/default.gif)