views:

28

answers:

1

I have a COM component written in C# that implements ISmartTagAction to add actions to the right click menu for things like mail recipients and senders.

It's just a .NET class library that exposes some classes through COM interop. Currently, I deploy this with a Visual Studio Setup project. That installer just registers the DLL for COM and adds an additional extra registry key to tell Outlook about the new smart tag class.

This works ok, but I have done two unrelated projects recently that were deployed with click once in one case and as a VSTO Outlook addin in another case, and that was a much nicer experience for end users, mostly because of the auto-update features of clickonce.

I did some investigation, and I haven't found any way to distribute this COM dll via click once because there appears to be no way to have click once register a DLL. Is this correct? Is there some way to make this work?

The other idea I had was to create an Outlook addin project and somehow put these classes in that project and use the VSTO publishing functionality to push it out. I don't know of a way to register the smart tag on the fly though.

Can anyone think of an approach that would make this work? Mostly I am looking for the auto-update feature so that it is painless for non-technical people to get updates when they are available.

+1  A: 

You're right - ClickOnce can't register a dll. It can only sync files between a client and a server. The good news is that it can sync any type of file, not just .Net assemblies. So you can easily get your assembly to the client by adding it to a ClickOnce install.

From there, any other installation steps would have to be done in your own code. You could copy the file to a logical location, register it with with DllRegisterServer, and add the extra registry keys. This should work as long as the user has the security privileges to do all those things.

I assume your COM dll changes quite often since you're interested in the auto-update features of ClickOnce. If that's not the case and it's only the .Net portion of your VSTO app that changes frequently, you could try the bootstrapper that Visual Studio can generate for you. There's lots of reason I don't like this approach, so I'll spare you the details unless you're interested.

whatknott