Hi All!
I'm having an issue interacting between Matlab and .NET. I've managed to call .NET methods from Matlab code and vice versa. However, if I call a .NET method that, in turn, instantiates a Matlab object, it crashes (with a type initialization exception).
Think about this scenario: a .NET assembly is interacting with a Matlab dll that was deployed for .NET (not native) by Matlab's deploytool. Now, when I'm loading the above .NET dll in a Matlab program everything is ok until I run a method that utilizes the other Matlab dll. Only then everything crashes.
The exact message is:
Warning: Cannot initialize MATLAB Compiler-generated software component in MATLAB. MATLAB Compiler-generated software components cannot be used from within MATLAB.
Please don't offer not to use Matlab-.NET-Matlab architecture, it's not an option.
Thank you very much (I promise to accept the answer that solves the problem :-)),
Yaron.