I have always marked my .NET assemblies as visible to COM with [assembly: ComVisible(true)], thinking that I never know when someone might need to call them fro
It is easy and given on MSDN. This is the way how to fix this warning:
using System;
using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
namespace InteroperabilityLibrary
{
[ComVisible(false)]
public class BaseClass
{
public void SomeMethod(int valueOne) {}
}
// This class violates the rule.
[ComVisible(true)]
public class DerivedClass : BaseClass
{
public void AnotherMethod(int valueOne, int valueTwo) {}
}
}
If Base class is in any dll which you are referring in your code. Then, Make [COMVisibible(True)] for derived class. It works in my scenario.