How to fix System.Typ​eInitializ​ationExcep​tion? (Visual Studio DLL)

4 views (last 30 days)
I have created a DLL file that contains my Matlab function that I would use for Visual Studio C#. Before I created the DLL file, I would test the function within Matlabs to make sure it worked well. The function is useed for plotting some equations.
When I imported the DLL file into my C# project, my Windows App worked fine, it could work with the Matlab DLL file and overall the test run was fine. That was all in my office laptop.
The problem began in my home computer. I uploaded my built C# project to a USB drive before I went home. When I opened the C# program from the USB and tested it in my home PC, I got this System.TypeInitializationException. I did not have Matlabs installed.
How can I fix this?

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!