A while back I wrote a post about how to install a .NET plugin. Since writing that post I now almost always use Windows installer to install my plugins but every so often they do not install I have not been able to work out why. Today though I think I cracked it.
There are a lot of settings you need to make sure are in place so that Raiser’s Edge (a COM based application) can see your .NET plugins. Firstly you need a class that implements the IBBPlugin interface. It should not only implement that interface but should also have some COM attributes. The best way of doing this is creating a new COM class when you add a new file to your project. The COM attributes are then in place for you.
In the project there are a couple of settings that need to be ticked:
- Project / Application / Assembly Information: Tick the “Make assembly COM-visible” box
- Project / Compile: tick the “Register for COM interop” box
- Project / Signing: The project should be strongly signed
And the final point which is what I discovered today is that the root namespace must be one word. Either that or below a certain length. Normally I let VS2008 select the default root and the plugin works fine. However recently I have been developing a number of class libraries and wanted them to be in consistent namespaces. I therefore chose the namespaces using my company name e.g.
Using the pattern the COM class is not recognised by RE. As I said I am not sure if it is the length of the root namespace or the fact that it contains the full stop (“.”). However just using XXXX allows RE to see the plugin.
Another point about the namespace, unless you are putting more than one plugin in the project (by providing two COM classes in the project) do not use the same root namespace for more than one plugin as they will not be seen.
Update 6th Feb 2009:
A COM component has its own type library built into the dll. A .NET assembly does not and you have to supply it in the form of a .tlb file. This is normally added to your project output if you are making assembly visible to COM. However I have noticed that it does not seem to be created when the assembly name is in more than one part so ensure that the assembly name is not zeidmandevelopment.XXXX.dll but rather just XXXX.dll.