Add-in not registering properly

Add-in Express™ Support Service
That's what is more important than anything else

Add-in not registering properly
 
Andrew Saunders




Posts: 17
Joined: 2006-03-21
Hello,

I have built an Add-in for excel which contains a User Defined Function. When testing it in debug mode it all works perfectly. However when I unregister the add-in and then install the release version the toolbar is available and working, but the function is not recognised and returns #NAME? in the cell.

I have looked in the registry and noted that when I press "Register ADX Project" on the build menu in debug mode I get 2 entries in the registry.

1. at HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options, there is an entry; OPEN "myAddinName"

2. at HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\AddIns\MYAddinShim.Proxy, there are a number of entries.

However when I "Unregister ADX Project" and then install the release version the OPEN "myAddinName" entry is missing. Only the entries at number 2(above) appear.

I built a really simple Add-in to check if it happened with all projects or just the one I have been working on and found the same problem occurred with it as well.

The only other information I can offer is that I recently upgraded from Office 2000 to Office 2003.

Any suggestions?

Thanks
Andrew Saunders

Posted 30 May, 2006 00:06:33 Top
Kitinon Wangpattanamongkol




Posts: 1
Joined: 2006-05-30
I have the exactly same problem with my own project.
I use Visual Studio 2005, Office 2003, Add-in Express.Net 2.4.1756.

Kitinon
Posted 30 May, 2006 00:40:33 Top
Kitinon W.




Posts: 10
Joined: 2005-07-04
Look like the problem has been solved in version 2.5.1759.

Kitinon
Posted 30 May, 2006 11:47:11 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Andrew.

As far as I understand you have developed a COM add-in and UDF for Excel in one dll. Do you use the C++ shim for the COM add-in?
Posted 30 May, 2006 14:51:01 Top
Andrew Saunders




Posts: 17
Joined: 2006-03-21
Yes I do use the shim for the COM add-in.
My add-in consists of an AddinModule (which has a commandbar and related code), an ExcelAddinModule (which has the excel function), and a shim.

Posted 30 May, 2006 18:04:37 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Andrew.

In this case you need to add three additional entries to the Custom Actions editor of the setup project. Please download the following example:
http://www.add-in-express.com/projects/addinandexceludfexample.zip
Don't forget to add the ComVisible(false) attribute to the AddinModule class to prevent the double registration of the add-in on the target PC.
You can use the conditional compilation to add this attribute in the release version of your add-in (see the AddinModule.cs file in the example).
Posted 31 May, 2006 09:51:26 Top
Kitinon W.




Posts: 10
Joined: 2005-07-04
Hi Sergey,

Could you please explain why ComVisible(false) attribute is only necessary in the release version? Thanks.
Posted 31 May, 2006 10:58:10 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Kitinon and Andrew.

Please ignore my note about the 'ComVisible' attribute. I have already fixed the problem with the double registration. Now all should be ok.
Posted 31 May, 2006 11:35:06 Top
Andrew Saunders




Posts: 17
Joined: 2006-03-21
Hi Sergey,

I am using VS2003 and cannot open that file as it was created with a later version. Could you either give me a copy that I can open or explain to me the changes that I need to make to the setup project?

Thanks.
Posted 01 Jun, 2006 04:44:15 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Posted 01 Jun, 2006 08:59:42 Top