MWArray assembly failed to be initialized in C#
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
B.k Sumedha
el 16 de Mayo de 2015
Comentada: Wenchao Tao
el 3 de Mayo de 2018
I have developed a project of"Automatic Number Plate Reader" in matlab and I want to call this project in C# windows application for further process.But when i implement this in C# i got a error as "MWArray assembly failed to be initialized". Wherein I have generated all the dll files in matlab and added it in the reference of the C# project from the deploytool in matlab. And MWArray.dll is also been added. I am using 2013a version of matlab and 2012 version of Visual Studio. Any help regarding this is quite helpful.
1 comentario
Wenchao Tao
el 3 de Mayo de 2018
Hi, I'm wondering if you have found the solution to the error of "Error initializing CTF Archive". I have this error randomly when use compile dll in a C# application. Tried to clean the MCR temp folder, reset the MCR temp folder location and still not able to fix this random error.
Respuesta aceptada
Matthew Monreal
el 18 de Mayo de 2015
I came across your problem when I was trying to solve my own. Now I got back to you since I've managed to solve it.
First of all it appears that the MWMCR is only compatible up to .net framework 3.5.
Second make sure that you are generating the *.ctf file when building your function in MATLAB. you need to untick the option where it says that the .ctf is embedded in the application. Its in the settings of the deploytool itself.
Third when after you create the fill debug the program until you reach the code part in the static constructor of your classwhere it finds the assembly location and take note of the folder location.
string ctfFilePath= assembly.Location;
You would need to manually copy and paste the *.ctf file to that location and it should work.
Más respuestas (0)
Ver también
Categorías
Más información sobre Deploy to .NET Applications Using MWArray API en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!