Excel COM AddIn (with Shim) Example Wanted

R

Rob Lorimer

Does anyone have a link to an example shimmed Excel shared addin that will
deploy to a non development machine using Office 2003.

Ideally I'd like a VS2003 and VS2005 version.

I've been writing an Excel shared addin (C#) for over a year and have just
discovered how ignorant I've been about deployment issues. The addin runs
and debugs great on my development machine and I'm now wanting to deploy it.

I've spent hours reading the threads in this news group and I'm particularly
greatful for the excellent questions and perseverance of David Thielen.
 
H

Helmut Obertanner

Hello Rob,

only my expirience:

exclude the office.dlls from your setup project.
don't install the Office2003 PIA's into GAC.
exclude forms.dll (if yo use it)
And take care where your PIA's are located in your development machine
(should point to GAC).

Hope that helps.

--
Freundliche Grüße / with regards

Helmut Obertanner
Technical Consultant

Softwaredevelopment
DATALOG Software AG | Zschokkestr. 36 | D-80687 Munich
web: www.datalog.de


.... and IT works!
 
R

Rob Lorimer

thanks Helmut,
exclude the office.dlls from your setup project.
already done.
don't install the Office2003 PIA's into GAC.
I don't include them in my setup project
exclude forms.dll (if yo use it)
not sure what you mean here ... please clarify
I reference forms.dll in addin for message boxes
but don't include it in the setup project.
And take care where your PIA's are located in your development machine
(should point to GAC).
All PIAs point to the GAC on development machine.
 
H

Helmut Obertanner

PIA's:

if you don't include the PIA's into your setup, how did you know that on the
target system are PIA's installed ?

I recommed to install it into applicationDir, but don't register it into GAC

Forms.dll:

if you reference the Forms.dll to your project, normally it would be added
automatically to your Setup project as dependency.

If you install it the Forms.dll on your Target, it will be installed and
everything works fine.
If you ever uninstall your application, the Forms.dll will be uninstalled.
And Office doesn't work.

Hope this helps.

--
Freundliche Grüße / with regards

Helmut Obertanner
Technical Consultant

Softwaredevelopment
DATALOG Software AG | Zschokkestr. 36 | D-80687 Munich
web: www.datalog.de


.... and IT works!
 
R

Rob Lorimer

In this case the machine thats not the development machine is my test machine.

I know that the PIAs are installed because I ensured they were during the
office 2003 install and then checked the GAC for the correct versions.

Forms.dll ... I do reference it in my addin, but it doesn't automatically
appear in my setup project. Maybe this is because you have an international
version? or is this a bug in VS2005?

An earlier post implied that anything in the GAC should not be deployed ...
Office2003 PIAs are in the GAC, but Extensibility, Forms, System,
System.Data, System.Drawing and System.XML aren't.

Does this mean that I have to deploy all those Framework assemblies? None
of them appear automagically into my setup project!

Rob
 
P

Peter Huang [MSFT]

Hi

Since VS2005 is still in beta release, here I think we may dedicated to
..NET 1.1.
Here is a link you may take a look.
Using the COM Add-in Shim Solution to Deploy Managed COM Add-ins in Office
XP
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/htm
l/odc_comshim.asp

Also I think you may try to use the <supportedRuntime> Element to instruct
the Excel.exe to load the .NET 1.1 as the CLR version.
We may try to build such an app.config and named it as Excel.exe.config and
put it into where the excel.exe in.
<supportedRuntime> Element
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht
ml/gnconSupportedRuntimeElement.asp

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.
 
R

Rob Lorimer

See my HOWTO post up further:
HOWTO: AddIn Deployment with Shim for Framework1.1 & Framework2.0
 

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