Borrar filtros
Borrar filtros

Error while using MATLAB Builder generated dlls

1 visualización (últimos 30 días)
Madhukar
Madhukar el 30 de Mayo de 2014
Comentada: Madhukar el 30 de Jun. de 2014
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 comentario
Madhukar
Madhukar el 30 de Jun. de 2014
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.

Iniciar sesión para comentar.

Respuesta aceptada

Tejas M U
Tejas M U el 30 de Jun. de 2014
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.

Más respuestas (0)

Categorías

Más información sobre Deploy to .NET Applications Using MWArray API en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by