Exercise 3: Removing the PIA Dependence from the ApplicationOffice programmability relies on types from the Office Primary Interop Assembly (PIA) to be able to interface with the various applications in the office suite. In the past, this has dramatically impacted deployment of customized Office applications for a number of reasons. First, different versions of Office use different versions of the PIA, creating complexity for managing the assemblies. Secondly, IT personnel had to figure out deployment strategies to ensure required PIA resources were available across their support base. Additionally, deploying the PIA with an application resulted in a larger installation than necessary due to the extra, unused features.
Note:
Primary Interop Assemblies (PIAs) are a critical part of any .NET framework application needing to interface with COM components. A regular Interop Assembly is used for describing the COM types, allowing managed code to bind to the COM types at compile time. Interop Assemblies also help the CLR understand how those COM types should be marshaled at run time. The Primary Interop Assembly differs from regular Interop Assemblies in that it is the “official” holder of all type descriptions and is signed by the vendor to ensure its validity.
Development in Visual Studio 2010 eases these burdens by removing this PIA dependence from applications. When the dependency is removed, the compiler will import whatever types are needed by your application from the PIA directly into your application; you simply deploy your application knowing that all the PIA classes you need are included with your application’s assemblies. Task 1 – Checking that PIA dependencies are removed by defaultIn Visual Studio 2010 PIA dependencies are removed by default, to verify this:
Next Step |
DownloadsDownload The Offline Training Kit Contents |