FastReport.NET报错 System.PlatformNotSupportedException:“Operation is not supported on this platform.”
作者:C/S框架网|www.csframewo  发布日期:2023/03/20 21:14:30
  FastReport.NET报错 System.PlatformNotSupportedException:“Operation is not supported on this platform.”

VS2022+.NET7 CSFrameworkV6旗舰版踩坑日记:


System.PlatformNotSupportedException:“Operation is not supported on this platform.”






详细信息:

System.PlatformNotSupportedException
  HResult=0x80131539
  Message=Operation is not supported on this platform.
  Source=System.CodeDom
  StackTrace:
   在 Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
   在 Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
   在 Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
   在 FastReport.Code.AssemblyDescriptor.InternalCompile(CompilerParameters cp, CompilerResults& cr)
   在 FastReport.Code.AssemblyDescriptor.InternalCompile()
   在 FastReport.Code.AssemblyDescriptor.Compile()
   在 FastReport.Report.Prepare(Boolean append)
   在 FastReport.Report.Show()
   在 CSFrameworkV6.ReportModule.FastReportDemo.frmReportSO.DoPreview() 在 E:\Jonnys_Project\CSFramework.V6.0-NET7\CSFrameworkV6.ClientFoundation\CSFrameworkV6.Report\FastReportDemo\frmReportSO.cs 中: 第 41 行
   在 CSFrameworkV6.ReportModule.FastReportDemo.frmBasePrint.btnPreview_ItemClick(Object sender, ItemClickEventArgs e) 在 E:\Jonnys_Project\CSFramework.V6.0-NET7\CSFrameworkV6.ClientFoundation\CSFrameworkV6.Report\FastReportDemo\frmBasePrint.cs 中: 第 18 行
   在 DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
   在 DevExpress.XtraBars.BarItemLink.OnLinkClick()
   在 DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   在 DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
   在 DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
   在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 DevExpress.XtraEditors.XtraControl.WndProc(Message& m)
   在 DevExpress.XtraBars.Controls.CustomControl.WndProc(Message& msg)
   在 DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)





注意:重点在 System.CodeDom!由此可见,是报表模版文件有问题。


解决方案


1. 检查报表模版文件里面的字段定义,严格区分大小写!



2. 检查 FastReport.NET版本是否匹配

3. 旧版本的frx文件使用高版本的FastReport,需要使用Designer重新设计模版文件。




FastReport.Net下载安装的版本:



.NET 6

FastReport.Net 2021.3.8


.NET7

FastReport.Net 2021.3.8
FastReport.Net 2023.1.8



C/S框架网|原创精神.创造价值.打造精品


扫一扫加作者微信
C/S框架网作者微信 C/S框架网|原创作品.质量保障.竭诚为您服务
上一篇 下一篇