Hi everyone,

I made a word/excel add-in and a Outlook add-in.

To make them work I need to install them (in the setup project) and then build the project again and voila... they work!!!

But I want to register these and another dlls in another Setup program, so I copied the dlls to the application folder and

register them in my installer class. Something like:

Code Snippet

System.Diagnostics.Process proc1 = System.Diagnostics.Process.Start(System.Environment.ExpandEnvironmentVariables

("%windir%") + @"\System32\regsvr32.exe",

appDirPath + "myAddin.dll");

If is a regular(non addin) dll it works perfectly, but when I do something like "rgsvr32 myAddin.dll" it

tells me that the dll was loaded but the DllRegisterServer entry point was not found.

What I need to do to get the addins registered and working when I open word or excel or outlook

Thanx in advance

Re: Visual Studio Tools for Office Register de add-in dll manually


Is there a way for the add-in dll being registered during installation

I can't make it to work without building the add-in project.

If I manage to register the dll maybe in my installer class my problem is solved

I say this because the msi file will be packed with other msi files in a Main Setup, so there's no chance to build the add-in project inside Visual Studio.

Are you guys getting the ideia

If not please tell me something because I need to solve this problem


Re: Visual Studio Tools for Office Register de add-in dll manually


Ok, after a lot of research I found the solution, I hope this will help those people who have the same issue I had

I'll try to be clear:

In my AddinSetup Project in Application Folder I add the ProjectOutput for my Addin Project, the files that are in the bin folder are copied but not all, so I copied the remaining ones to the Application Folder

I add an installer class to my Addin Project and overrided the install method:


Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)


Dim appDirPath As String = Context.Parameters("PathDir")

Dim proc1 As System.Diagnostics.Process = System.Diagnostics.Process.Start( _

System.Environment.ExpandEnvironmentVariables("%windir%") + _

"\Microsoft.NET\Framework\v2.0.50727\regasm.exe", "/codebase " + appDirPath _

+ "MyAddin.dll")



End Sub

In my setup project I add a custom action for my project passing a var PathDir=[TARGETDIR] as a parameter and when the files are installed I use the regasm.exe tool that is located in your windowsfolder\Microsoft.Net\Framework\v2.0.50727 to register my dll. And it works!!!

To unistall the addin I just unistall the msi and there's no need do unregister the dll

I hope this helps