> I guess I'm confused because a PIA is wrapping an existing COM
> component that will be used from .NET, so why the heck do you need the
> extra meta-data in the registry that RegAsm will add to the existing
> COM entries? Shouldn't registering the original COM component be
> enough?
Well, I'm going to answer a portion of my own post - I should've read
the "official" PIA primer on MSDN before posting...
What what I just read (http://msdn2.microsoft.com/en-us/library/
aa302338.aspx), a PIA needs to be RegAsm'ed so that Visual Studio can
reference the PIA instead of generating a new IA when you add a
reference to a COM component that has a PIA associated with it. I sort
of suspected the extra registry keys were being used by the IDE, and
not by the CLR per se.
But I'm still a bit confused. Since it seems like these extra registry
entries are only used by the IDE to differentiate between plain old
COM components and those that have PIAs, I wondering if I need to
RegAsm the PIA's when I deploy components to a client machine. That
is, in a compiled .NET assembly using the COM classes defined in the
PIA, the assembly will already be referencing the PIA, so do I need to
RegAsm the PIA on the client machine, or is installing the PIA's
assembly file to the GAC enough? It seems like the extra registry
entries are just there to so that the IDE can locate any PIA's while
it's enumerating the keys under HKLCR\TypeLib...
--
Mike S
Phil Wilson - 27 Jul 2007 19:49 GMT
I think you're right. In a deployment situation where a PIA (or any interop
assembly) is being used by an app there's no need to register it. In fact
I've seen people mistakenly register interop assemblies (with regasm) only
to find that it affects the actual registration of the COM class it's
mapping, so unregistering the interop assembly then destroyed the COM
registration.

Signature
Phil Wilson
[MVP Windows Installer]
>> I guess I'm confused because a PIA is wrapping an existing COM
>> component that will be used from .NET, so why the heck do you need the
[quoted text clipped - 25 lines]
> --
> Mike S