The PIA(Primay Interop Assembly) contains the official description of the types as defined by the COM publisher of those types. The PIA may contain certain customizations that make the types easier to use from managed code. The PIA is always signed by the publisher of the original COM type. If you publish a COM component, it is a good idea to provide a primary interop assembly, unless you don't want your component to be used from managed code.
Any interop assembly that is not provided by the publisher of the COM types is considered unofficial and should be avoided. Because the types defined in such an assembly are not to be signed by the publisher of the PIA, they are incompatible with the definitions provided in the PIA.
How do I make a PIA for my COM type library?
In most cases, creating a PIA is easy. The Tlbimp (Type Library Importer) tool provided in the Microsoft® .NET Framework SDK is capable of creating an interop assembly from an existing type library. The /primary switch on Tlbimp is used to create a PIA. All PIAs must be signed by their publisher so the publisher key must also be supplied with the /keyfile switch. For example:
TlbImp Widget.tlb /primary /keyfile:AcmeKey.snk /out:WidgetLib.dll
In the example above, Widget.tlb is the type library being imported, AcmeKey.snk is the keyfile containing the public key for the Acme Company, and WidgetLib.dll is the PIA that will be generated. A test keyfile can be generated with SN utility (SN.EXE —k AcmeKey.snk). Before the assembly is actually deployed, it should be signed with the company's real key. The same key should be used to sign all assemblies from a single company.