Incorrect reference or missing reference to Office 2003 primary interop assembly (PIA) (827476)



The information in this article applies to:

  • Microsoft Office Professional Edition 2003
  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio Tools for the Microsoft Office System version 2003

SYMPTOMS

You experience any one of the following behaviors while you develop a Microsoft Office 2003 managed code solution by using Microsoft Visual Studio .NET 2003:
  • When you create a new project by using Microsoft Visual Studio Tools for the Microsoft Office System, or when you reference an Office 2003 application object library from the Add Reference dialog box, the Microsoft Office 11.0 primary interop assembly (PIA) does not appear in the list of project references in Solution Explorer.
  • When you try to build a Visual Studio Tools for Office project, you receive the following error message:
    Namespace or type 'Core' for the Imports 'Microsoft.Office.Core' cannot be found.
    The build error references an Imports statement (or a using directive) for the Office 11.0 assembly.
  • When you reference the Office 11.0 object library by using the Add Reference dialog box in Visual Studio .NET, the newly added reference uses an interop assembly (IA) for the Office library. You expect the reference to use the Microsoft Office 11.0 PIA.

    When Visual Studio .NET builds and references an IA instead of referencing the PIA, the Copy Local property of the reference is set to True. When you use the IA, you may receive build errors that are similar to the following:
    Reference required to assembly 'office' containing the implemented interface 'Microsoft.Office.Core.<InterfaceName>'.

CAUSE

This problem may occur when the Office 11.0 PIA is not correctly installed on your Visual Studio .NET 2003 development computer.

RESOLUTION

Set PIAs to run from your computer

To correct this problem, first make sure that the PIAs are set to run from your computer in Office 2003 Setup.

To set PIAs to run from your computer, follow these steps:
  1. In Windows Control Panel, double-click Add or Remove Programs.
  2. In the list of installed programs, select Microsoft Office Professional Edition 2003, and then click Change. Microsoft Office 2003 Setup starts in maintenance mode.
  3. Click Add or Remove Features, and then click Next.
  4. Click "Choose advanced customization of applications", and then click Next.
  5. Confirm that the PIAs that you require are set to Run from My Computer. Office 2003 Setup includes the following PIAs as .NET Programmability Support features:

    Microsoft Forms 2.0
    Microsoft Graph
    Microsoft Office 2003 Web Components
    Microsoft Office Access
    Microsoft Office Excel
    Microsoft Office Outlook
    Microsoft Office PowerPoint
    Microsoft Office Publisher
    Microsoft Office Word
    Smart Tag

  6. After you change the Office feature set, click Update to finish setup.

Repair Office installation

If you followed the steps in the previous section to set the PIAs to run from your computer, and if any one of the symptoms that are described earlier still occurs, repair your Office installation.

To repair your Office installation, follow these steps:
  1. In Windows Control Panel, double-click Add or Remove Programs.
  2. In the list of installed programs, select Microsoft Office Professional Edition 2003, and then click Change. Microsoft Office 2003 Setup starts in maintenance mode.
  3. Click Reinstall or Repair, and then click Next.
  4. Click "Detect and Repair errors in my Office installation", and then click Install.

Modification Type:MinorLast Reviewed:2/3/2006
Keywords:kbtshoot kbPIA KB827476 kbAudDeveloper