Using C# Assembly in MATLAB

4 visualizzazioni (ultimi 30 giorni)
Eduard Mazur
Eduard Mazur il 23 Set 2019
Modificato: Eduard Mazur il 23 Set 2019
Hello everybody
I'm trying to work with C# assembly in MATLAB, so about my problem:
I created c# assembly with using third party librarys (Siemens.Engineering for work with their product TIA Openness).
And then I have problem with loading namespace and class in variable:
Message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source: mscorlib
HelpLink:
Then I wrote desifer LoaderExeption
try
namespace.class
catch ex
end
ex.ExceptionObject.LoaderExceptions.Get(0).Message
And this give me more specific message:
Could not load file or assembly 'Siemens.Engineering.Contract, Version=1501.0.2801.1, Culture=neutral, PublicKeyToken=37a18b206f7724a6' or one of its dependencies. The system cannot find the file specified.
Look like assembly can't find this library. And this happen only if I have several methods witch use Siemens.dll.
But the mistery is, if assembly have only one method, it's work perfectly in matlab without any restrictions..
Maybe I need to load something like AssemblyResolve in MATLAB??

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by