PIA on a build server

J

Jiho Han

We have an Excel 2003 VSTO project that builds on a build server. We were
referencing the interops directly from a local folder (copied out from GAC I
think).

We found out that then some of our installations were failing because of a
type mismatch error when passing, for example, Workbook to VBA code. It only
fails for some, not all. We looked and searched on Google, and figured it's
because we were not building against the PIA in the GAC but rather against
the interop dlls.

We found the redistributable form of PIA and thought perfect for our build
server install, only to find out that the redist of PIA will not install
without Excel on the server. Installing some dlls is one thing but having to
install Office on the server is pretty big.

So, the question is what is the purpose of having a redistributable PIA if
it requires office anyway. If you have to install Office, you don't need the
redist because in Office setup, you can as easily enable ".NET
Programmability".

It turns out that the failing installations failed not because of the PIA
referencing issue but somehow a broken installation of PIA. One machine had
the redist installed but did not work. So I removed it and installed the PIA
via Office setup and everything worked.

So how critial is it that the build go against the PIA in the GAC, and not
against the generated interop (copied from the GAC)? Apparently, it all
works?
 
C

Cindy M.

Hi =?Utf-8?B?SmlobyBIYW4=?=,
So, the question is what is the purpose of having a redistributable PIA if
it requires office anyway. If you have to install Office, you don't need the
redist because in Office setup, you can as easily enable ".NET
Programmability".
If you want to install the *VSTO solution* without user intervention, and
this option wasn't originally checked (or the .NET Framework wasn't available
when Office was installed).

Please note that this redistributable is made available for installing
programs on client machines. Then it makes sense that it will only install if
Office is present.
So how critial is it that the build go against the PIA in the GAC, and not
against the generated interop (copied from the GAC)? Apparently, it all
works?
The key is that your code is referencing the PIA, and not an IA generated by
TlbImp.exe. As far as code executing correctly, the location is not an issue.
In the "install on client" scenario, this is put in the GAC because there
it's available to all programs, automatically. Otherwise, every program begin
installed would end up copying in the PIAs, which would take up a lot of room
and possibly be confusing.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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