Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTO vs. Primary Interop Assemblies, what's the difference?

I already developed a large Office application-level add-in and it works like a charm, but I have problems understanding the technical basis.

  1. So what exactly are VSTO and the PIAs good for?
  2. Does VSTO just provide a proper project type for Visual Studio and that's it?
  3. Are the Primary Interop Assemblies (PIA) just some kind of wrapper for accessing the Office Object Model?
  4. Do both of them provide more things and features than I am aware of?
like image 290
alapeno Avatar asked Jun 06 '12 12:06

alapeno


1 Answers

VSTO is the application runtime that provides hooks (solution loader) into the Office subsystem via PIA. PIAs are wrappers around the unmanaged COM API (IDTExtensibility2) that Office is built from. PIAs provide managed access and run above the VSTO runtime.

VSTO comes with project types that build the deployment manifest required for detecting dependencies and loading your Add-In at runtime.

The PIAs provide managed access to the COM object-model, but it also supports unmanaged access should you want more control over how your solution is loaded (hence you always have VSTO runtime, but not always PIAs).

This MSDN link provides a great overview of the evolution of PIAs and VSTO away from IDtExtensibility2 which is another loading option (outside of PIAs)

like image 72
SliverNinja - MSFT Avatar answered Oct 20 '22 20:10

SliverNinja - MSFT