I have compiled a .NET library using MATLAB 32-bit compiler and attempted to use it in a 32-bit C# application. When instantiating the class, I am getting a System.TypeInitializationException.
Please note the following:
- I have set the Configuration Manager in Visual Studio to x86 (32-bit)
- I am referencing MWArray.dll from the 32-bit installation of the MCR
- I have compiled my .NET library using the 32-bit version of MATLAB
- I have correctly installed the 32-bit version of the MATLAB compiler runtime
- I have already run gacutil.exe on the 32-bit version of MWArray.dll to register it in the GAC
- My machine is Windows 7 64-bit
I have called MATLAB support and have not received a solution at this time.
Best Answer