Add-in registration

U

uanmi

I have written an add-in for project and it works well on my development
computer. When I build a release version and use it on another computer a
problem happens that I cannot explain.

There is a registry key called LoadBehavior and it is set to 3 to make the
add-in load. On the release build test computer when I run project this
setting is changed to 2 and the add-in does not load. I get no exceptions,
etc. I change it back to 3 and run project again and project changes the
value back to 2.

Is there a way to diagnose why this happens? This is happening outside my
codebase so I need to find the point where it is happening.

regards
Mark
 
X

XL-Dennis

Mark,

It's most likely that something fails during the execution of the
OnConnection event
and therefore the host application set the loadbehavior from 3 to 2 (boot
loaded but not connected).

Does it refer to a managed or unmanaged COM Add-in?

Although it's not an elegant way do debug it but using messageboxes in the
event can uncover the issue involved.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
U

uanmi

Hi,

Alas, I'm adding this everywhere as we speak. I have product registration
and dotfuscation going as well, so it happens I think after that event, when
it tries to fire the first event. Oh, you can probably guess it is written in
C# (minor).

What I would like to know is if there is a way to get project to report on
what it does not like.
 
U

uanmi

I think I have it.

I would appreciate being pointed to step by step instructions on how to
include the office 2003 PIA msi in my VS2005 setup project.

I also need step by step instructions on how to include the office XP PIA
msi in my VS2005 setup project.

I have a couple of mergemodules in my solution. One for project 2003 and one
for project XP. Can I add the office pia to the merge modules? I would
appreciate instructions if this is possible as it would make life much easier.
 
U

uanmi

I have just read that I cannot install the office 2003 PIA from my setup
project. Now I'm lost. What happens if they install project 2003 and not
office 2003? I have tested this on a machine using Virtual PC and office.dll
and xxx.xxx.interop.msproject.dll is not installed.

Does this mean that people must buy office 2003 prior to project 2003? This
seems rather unusual? Why would they want to do that?

Anyway, how do I check that office 2003 PIA is installed using my setup
project and how do I point them to get it from the Microsoft website please.
 
U

uanmi

I should also mention that the Office 2003 PIA is not a pre-requisite package
on my computer for a setup project. Thus I need to add it and do not know how.

The same for the office xp pia
 
X

XL-Dennis

Mark,

I've 'gracefully' avoided to add PIAs to the prerequisities because I find
it confusing.

However, I recently read an article about it:
Adding the Office 2003 Primary Interop Assembly (PIAs) as a prerequisite to
a Visual Studo 2005 Setup Project
http://developers.ie/blogs/CGreen/archive/2006/10/27/2427.aspx

Let's see if MSFT can give us a better solutions then this one.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
U

uanmi

That article has errors in the files on the page. Look at the first xml file
and it does not make sense.

I really need to include the PIA in my setup.exe and then to install it on
the target computer. This appears to be the only way to ensure that the PIA
for project gets installed.

I cannot find anything else on this topic that makes sense. 3 hours of
searching...
 
U

uanmi

What I like to see - in the help file that comes with the office 2003 pia

3 Wrap the O2003pia.msi in another setup package through Visual Studio or
other Windows Installer aware setup editor.

Guess what - no instructions anywhere that I can find on how to do this.
I would appreciate getting those instructions asap.
 
X

XL-Dennis

Mark,

Please see if the following articles shed some lights:
Deploying Visual Studio 2005 Tools for Office Solutions Using Windows
Installer (Part 1 of 2
http://msdn.microsoft.com/library/d...a/html/OfficeVSTOWindowsInstallerOverview.asp
(See the section Customizing the Primary Interop Assemblies Bootstrapper)

Deploying Visual Studio 2005 Tools for Office Solutions Using Windows
Installer:
http://msdn.microsoft.com/library/d...TOWindowsInstallerWalkthrough.aspWalkthroughs (Part 2 of 2)

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
U

uanmi

In the article you mention is this statement
"They’re not completely functional yet, and I’m hoping to get some feedback
on them."

I'm asking for help on how ot do it, not help fix someone else's problems.

I need to know the answser to how to wrap the pia msi in my add-in msi. This
appears to be the solution that I need.
 
U

uanmi

I see there is a fixed package further down the page. Really this is not what
I need. I need to be able to install the PIA from my msi. As I'm doing an
add-in for project it is more prone to issues that other office products. The
main issue appears to be if people install project alone.
 
P

Peter Huang [MSFT]

Hi Mark,

Based on my research, there is no such a mergemodule for PIAs to include in
Setup project.
But here is blog for your reference about add the PIA 2003 as a
prerequisite.
Adding the Office 2003 Primary Interop Assembly (PIAs) as a prerequisite to
a Visual Studo 2005 Setup Project
http://developers.ie/blogs/CGreen/archive/2006/10/27/2427.aspx

NOTE Please note the information in the KB below.
However, you must not deploy an Office 2003 PIA.

Setup
If you create a COM add-in with Visual Studio .NET, a default Setup project
is added to your solution. The default Setup project in the solution
includes the PIAs that are referenced by your COM add-in. The default Setup
project includes the PIAs in the Setup package. This is true even when your
PIA references have the CopyLocal property set to false and a Path property
that points to the PIA in the global assembly cache (GAC).
You may redistribute Office XP PIAs. When you redistribute an Office XP
PIA, you must install the Office XP PIA in the GAC. However, you must not
deploy an Office 2003 PIA. When you build an add-in that targets Office
2003, you must exclude the Office 2003 PIAs from the Setup project. When
the add-in loads in the target Office 2003 application, the add-in will
correctly use the PIAs in the GAC at runtime. The add-in will correctly
fail if the PIAs are not found in the GAC. The add-in will not fall back to
load any other version of the PIA.

840585 Information about designing Office XP add-ins and Office 2003
add-ins by using the .NET Framework
http://support.microsoft.com/default.aspx?scid=kb;EN-US;840585

So I suggest you install PIA 2003 setup package standalone or install with
Office 2003 installation package.
Also based on my simple test, if we install a standalone project, there
will be an option named ".NET programmability support".

As for Office XP PIA, you may try to go this way.
Distributing Solutions That Rely On the Office XP PIAs
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/htm
l/odc_oxppias.asp


Best regards,

Perter Huang
Microsoft Online Partner Support

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

uanmi

Peter,

If I use the option for the boostrapper redist package to install from the
vendor site then it goes to the Microsoft site and fails. This is because the
o2003pia.msi is wrapped in an exe. Good one Microsoft, a score of 0 out of
100 for that one.

What is the point of having the bootstrapper in Visual Studio 2005 if
Microsoft is not going to make these prerequisite packages available in the
right format from the Microsoft website? Let me put it clearly. The person
who thought up the bootstrapper prerequisite package concept is a smart guy.
Unfortunately he works for one of the dumbest companies on the planet. I want
to add prerequsite packages, select the download from the vendor (Microsoft)
website and away I go, all smiles, task of creating the setup project done.

I'm really tired of trying to develop add-ins for Microsoft products. Why
are there so many road blocks? Can you get me an answer from someone in the
Microsoft Office team? Give him the task of writing an article for MSDN
magazine that shows how to create a distribution for the prerequisite
packages that I have listed below.

For my project xp version I need to deploy

..Net 1.1
owc10
offfice xp pia
j# 1.1

For my project 2003 version I need to deploy

..net 2
owc11
office 2003 pia
j# 2.0

Can you help provide a way to do this that is legal? Please do not point me
at some blog with half an answer that I have to decipher using complex
ancient mathematics.

Microsoft created this situation and I need a solution. I have been trying
to fix our deployment scenario for months.
 
P

Peter Huang [MSFT]

Hi Mark,

I am sorry I may not explain the scenario more detailed.

1. For Office XP PIA, we have an MSDN document about how to deploy it, you
may take a look.(I included it in my last reply)
Distributing Solutions That Rely On the Office XP PIAs
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/htm
l/odc_oxppias.asp

2. As for Office 2003 PIA, we did not suggest you do that in setup project.
As the KB below pointed out, "However, you must not deploy an Office 2003
PIA."
http://support.microsoft.com/default.aspx?scid=kb;EN-US;840585

Also here is an MSDN document reiterate that.
I quote here for your reference.

Deployment
No solution setup package should try to re-distribute the Office 2003 PIAs
in any way. Office 2003 should be the only Office 2003 PIAs delivery
mechanism. Office 2003 PIAs can be installed automatically to the GAC or
install on demand on end users machines through complete, typical or custom
installs.

Be sure not to include the PIAs in your setup. Including the Office 2003
PIAs in your setup project will potentially break Office 2003 ownership and
registration of the PIA components on end-user machines. This would cause
them to inadvertently be removed on an end-user machine during an
uninstall.

For example, when users install the setup package, the Office 2003 PIAs
that are packaged into the setup will overwrite the registration of already
installed components. And when users uninstall their solution, those PIA
registration could be broken, thus leaving the users' machines without .NET
programmability support for those components.

Note Visual Studio .NET and Visual Studio 2003 setup project usually
automatically include some of the PIAs in the setup package. So developers
need to be sure to exclude the Office 2003 PIAs from their setup package.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stagsdk/htm
l/stconPIAs_HV01083002.asp

Currently I am sorry to say that this is by design currently.
Also this issue has also been discussed previously.

http://groups.google.com/group/microsoft.public.office.developer.smarttags/b
rowse_frm/thread/a9d0df5e55a4e3d7/91d125760d840b75?lnk=st&q=deployment+PIA+O
ffice+2003+%22v-phuang%22&rnum=1&hl=en#91d125760d840b75

Anyway I do understand your concern and I will forward your concern to our
product team.

If you still have any concern, please feel free to let me know.


Best regards,

Perter Huang
Microsoft Online Partner Support

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

uanmi

Hi Peter,

your email has no value. Out of 100 it gets a score of 0.

I need help getting a solution that will work. Is there a document that
explains how to create an installer that can get the required components from
the microsoft website? Or are you saying that only a manual solution will
work?

I'm not asking for you to pass along my comments, as I have no belief this
will achieve anything. I'm asking for you to get someone from the office team
to talk to me and to explain how to achieve the outcome for the four
prerequisites needed for each build.

I want to build an add-in, not be an expert in fixing Microsoft's problems.

regards, Mark
 

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