Loading .Net assembly in App Designer fails

13 views (last 30 days)
Georg
Georg on 29 Mar 2019
Hi everyone
I need to load a .NET assembly (uEyeDotNet.dll) in my App Designer GUI to communicate with a camera. In the startupFnc() function I add the assembly
as follows:
function startupFcn(app)
asm = System.AppDomain.CurrentDomain.GetAssemblies;
if ~any(arrayfun(@(n) strncmpi(char(asm.Get(n-1).FullName), ...
'uEyeDotNet', length('uEyeDotNet')), 1:asm.Length))
NET.addAssembly('C:/Program Files/IDS/uEyeCam/Develop/DotNet/uEyeDotNet.dll');
end
%...
end
It fails with an error that the assembly or any dependancy could not be found:
Error.PNG
If i execute the same code in the "normal" matlab workspace, it works and can be used.
So, how do i properly load it in the App Designer? It seems that the workspace is different or a path of it.
Hoping for help :-)
Georg

Answers (0)

Community Treasure Hunt

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

Start Hunting!