Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have created a dll in c#. I added a reference to this dll in MATLAB as shown below. Everything works fine. The problem is that when I want to update my dll I have to close MATLAB otherwise I cannot rebuild my dll, which is rather annoying. How in MATLAB can I remove the reference to this dll - I thought there would just be a line of code to do this?

   % add reference to dll
   cls = NET.addAssembly('C:MyFolderMyDllFolderinDebugMyDll.dll');

   % reference my class
   mycls = MyNameSpace.MyClass();
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
328 views
Welcome To Ask or Share your Answers For Others

1 Answer

As a workaround, you can start a new Matlab instance from Matlab itself with a system call and the Matlab command line options and only load the libraries in the new instance. This is described in an answer to the qestion: Release a .NET assembly from MATLAB


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...