FastReport.OpenSource.SQLite broken all netcore pkgs when call CreateAllTables method is used
.GetSchema() is not a method available in Microsoft.Data.Sqlite which is used when compiled under netstandard/ core builds and that method is needed when CreateAllTables() is invoked from report.
Error -> System.MissingMethodException: 'Method not found: 'System.String SQLitePCL.raw.sqlite3_errstr(Int32)'.'
the issue that the method GetSchema() is not implemented in library that you are using for netcore, but is available if you build for framework 4.7 (issue I believe is that on non core you are using system.data.sqlite and for core you are microsoft.data.sqlite which doesn't support GetSchema() for sqlite).
Example Creation console application (.net core console 3.1) my program.cs contains ->
using System;
namespace FastReportDemo { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); SQLitePCL.Batteries_V2.Init(); FastReport.Data.SQLiteDataConnection conn = new FastReport.Data.SQLiteDataConnection(); conn.ConnectionString = @"data source = .\SQL_DB\chinook.db"; conn.CreateAllTables(); // <--- this will fail under netstandard or netcore build/ but works with framework Console.ReadLine(); }
}
}
my FastReportDemo.csproj contents -->
Hello!
I was able to reproduce this problem I informed the developers
Best regards Marat