Share via


PublishEventsClass.OnPublishDone Event

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Event triggered when a publish operation has ended.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

'Declaration
Public Overridable Event OnPublishDone As _dispPublishEvents_OnPublishDoneEventHandler
public virtual event _dispPublishEvents_OnPublishDoneEventHandler OnPublishDone
public:
virtual   event _dispPublishEvents_OnPublishDoneEventHandler^ OnPublishDone {
    void add (_dispPublishEvents_OnPublishDoneEventHandler^ value);
    void remove (_dispPublishEvents_OnPublishDoneEventHandler^ value);
}
abstract OnPublishDone : IEvent<_dispPublishEvents_OnPublishDoneEventHandler,
    EventArgs>
override OnPublishDone : IEvent<_dispPublishEvents_OnPublishDoneEventHandler,
    EventArgs>
JScript does not support events.

Implements

_dispPublishEvents_Event.OnPublishDone

Remarks

Visual Studio includes a new feature known as ClickOnce Deployment. ClickOnce allows you to publish Windows applications to a Web server or network file share for simplified installation. For more information about this, see ClickOnce Security and Deployment.

Examples

Public Class Connect
    Implements IDTExtensibility2
    Public WithEvents pubEvents As EnvDTE80.PublishEvents

    Dim applicationObject As DTE2
    Dim addInInstance As AddIn

    Public Sub OnConnection(ByVal application As Object, ByVal _
    connectMode As ext_ConnectMode, ByVal addInInst As Object, ByRef _
    custom As Array) 
    Implements IDTExtensibility2.OnConnection
        Try
            applicationObject = CType(application, DTE2)
            addInInstance = CType(addInInst, AddIn)
            Dim events As EnvDTE80.Events2
            events = applicationObject.Events2
            pubEvents = CType(events._PublishEvents(Nothing), _
            EnvDTE80.PublishEvents)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub pubEvents_OnPublishBegin(ByRef [Continue] As Boolean) _
    Handles pubEvents.OnPublishBegin
        MsgBox("A publish event is occuring..")
    End Sub

    Private Sub pubEvents_OnPublishDone(ByVal Success As Boolean) _
    Handles pubEvents.OnPublishDone
        MsgBox("A publish event has completed.")
    End Sub

.NET Framework Security

See Also

Reference

PublishEventsClass Class

EnvDTE80 Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples

How to: Respond to ClickOnce Publish Events