Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Setup and Deployement Package (MSI) for MMC extension doesn't register DLLs
 

Setup and Deployement Package (MSI) for MMC extension doesn't register DLLs

I've created an MMC property page extension in Visual Studio 2005 proporting over an example in C# to VB from the Platform SDK Server 2003 R2.

The Extensions install fine and works if I register them manually via the INSTALLUTIL.EXE program.

When Add a setup project to my solution and then add the primary output from my MMC extension project, the install program installs the DLLs and dependencies to the right folders, but the DLLs remain unregistered.

I've played with setting Register attribute but none of them will register the DLL's
If I set Register to vsdraCOM orvsdraCOMRelativePath, it does nothing.

If I set Register to vsdrpCOMSelfReg, It errors and tells my the"The assembly myMMCext.dll' in project output group 'Primary output from myMMCext(Active)' cannot be self-registered."

I also get the same error if I using the native C# extension.

Is it even possible to have the DLL's register via the setup and deployement package? Any ideas how?

pber  Thursday, April 17, 2008 7:11 PM
PhilWilson  Thursday, April 17, 2008 10:56 PM

InstallUtil.exe works by calling installer classes - you've got SnapinInstaller classes? To get equivalent behavior with a setup project you'd need to call those as custom actions.

I don't know if the SnapinInstaller methods do *all* the registration (including COM) or if they just write the extra MMC registry entries.

Setting register to vsdraCOM should do something. It's easy to check, assuming you know your COM class guid. Go to HKCR\CLSID\{guid} and see what you have there. If InstallAllUsers is false or you do a Just me install then the COM registration created by vsdraCOM goes to HKCU.

vsdrpCOMSelfReg is for Win32 COM Dlls, not managed code assemblies.

PhilWilson  Thursday, April 17, 2008 8:03 PM

Thanks for the info.

I do have the SnapinInstaller class defined as InstallUtil works fine manually, I just want my setup project to do it.

'here's my code in my MMC extension.

''' RunInstaller attribute - Allows the .Net framework InstallUtil.exe to install the assembly.

''' SnapInInstaller class - Installs snap-in for MMC.

<RunInstaller(True)> _

Public Class InstallUtilSupport

Inherits SnapInInstaller

End Class

I've also played with the Assembly to "Make assembly COM-Visible" with no luck either.

I'll look into doing the custom actions.

thanks.

pber  Thursday, April 17, 2008 8:34 PM
PhilWilson  Thursday, April 17, 2008 10:56 PM

Thanks for the help. You got me looking in the right direction.

All I was missing was adding the primary output to all 4 phases of the Custom Actions. Once I did that, presto.

pber  Friday, April 18, 2008 2:00 PM
Hi pber, I am also getting the same problem.
I need to registered com dll which I created for the "exel Automation add-in" in C#.net
for that I have created setup project so that I can give MSI installer for the distribution to the end user which will registered the com component for "exel Automation add-in"
Can u provide me some sample code? as I am new to this all setup and installer thing. I am trying to get these thing done by the solution proposed by this you.
but I am afraid that I ran out time.
Plz, help me.
u can e-mail me @ techrohan23@gmail.com
your help will be greatly appreciated.
techRohan  Friday, August 21, 2009 6:18 AM

You can use google to search for other answers

Custom Search

More Threads

• VS Setup project with Windows Service
• ClickOnce over secured URL
• ProjectInstaller class...overridden Uninstall method not being called
• Application Updates
• Winform running in other computer IE not loading
• Looking for succesful ClickOnce deployments stories.
• My application targets v2.0, but the setup asks for downloading v3.5
• Set/reset update pragmatically?
• VS 2008 Install Project Unknown Error on one machine
• Including a Text File in a Published Project