Can I generate COM visible assemblies (using CodeDom, or anything else) ?
I am looking to expose C# classes to VBA. Basically, I have an object-driven web server, and everytime I build my web server, I would like to also generate some wrapping classes (COM visible using CodeDom) as some clients will need these to access data from other contexts (Excel/VBA, etc...).
So is this possible at all ?
UPDATE: Trying the RegFree approach of Snoopy, I build that class into test2.dll with CodeDom:
namespace Test
{
public class TestClass
{
private double _d1;
private double _d2;
public double d1 {
get {
return _d1; }
set { _d1 = value; }
}
public double d2 {
get { return _d2; }
set { _d2 = value; }
}
public double sum()
{
return d1 + d2;
}
}
}
I get the following in VBE: