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?
8 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!