Error while using MATLAB Builder generated dlls

2 次查看(过去 30 天)
Hello, We had few custom programs in MATLAB which we wanted to use it in .NET framework. We did a POC using MATLAB Builder NE Toolbox of MATLAB version R2011a. We could successfully use those programs. Later we updated to the latest version of MATLAB (R2014a) and then using the MATLAB Builder NE Toolbox regenerated the DLL along with new MCR installation package. With the new dll's we are facing issue and unable to invoke the object Methods of the DLL. The error is "The type initializer for 'MathWorks.MATLAB.NET.Utility.MWMCR' threw an exception." and we are unable to proceed. Can anybody help? Madhukar.
  1 个评论
Madhukar
Madhukar 2014-6-30
Thanks Tejas for the reply. We got some feedback from the MATHWORKS team on similar lines to that of yours and we were able to get the issue resolved. We need to have the correct version of MCR installed also, as the packaged MCR along with the BUILD Dll's isn't of the same size as that is downloaded from the Matworks website. Also the DLL's aren't signed dll's and you need to do a little workaround to get the DLL's signed. After all these tricks and workaround, we could get the appropriate working DLL's.

请先登录,再进行评论。

采纳的回答

Tejas M U
Tejas M U 2014-6-30
The C# project that is using DLLs need to be of the same bitness as the DLL that you have. That is one of the reasons that you could be getting this problem. If you are using Visual Studio, then you can set the correct bitness by going to ‘Configuration Manager’ under the drop down ‘Debug’ menu, and choosing x86 or x64 based on the DLL that you are using.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by