1
votes

In Shared add-in the following event handler code for add-in start up is as follows:

Public Sub OnStartupComplete(ByRef custom As System.Array) _
 Implements Extensibility.IDTExtensibility2.OnStartupComplete
End Sub

In VSTO it was replace with

Private Sub ThisAddIn_Startup() Handles Me.Startup
End Sub

Is there anyway to create event handler equivalent for VSTO without using extensibility

Public Sub OnAddInsUpdate(ByRef custom As System.Array) _
 Implements Extensibility.IDTExtensibility2.OnAddInsUpdate
End Sub

Thanks.

1

1 Answers

0
votes

VSTO wraps the IExtensibility2 interface completely and it doesn't expose that AddinsUpdate callback (not publicly, but I believe it DOES intercept it internally).

You might compile, then run reflector to reverse engineer the VSTO code that implements IExtensibility. I did that at one point to figure out how to hook into the "GetUI" Extensibility callback so I could push out custom Backstage XML from a VSTO 2008 addin (Backstage view isn't directly supported by Vsto2008).

But I didn't notice/look for the AddinsUpdate call back.