All,
This is a follow up for my question here.
My setup:
- Visual Studio 10
- Language C#
- Excel 2007+
- Windows XP+
What I would like to achieve is this:
- Create VSTO addin for Excel with a custom Ribbon component and a custom Task Pane
- Create an RTD server
- Create some UDF's that wrap the
=RTD()
-calls for the Excel users - Have the clients install the Addin through a ClickOnce installation
Apart from the last requirement, I am basically done. The only problem I have is to get the RTD server and the UDF's registered on the target machine without using regasm.exe
.
I basically want the client to indeed click once and then forget about it, especially since there are hundreds of potential users, all distributed geographically over the whole world.
Also, since they are not technically savvy, I do not want them to have to register COM components manually or anything like that.
I do not care if the UDF's and the RTD server are a separate project, as long as I can include and register them together with the VSTO addin via ClickOnce.
I looked into registration-free COM, but was not for the life of me able to get this to work in my VSTO addin.
What I did was create a second project (a library class
) and trying to export and register it for COM interop, then to include it into my 'main' project and use it there: it either would not compile (Cannot embed interop types from assembly [...] because it is missing either the 'ImportedFromTypeLibAttribute' attribute or the 'PrimaryInteropAssemblyAttribute' attribute
) or not register.
There are loads and loads of examples on the internet for the separate parts of my requirements, but nothing for the full monty.
Am I completely off track here? Can somebody please point me in the right direction and ideally offer some example code/configuration?
Cheers, Che