The primary reason for writing this article is I've managed to make exactly the same mistake on two separate occasions. A third time would be careless...
For this particular recipe you need:
First add the output of your COM interop project to the installer project and, as if my magic, the COM DLL that your interop is using will be added to the installer. Next build your solution and install your new application. Then spend a couple of hours trying to work out why nothing works and you get strange error messages like "Could not find msmdso.rll" whenever the COM object is instantiated. This is especially difficult if your application happens to be running as a service and COM DLL displays the message in a message box (hint: listen for the unmistakable "ding" of the message box sound).
What has happened? Well when the COM DLL was automatically detected and added to the installer project it was flagged as "vsdrfCOMSelfReg" which causes the new copy of the DLL to registered at install time zapping the original COM registration. As for the message box, nothing you can do if it's DSO like mine unless you happen to work for Microsoft.
For some reason setting the flag back to "vsdrfDoNotRegister" still causes issues and the best approach is to set the "Exclude" property to true and completely remove the DLL from the installer.
One last tip. If you manage to do this with DSO then you can avoid reinstalling Analysis Server by executing the following:
cd "C:\Program Files\Common Files\Microsoft Shared\DSO"for %i in (*.dll) do regsvr32 %i
Page rendered at Friday, September 03, 2010 9:15:32 AM (GMT Daylight Time, UTC+01:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.