作成した .NET アセンブリを C# アプリケーションで使用する際に "Type initializer throws an exception" エラーが出るのはなぜですか?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 26 Feb. 2018
Beantwortet: MathWorks Support Team
am 26 Feb. 2018
MATLAB Compiler SDK を使用して .NET アセンブリを作成し、それを C# アプリケーションで使用します。C# 開発環境において、このアセンブリをインスタンス化する際に "Type initializer throws an exception" というエラーとなり、アセンブリを使用することができません。
Akzeptierte Antwort
MathWorks Support Team
am 26 Feb. 2018
これは MATLAB Compiler SDK により作成された .NET アセンブリのビットと、C# アプリケーションのビットが異なっていることが原因です。
C# アプリケーションのプロジェクト内の「ビルド > プラットフォームターゲット」でビット(x64/x86)をあわせていただけますようお願いいたします。例えば MATLAB (及びMATLAB Compiler SDK)が 64-bit 版のときはここを x64 にします。
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 配布されたアプリケーション finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!