cho*_*dze 3 .net c# com excel vba
我有ComVisible类的.NET程序集.几天前(我可以通过git找到那个时刻发生的事情) - Excel不再看到这个类了.所以:
我有界面
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface MyInterface { ... }
Run Code Online (Sandbox Code Playgroud)
和班级
[ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[ProgId("MyClass.Id")]
public class MyClass { ... }
Run Code Online (Sandbox Code Playgroud)
Excel通过创建实例
Dim c as MyClass
Set c = New MyClass
Run Code Online (Sandbox Code Playgroud)
之前一切都像魅力一样,但删除了一些方法(从界面和类)后,Excel很疯狂 - 它给我一个错误Class doesn't support Automation or does not support expected interface.哪里可以成问题?