Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IDTExtensibility2.OnDisconnection Method

Occurs whenever an add-in is unloaded from Visual Studio.

Namespace: Extensibility
Assembly: Extensibility (in extensibility.dll)

void OnDisconnection (
	[InAttribute] ext_DisconnectMode RemoveMode,
	[InAttribute] ref Array custom
)
void OnDisconnection (
	/** @attribute InAttribute() */ ext_DisconnectMode RemoveMode, 
	/** @attribute InAttribute() */ /** @ref */ Array custom
)
JScript does not support passing value-type arguments by reference.

Parameters

RemoveMode

An ext_DisconnectMode enumeration value that informs an add-in why it was unloaded.

custom

An empty array that you can use to pass host-specific data for use after the add-in unloads.

OnDisconnection, which is similar to OnBeginShutdown, occurs whenever the add-in is unloaded, but the integrated development environment (IDE) remains running. (OnBeginShutdown occurs whenever the IDE is shut down, which necessarily unloads add-ins that are running.)

public void OnDisconnection(ext_DisconnectMode disconnectMode, ref 
Array custom)
{
    // Place cleanup code here.
    System.Windows.Forms.MessageBox.Show("Add-in is shutting down.");
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.