Shared Addin runs on development machine but not on clients

G

Gary Tweddle

Hi,

I've developed a shared addin using VS 2005 that should add another toolbar
button to the standard toolbar in the various Office 2003 products (limited
it to the four we mainly use at the organisation, Word, Excel, PowerPoint,
publisher). The addin passes the currently active document as an argument
to another app I've wrote which can then be used to add/update the document
in our EDM system.

The issue I'm have is regarding the addin itself. It works flawlessly (both
in debug and from the deployment setup) on my development machine but not
from any target machines. I carried out the following steps while defining
the setup procedure:

1. The .NET Framework 2.0 is installed on the client machine,
2. The Office 2003 interops are also installed and registered in the GAC,
3. I've generated a strong name snk file and associated with the addin
project (through the project's property page),
4. The output of the project (singular dll) is also to be registered into
the GAC folder (using the view filesystem of the setup project),
5. I've manually added the extensibility dll to the project as it initially
didn't add this to the setup project's dependencies.
6. Ensured that the interop dlls are not included in the setup project.

The setup project appears to install correctly on the client machine, the
registry entries are correctly generated, the assembly is added to the GAC
and the addin appears in the COM Addin dialog within the office products.
But they complain of a runtime error during the loading of the addin. I've
placed a try catch block around the OnConnect method to check for errors and
placed test status messagebox popups throughout the code. Nothing triggers.

I've so far confirmed my project depends on the following dlls:

1. office.dll
2. extensibility.dll
3. stdole.dll (for adding a custom icon to the button)
4. The various office interop libraries.

All of these files appear to be correctly installed on the client machine,
either through pre-requisites or through the setup project.

I'd greatly appreciated any input on this matter. Does anyone see something
wrong?

Thanks

Gary Tweddle
Three Rivers Housing
 
P

Peter Huang [MSFT]

Hi Gary,

Did the problem persist with all the applications,excel, word and so on?
If so, we may try to isolate the problem from one of the application e.g.
Excel.
You may try to check the security setting.
To isolate the problem, please try to run the steps below.
1. Set the macro setting to low in Excel
2. use the .NET 2.0 tool, caspol
caspol -s off
the commandline above will close the .NET CAS check.
3. Try to run the Addin under admin
4. Try to add a messagebox, eventlog or write a file lob in the OnConnection
e.g.
In the first line of the OnConnection method.
MessageBox.Show("On Connect...");
So that we will know that the OnConnect method has been called. The problem
occurred after the Onconnection.

Please try the steps below and let me know the result.
Also can you provide an exact error message or call stack?


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Gary Tweddle

Thanks Peter,

We've resolved the issue (on one target machine at least) by performing an
office update. I'll run it through on another couple of machines to confirm
this was the issue. If not I'll give what you suggested a try and get back
to you with the results.

Thanks

Gary Tweddle
Three Rivers Housing
 
P

Peter Huang [MSFT]

Hi Gary,

Thanks for your update!
If you still have any concern, please feel free to post here.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top