Why is Fast Report 2024.1.0 not working in a .Net8 mvc application?

Hallo,

I am currently upgrading my application from .net framework 4.8 to .Net 8 . I used 2024.1.0 in the old application and it was working fine with the multiple fastreport files having Charts and sql queries. I heard this version supports .net 8 and so I moved it as it is but I am getting strange errors in the new application like SqlParameter is not available in System.Data.SqlClient, missing MsChartObject and few others.

In the old application, along with the five dll's(FastReport, FastReport.Bars, FastReport.Editor, FastReport.DataVisualization, FastReport.Compat), I have installed Fastreport.Net.Pro. But now I cannot install it as it wants me to make the target framework to .net8-windows. Eventhough i make my application window specific and install it still i get those above mentioned issues. Is there any way how i can fix this or Do i need some other latest version?

Comments

  • Hello!

    The FastReport.Net.Pro package (and the FastReport.Bars and FastReport.Editor assemblies) is a WinForms package for Windows Desktop; therefore, it strictly requires net8.0-windows, conflicts with the older System.Data.SqlClient, and is not suitable for ASP.NET Core MVC on .NET 8.

    For .NET 8 MVC / ASP.NET Core, use the web stack:

    If you need MSChartObject on a Windows server (net8.0-windows): install FastReport.Core + FastReport.Web (2026.2.8) and the FastReport.Data.MsSql connector (which uses the latest Microsoft.Data.SqlClient).

    If you require cross-platform support (Linux/Docker): use FastReport.Core.Skia + FastReport.Web.Skia + FastReport.Data.MsSql (without System.Windows.Forms / WinForms charts; the MSChartObject is also missing in FastReport.OpenSource.Web 2027.1.0).

    Register the connection in the code:

    RegisteredObjects.AddConnection(typeof(MsSqlDataConnection));
    // in Program.cs:
    builder.Services.AddFastReport();
    app.UseFastReport();
    
This discussion has been closed.