MWArray assembly failed to be initialized in C#
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
B.k Sumedha
il 16 Mag 2015
Commentato: Wenchao Tao
il 3 Mag 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 Commento
Wenchao Tao
il 3 Mag 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.
Risposta accettata
Matthew Monreal
il 18 Mag 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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Deploy to .NET Applications Using MWArray API in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!