Bad IL format exception
Posted: Fri Mar 20, 2015 2:23 pm
Hi,
A customer is running our software (Windows Forms with StimulReports 2014.1.1900.0) and gets a "Bad IL Format" exception when trying to print a report or open it in the report viewer control for windows forms.
I'm using your reporting tools already for several years and have never encountered this exception.
Can you point us in the right direction which might be the problem?
Here is the stacktrace:
InnerException message : Could not load file or assembly '0 bytes loaded from System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Begin StackTrace
------------------------------------------
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource)
at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
at Stimulsoft.Base.StiCompiler.Compile(String textToCompile, String outputAssembly, LanguageType languageType, StiOutputType outputType, String[] referencedAssemblies, List`1 resources)
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
at Stimulsoft.Report.StiReport.Compile()
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.Render()
at BIG.Products.GUI.ProductViewer.frmPrint.ShowReportPreview(StiReport report)
at BIG.Products.GUI.ProductViewer.frmPrint.PrintReport(Boolean showPreview)
at BIG.Products.GUI.ProductViewer.frmPrint.btnPreview_Click(Object sender, EventArgs e)
------------------------------------------
End StackTrace
InnerException message : Bad IL format.
Begin StackTrace
Hope someone knows what is the cause of this issue?
Thanks.
A customer is running our software (Windows Forms with StimulReports 2014.1.1900.0) and gets a "Bad IL Format" exception when trying to print a report or open it in the report viewer control for windows forms.
I'm using your reporting tools already for several years and have never encountered this exception.
Can you point us in the right direction which might be the problem?
Here is the stacktrace:
InnerException message : Could not load file or assembly '0 bytes loaded from System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Begin StackTrace
------------------------------------------
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource)
at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
at Stimulsoft.Base.StiCompiler.Compile(String textToCompile, String outputAssembly, LanguageType languageType, StiOutputType outputType, String[] referencedAssemblies, List`1 resources)
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
at Stimulsoft.Report.StiReport.Compile()
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.Render()
at BIG.Products.GUI.ProductViewer.frmPrint.ShowReportPreview(StiReport report)
at BIG.Products.GUI.ProductViewer.frmPrint.PrintReport(Boolean showPreview)
at BIG.Products.GUI.ProductViewer.frmPrint.btnPreview_Click(Object sender, EventArgs e)
------------------------------------------
End StackTrace
InnerException message : Bad IL format.
Begin StackTrace
Hope someone knows what is the cause of this issue?
Thanks.