FastReport
FastReport copied to clipboard
.NET6 The type initializer for 'FastReport.Utils.Res' threw an exception. Messages,WrongFileFormat NOT LOCALIZED!
I try to run report is download from example that is use Simple List.frx
and nwind.xml
https://github.com/FastReports/FastReport/blob/master/Demos/OpenSource/PdfExport/Program.cs
I create new project with .net6 With package
FastReport.OpenSource Version="2022.1.10"
FastReport.OpenSource.Export.PdfSimple Version="2022.1.10"
It show error like below
System.TypeInitializationException: The type initializer for 'FastReport.Utils.Res' threw an exception.
---> FastReport.Utils.FileFormatException: Messages,WrongFileFormat NOT LOCALIZED!
at FastReport.Utils.XmlReader.RaiseException()
at FastReport.Utils.XmlReader.ReadHeader()
at FastReport.Utils.XmlReader.Read(XmlItem item)
at FastReport.Utils.XmlDocument.Load(Stream stream)
at FastReport.Utils.Res.LoadBuiltinLocale()
at FastReport.Utils.Res..cctor()
It support .net6 yet?
I got the same error in .NET 5.0. I couldn't load the template.
FastReport.OpenSource Version="2022.1.14"
FastReport.OpenSource.Export.PdfSimple Version="2022.1.14"
FastReport.OpenSource.Export.OpenSource.Web Version="2022.1.14"
FastReport.Community.2022.1.0 for my designer.
any update ? same. . Net 6
same issue in .NET 6 FastReport.OpenSource Version="2022.3.0" FastReport.OpenSource.Export.PdfSimple Version="2022.3.0"
please make the runtime config file and add the
{ "runtimeOptions": { "tfm": "net6.0", "frameworks": [ { "name": "Microsoft.NETCore.App", "version": "6.0.0" }, { "name": "Microsoft.AspNetCore.App", "version": "6.0.0" } ], "configProperties": { "System.GC.Server": true, "System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
} }
I got a same error, how to slove it. FastReport.OpenSource (2023.1.12) FastReport.OpenSource.Export.PdfSimple (2023.1.12) FastReport.OpenSource.Web (2023.1.12)
I got a same error, how to slove it. FastReport.OpenSource (2023.1.12) FastReport.OpenSource.Export.PdfSimple (2023.1.12) FastReport.OpenSource.Web (2023.1.12)
Hello dear please can we meet online? if possible you can set meet at [email protected]
i got error The type initializer for 'FastReport.Report' threw an exception. FastReport.OpenSource (2023.3.1)
on Ubuntu 22.04
anyone could solved?
my environment
ubuntu@ip-172-31-41-183:~$ dotnet --info .NET SDK: Version: 7.0.111 Commit: 06c8b346e4
Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/lib/dotnet/sdk/7.0.111/
Host: Version: 7.0.11 Architecture: x64 Commit: ecb34f85ec
.NET SDKs installed: 7.0.111 [/usr/lib/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 7.0.11 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.11 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
@chukiatt , I had that exception recently when I deploy app with fastreport in ubuntu container. my problem was solved after installation of "libgdiplus" package in ubuntu.
I have the same problem. I am using a Web Application on Azure with Linux. Is there some solution?
Add this line on configure services on Startup.cs solved for me!
FastReport.Utils.Config.WebMode = true;