I used the MATLAB Compiler to generate a .NET Assembly
with a very little MATLAB code:
function output_arg = extest( input_arg1,input_arg2 )
Try adding this before the class definition
[assembly: MathWorks.MATLAB.NET.Utility.MWMCROption("-nojit")]
Also make sure that the .NET
version you use for assembly is the same or lower than the one used for your Visual Studio project.
Another solution might be adding the path of the MATLAB runtime (e.g. C:\Program Files\MATLAB\MATLAB Runtime\v92\runtime\win64) to the PATH Environment Variable.
If none of these helps, have a look here and here, you might have a 64/32 bit mismatch.