Help and Support
 

powered byLive Search

PRB: Visual Studio .NET Shared Add-in Is Not Displayed in Office COM Add-ins Dialog Box

Article ID:316723
Last Review:January 30, 2007
Revision:5.1
This article was previously published under Q316723

SYMPTOMS

A Visual Studio .NET Shared add-in may not be displayed as expected in the Add-ins list in the Microsoft Office COM Add-Ins dialog box.

Back to the top

CAUSE

This behavior occurs if the following check box is selected in the Page 4 of 5 dialog box in the .NET Shared Add-in Wizard when you build the add-in:
My Add-In should be available to all users of the computer it was installed on, not just the person who installs it.
Office applications display only per user add-ins in the COM Add-ins dialog box. When you select the preceding check box in the wizard, this makes your add-in per machine rather than per user.

Back to the top

STATUS

This behavior is by design.

Back to the top

MORE INFORMATION

The COM Add-Ins dialog box also contains Add and Remove buttons. If you attempt to add the .NET Shared Add-in by clicking the Add button and browsing to the managed .NET DLL file built for the .NET Shared Add-in, you receive the following error message:
Path of add-in is not a valid Office add-in.
This behavior occurs because Office attempts to load and register the .NET Shared Add-in DLL file in the same way that it loads a legacy Component Object Model (COM) DLL file. This attempt to load the add-in fails, because the shared add-in is a managed DLL.

The only way that Office can load the .NET Shared Add-in DLL is through COM interop. For this to occur, the .NET Shared Add-in DLL must be strongly named and then registered in the global assembly cache and then registered with COM interop. The Office user interface (UI) does not provide options to do this; to do this, run Setup for the .NET Shared Add-in.

When you use the Extensibility Wizard to create a new .NET Shared Add-in, the project contains a Setup project for the add-in. You can find this project with the name Add-in NameSetup in Solution Explorer. To build this project and run Setup, follow these steps:
1.Right-click Project Name in Solution Explorer, and then click Build.

This creates Setup.exe and the required .msi files in the Add-in NameSetup\Debug or Add-in NameSetup\Release folder, depending on the type of build.
2.Copy the contents of the Add-in NameSetup\Debug or Add-in NameSetup\Release folder to the target computer on which you want the add-in installed.
3.Start Setup.exe to install the .NET Shared Add-in.

Back to the top

REFERENCES

For additional information about how to build Office COM add-ins in Visual Studio .NET, click the article numbers below to view the articles in the Microsoft Knowledge Base:
302896 (http://support.microsoft.com/kb/302896/EN-US/) HOW TO: Build an Office COM Add-in by Using Visual Basic .NET
302901 (http://support.microsoft.com/kb/302901/EN-US/) HOW TO: Build an Office COM Add-in by Using Visual C# .NET
316724 (http://support.microsoft.com/kb/316724/EN-US/) PRB: Macro Warning Occurs in an Office Application When You Load a .NET Add-In

Back to the top


APPLIES TO
Microsoft Visual Studio .NET 2002 Professional Edition
Microsoft Access 2002 Standard Edition
Microsoft Excel 2002 Standard Edition
Microsoft Outlook 2002 Standard Edition
Microsoft PowerPoint 2002 Standard Edition
Microsoft Word 2002 Standard Edition

Back to the top

Keywords: 
kberrmsg kbprb KB316723

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.