MATLAB: .NET changes between 2017b and 2018a

MATLABnet

I have some code where I use a .dll created with vb.net inside VS2013 to use with matlab:
net = NET.addAssembly('SOME_PROJECT.dll');
AssemblyType = net.AssemblyHandle.GetType('SOME_PROJECT.ComClass');
try
result = System.Activator.CreateInstance(AssemblyType);
catch e
e.message;
if(isa(e, 'NET.NetException'))
eObj = e.ExceptionObject
end
end
This works fine in matlab 2017b and will yield 'result' but in 2018a I get a SEHException
e =
NetException with properties:
ExceptionObject: [1×1 System.Runtime.InteropServices.SEHException]
identifier: 'MATLAB:NET:CLRException:AddSuperClasses'
message: 'Message: External component has thrown an exception.↵Source: dotnetcli↵HelpLink: '
cause: {}
stack: [0×1 struct]
What changes between 2017b and 2018a could cause this? What can I do to fix this?

Best Answer

I posted a comment here and discovered that my problem is caused by a known bug in MATLAB 2018a. https://www.mathworks.com/support/bugreports/1759533
Could this be your problem?
Edit: They fixed the bug, install 2018a Update 3.