I get the error saying that the type initializer for threw an exception when trying to useMATLAB dll in visual studio. How to solve it?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear experts, I'm trying to use matlab function in visual studio. After I build the dll files, I have a problem to run it in visual studio.
This is the main part of my code: using System.Threading.Tasks;
using System.Windows.Forms;
using MathWorks.MATLAB.NET.Utility;
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.WebFigures;
using DotNetProjectNative;
using DotNetProject;
using showImage;
using showImageNative;
namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void button1_Click(object sender, EventArgs e)
{
showImage.Class1 t = new showImage.Class1();
t.showimage(openFileDialog1.FileName);
}
}
}
This is the error: {"The type initializer for 'showImage.Class1' threw an exception."}
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Deploy to .NET Applications Using MWArray API dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!