System.Typ​eInitializ​ationExcep​tion: The type initializer for 'MathWorks​.MATLAB.NE​T.Utility.​MWMCR' threw an exception

Hello.
I've been using MCR_R2014b in my C# winforms project (VS 2015 professional). When I run the project from VS (doesn't matter if it's debug or release), everything works fine. But after the installation of the project, when pressing on the .exe, I receive this bug:
System.TypeInitializationException: The type initializer for 'VAYUALGNative.VayuMat' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MathWorks.MATLAB.NET.Utility.MWMCR' threw an exception. ---> System.Exception: Trouble initializing libraries required by Builder NE.
at MathWorks.MATLAB.NET.Utility.MWMCR..cctor()
--- End of inner exception stack trace ---
at VAYUALGNative.VayuMat..cctor()
--- End of inner exception stack trace ---
at VAYUALGNative.VayuMat..ctor()
at Form1.Common.Connect() in C:\Users\Oleg\Documents\Visual Studio 2015\Projects\VAYU Meter\Form1\Common.cs:line 143
at Form1.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\Oleg\Documents\Visual Studio 2015\Projects\VAYU Meter\Form1\Form1.cs:line 128
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I'm stuck with this problem for 2 days already.
Please help me!!!!!
Thanks.

Risposte (0)

Categorie

Richiesto:

il 22 Nov 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by