如何删除参考MATLAB的.NET程序集 [英] how to remove reference to .net assembly in matlab

查看:238
本文介绍了如何删除参考MATLAB的.NET程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立在C#中的DLL。我添加了一个引用这个DLL在MATLAB中,如下图所示。一切工作正常。现在的问题是,当我想更新我的DLL我不得不关闭MATLAB否则我不能重建我的dll,这是相当烦人。我如何在MATLAB可以去除引用这个dll? - 我想有也只是一条线code要做到这一点

 %添加引用的DLL
   CLS = NET.addAssembly('C:\ MyFolder的\ MyDllFolder \斌\调试\ MYDLL.DLL');

   %引用我的课
   mycls = MyNameSpace.MyClass();
 

解决方案

您是否尝试过 cls.delete 然后再添加参考?

我似乎记得清除类是有用的。抱歉,我不能更明确,我没有Matlab的得心应手设立一个例子。

修改

貌似我错了,按照这个链接,你不能卸载从MATLAB程序集。

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:\MyFolder\MyDllFolder\bin\Debug\MyDll.dll');

   % reference my class
   mycls = MyNameSpace.MyClass();

解决方案

Have you tried cls.delete and then add the reference again?

I seem to remember clear classes being useful as well. Sorry I can't be more definitive, I don't have Matlab handy to set up an example.

Edit

Looks like I was wrong, according to this link, "you cannot unload an assembly from MATLAB."

这篇关于如何删除参考MATLAB的.NET程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆