简体   繁体   中英

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?

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM