Click here to Skip to main content
14,699,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a project on wpf .net core I added another project for Crystal Report
I am trying to invoke the report window from inside my main project
Not implemented, this message appears

System.BadImageFormatException: 'Could not load file or assembly' CrystalReportWpfApplication1, Version =, Culture = neutral, PublicKeyToken = null '. An attempt was made to load a program with an incorrect format. '

The calling code is very simple
 new CrystalReportWpfApplication1.Window1 (). Show ();

What I have tried:

trying to invoke the report window from inside my main project
Not implemented
Richard MacCutchan 1-Jul-20 11:14am
Probably means you are mixing a 64-bit application with a 32-bit library.
khaled bash 1-Jul-20 11:21am
Project .net core 3.1 any cpu
There are no other options to change how I can change it
Richard MacCutchan 1-Jul-20 12:10pm
Before you change anything check what type the CrystalReports DLL is.
khaled bash 2-Jul-20 11:03am
crystal report 13 sp 27 for vs 2019
khaled bash 2-Jul-20 11:33am
The error message has changed
System.Windows.Markup.XamlParseException: 'The invocation of the constructor on type 'SAPBusinessObjects.WPF.Viewer.ViewerCore' that matches the specified binding constraints threw an exception.'
Richard MacCutchan 2-Jul-20 11:44am
Sorry, I have no idea what that message means. You need to contact SAP support for problems with their software.
Richard Deeming 3-Jul-20 6:24am
Try changing "any CPU" to "x86".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900