Architecture of VSTO Add-In

add-in-architecture

The main design considerations of Office Application-Level Add-In Architecture are following:

  • Each add-in is loaded in new application domain so as to isolate it from main app and other add-ins. Thus if the add-in hangs whole app doesn’t crashes.
  • Security and Permission level checks performed on add-ins.
  • Clean shutdown of application and loaded add-ins.

The main components which take part in functioning of Application-Level Add-Ins are following:

Architecture Components

Runtime Loader

The component is named VSTOEE.dll and is responsible for loading the correct version of VSTO runtime when a document-level customization is opened or add-in is started.

Solution Loader

It is named VSTOLoader.dll. This is responsible forloading the VSTO application. It also creates a new Application Domain for eachadd-in and performs security checks on VSTO application.

Registry Entry

This is where the Office application discovers the add-ins installed and to be loaded.

Applications in the 2007 Microsoft Office system look for the Manifest entry under the key HKEY_CURRENT_USER\Software\Microsoft\Office\application name\Addins\add-in ID(or, for Visio, HKEY_CURRENT_USER\Software\Microsoft\Visio\Addins\add-in ID).

The Manifest entry specifies the full path of the deployment manifest.

Deployment Manifest and Application Manifest

The list of Deployment manifest indicates the add-ins installed. Each deployment manifest points to the correct version of an application manifest which in turn points to assembly paths and entry points.

Add-In Loading Process

  1. The Office Client application checks the registry installed add-ins.
  2. It loads Runtime Loader which in turn loads Solution Loader.
  3. SolutionLoader loads the .NET Runtime and managed portion of VSTO Runtime.
  4. Latest versions of Deployment and Application manifests are downloaded. Once security checks are passed, latest add-in assemblies are downloaded.
  5. New application domains are created for each add-in and add-ins are loaded into that app domain.
  6. Various entry point methods of Add-in are called before finally calling ThisAddIn_Startup method which is default event handler for Startup event.

(Text quoted from http://bit.ly/cGul3q)

architecture-of-outlook-add-in

Advertisements

Deploying office solutions to end user

You can deploy Office solutions developed with Visual Studio Tools for Office in several ways. In this thread, find conceptual information to help you decide how to deploy your Office solutions and sample code to help explain the steps.

The methods available to you depend on the versions of Visual Studio and Microsoft Office that you are using. This post has information about deploying with Windows Installer (MSI) and ClickOnce. In addition, there is troubleshooting information about deploying the Office primary interop assemblies (PIAs).

Applicable  versions

VSTO runtime

Visual Studio

Office

.NET Framework

VSTO 2005 SE

Visual Studio 2005

2003

2.0

VSTO 2005 SE

Visual Studio 2005

2007

2.0

VSTO 2005 SE

Visual Studio 2008

2003

2.0, 3.5

Windows Installer: Use this method to create additional registry keys and brand your installer.

Office Primary Interop Assemblies

MSDN Library

=====================================================================================

Applicable  versions

VSTO runtime

Visual Studio

Office

.NET Framework

VSTO 3.0

Visual Studio 2008

2007

3.5

VSTO 3.0 SP1

Visual Studio 2008 SP1

2007

3.5 SP1

ClickOnce: Use this method to create and install self-updating applications.

Windows Installer: Use this method to create additional registry keys and brand your installer.

Office Primary Interop Assemblies

MSDN Library

* * *

Hi

The actual link for this post is

http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/1666d2b0-a4d0-41e8-ad86-5eab3542de1e

VSTO Forums

Add-In Express Forum:

http://www.add-in-express.com/forum/list.php?FID=5

MSDN Forum:

http://social.msdn.microsoft.com/Forums/en-US/vsto/threads

Microsoft`s Google Group for Interoperability (Interop Assemblies) related problems:

http://groups.google.com/group/microsoft.public.outlook.interop/topics

Microsoft`s Google Group for Installation problems of VSTO Add-In:

http://groups.google.com/group/microsoft.public.outlook.installation/topics

List of  Google Groups on VSTO Outlook Add-Ins:

http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.outlook