Dela via


How to: Install Office Primary Interop Assemblies

You must install the Microsoft Office primary interop assemblies in the global assembly cache and register them before you can debug or run a Visual Studio Tools for Office solution. The interop assemblies enable managed code to interact with a Microsoft Office application's COM-based object model. For more information, see Office Primary Interop Assemblies

You can install the complete set of primary interop assemblies in the global assembly cache in two ways:

  • Perform a Complete installation of Microsoft Office.

  • Install them from the redistributable primary interop assemblies package.

Note

Visual Studio Tools for Office installs private copies of the primary interop assemblies outside of the global assembly cache. These copies of the assemblies are used for building projects. However, the primary interop assemblies must also be installed and registered in the global assembly cache to perform most development tasks, such as running or debugging projects. For more information, see Office Primary Interop Assemblies.

Note

You must be an administrator on the development computer to install Visual Studio Tools for Office, the Visual Studio Tools for Office runtime, the .NET Framework, and the Microsoft Office primary interop assemblies.

Complete Installation

To install the primary interop assemblies when you install the 2007 Microsoft Office system

  1. Install the Microsoft .NET Framework 3.5 or later.

    The .NET Framework is required for the primary interop assemblies to be installed in the global assembly cache during the next step.

  2. Install Microsoft Office and select the Complete installation option.

To install the primary interop assemblies when you install Microsoft Office 2003

  1. Install the Microsoft .NET Framework 2.0 or later.

    The .NET Framework is required for the primary interop assemblies to be installed in the global assembly cache during the next step.

  2. Install Microsoft Office and select the Complete installation option.

During a Typical installation of Microsoft Office, the primary interop assemblies are set to be installed on first use if the .NET Framework is installed. This installation option works on end user computers when an end user runs a Microsoft Office solution. For more information about installing Visual Studio Tools for Office, see Installing Visual Studio Tools for Office.

Redistributable Primary Interop Assemblies Packages

To install the primary interop assemblies for the 2007 Microsoft Office system by using the redistributable package

  1. Install the Microsoft .NET Framework 3.5 or later.

    The .NET Framework is required for the primary interop assemblies to be installed in the global assembly cache during the next step. For more information, see How to: Install Prerequisites on End User Computers to Run Office Solutions (2007 System).

  2. Run the Windows Installer package available for download from 2007 Microsoft Office System Update: Redistributable Primary Interop Assemblies.

To install the primary interop assemblies for Microsoft Office 2003 by using the redistributable package

  1. Install the Microsoft .NET Framework 2.0 or later.

    The .NET Framework is required for the primary interop assemblies to be installed in the global assembly cache during the next step. For more information, see How to: Prepare End User Computers to Run Office Solutions (2003 System).

  2. Run the Windows Installer package available at Office 2003 Update: Redistributable Primary Interop Assemblies.

See Also

Tasks

How to: Target Office Applications Through Primary Interop Assemblies

How to: Install the Visual Studio Tools for Office Runtime

Concepts

How to: Install Visual Studio Tools for Office to Develop for the 2007 Microsoft Office System

How to: Install Visual Studio Tools for Office to Develop for Microsoft Office 2003

How to: Install Visual Studio Tools for Office to Develop for SharePoint Workflow Project Templates

Office Solutions Development Overview

Reference

Office Primary Interop Assemblies

Other Resources

Getting Started (Visual Studio Tools for Office)