Using C# Assembly in MATLAB

조회 수: 4 (최근 30일)
Eduard Mazur
Eduard Mazur 2019년 9월 23일
편집: Eduard Mazur 2019년 9월 23일
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??

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by