Hello All,
I am trying to gain access to a .NET class library in Microsoft Excel. To do this I know that the .NET class library must be registered with COM. So I tried going to my Assembly Info and Setting COM Visible to true. Then on the build tab I set Register for COM Interop for true also. I checked the AssemblyInfo.cs file and it does contain [assembly: ComVisible(true)]
.
But for some reason when I try to add a reference to the Class Lib in Excel the namespace does not show up in the list. I made a quick test Class library with nothing in it and did the same thing (set COM Vis = true , and Register For COM Interop = true) and that one does show up on the list of available references. I can't figure out what the difference is between the two classes. I am not sure if my class is actually being registered for COM interop or not. Does anyone know what I can do to fix this???
Added: I have tried to register the class manually using RegAsm but I get the following message... "RegAsm : warning RA0000 : No types were registered"
Added: I check my project output directory and I noticed that a type library file (*.tlb) is not being created when I build the project. I made sure that each class has it's own GUID attribute. The project does not contain any structs, interfaces, or enum's.