What is Microsoft Primary Interoperability Assemblies?
To use the features of a Microsoft Office application from an Office project, you must use the primary interop assembly (PIA) for the application. The PIA enables managed code to interact with a Microsoft Office application’s COM-based object model.
How do I install Office Primary Interop Assemblies?
To install the PIAs when you install Office
- Ensure that you have a version of the . NET Framework that is no older than 2.0.
- Install Microsoft Office and make sure that the . NET Programmability Support feature is selected for the applications you want to extend (this feature is included in the default installation).
What is interop code?
Interoperability enables you to preserve and take advantage of existing investments in unmanaged code. Code that runs under the control of the common language runtime (CLR) is called managed code, and code that runs outside the CLR is called unmanaged code.
Where can I find the Interop Assembly on my computer?
NET clients can access the same copy of the interop assembly, which is signed and installed in the global assembly cache. For more information about producing and using primary interop assemblies, see Primary Interop Assemblies.
When to use a Primary Interop Assembly ( Pia )?
If you employ this technique, and you are not using a private COM component, always reference the primary interop assembly (PIA) published by the author of the COM component you intend to incorporate in your managed code. For more information about producing and using primary interop assemblies, see Primary Interop Assemblies.
Where do I install signed assemblies in Interop?
Assemblies that are produced by the Type Library Importer (Tlbimp.exe) can be signed by the publisher by using the /keyfile option. You can install signed assemblies into the global assembly cache. Unsigned assemblies must be installed on the user’s machine as private assemblies.
Where to find Primary Interop Assemblies in Visual Studio?
If Visual Studio cannot locate the primary interop assembly associated with the type library, it prompts you to acquire it or offers to create an interop assembly instead. Likewise, the Type Library Importer (Tlbimp.exe) also uses the registry to locate primary interop assemblies.