如何删除参考MATLAB的.NET程序集

编程入门 行业动态 更新时间:2024-10-28 21:28:10
本文介绍了如何删除参考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程序集

本文发布于:2023-11-08 08:14:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1568842.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   MATLAB   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!