I've upgraded a Visual Studio .NET 2003 app (C#) to Visual Studio .NET 2005.
It is a WinForms application, and it uses Crystal Reports 11 Release 2.
After going through the upgrade process with the upgrade wizard, I tried to
run the app and I got an error in the InitializeComponent() function of the
WinForm (there is only 1 WinForm in the application). The message told me
that I had to add what is known as an MDA assistance into the app.config
file, which I've done. The error is of type pInvokeStackImbalance. I've
added the relevant XML to the app.config file and now I'm getting the
following error message on the InnerException:
System.TypeInitializationException was unhandled
Message="The type initializer for
'CrystalDecisions.ReportSource.ReportSourceFactory ' threw an exception."
Source="CrystalDecisions.Windows.Forms"
TypeName="CrystalDecisions.ReportSource.ReportSour ceFactory"
StackTrace:
at CrystalDecisions.Windows.Forms.CrystalReportViewer ..ctor()
at AllClientsForISR.Form1.InitializeComponent() in
D:\AllClientsForISR\Form1.cs:line 71
at AllClientsForISR.Form1..ctor() in
D:\AllClientsForISR\Form1.cs:line 38
at AllClientsForISR.Form1.Main() in D:\AllClientsForISR\Form1.cs:line
147
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I've removed the CrystalReportsViewer control and put it back on again, but
I still get the same error message.
So, what's wrong now?
Rod