Referencing the Office Primary Interop Assembly

A primary interop assembly is a unique, vendor-supplied assembly that contains type definitions (as metadata) of types implemented with COM. There can be only one primary interop assembly, which must be signed with a strong name by the publisher of the COM type library. A single primary interop assembly can wrap more than one version of the same type library. To target the common language runtime, you must reference the correct primary interop assembly in your Business Contact Manager application.

Microsoft provides a primary interop assembly for Outlook 2007. This assembly has been strongly named, and resides in the Global Assembly Cache (GAC) under the Microsoft.Office.Interop.Outlook.dll filename.

To use the Outlook primary interop assembly, in the C# code samples included in this Developer Guide complete the following steps in Visual Studio before running the samples:

  1. Add a reference to the Microsoft Outlook 12.0 Object Library from the COM tab in the Add Reference box.

  2. Include the using directive that follows in your code:

    using Outlook = Microsoft.Office.Interop.Outlook;

For directions on using primary interop assemblies to write programs targeting Microsoft Office Applications, see How to: Target Office Applications Through Primary Interop Assemblies.

For more information about the primary interop assemblies, see Primary Interop Assemblies.

See Also

Automating Business Contact Manager From a .NET Framework Application | Welcome to the Business Contact Manager for Outlook Developer Guide | 2007 Office System: Updated Developer Content