Using C# Assembly in MATLAB

4 visualizaciones (últimos 30 días)
Eduard Mazur
Eduard Mazur el 23 de Sept. de 2019
Editada: Eduard Mazur el 23 de Sept. de 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??

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by