Condividi tramite


IVsExtensionManager.Install Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Installs an extension to the ExtensionsRoot directory.

Namespace:  Microsoft.VisualStudio.ExtensionManager
Assembly:  Microsoft.VisualStudio.ExtensionManager (in Microsoft.VisualStudio.ExtensionManager.dll)

Syntax

'Declaration
Function Install ( _
    extension As IInstallableExtension, _
    perMachine As Boolean _
) As RestartReason
RestartReason Install(
    IInstallableExtension extension,
    bool perMachine
)
RestartReason Install(
    IInstallableExtension^ extension, 
    bool perMachine
)
abstract Install : 
        extension:IInstallableExtension * 
        perMachine:bool -> RestartReason
function Install(
    extension : IInstallableExtension, 
    perMachine : boolean
) : RestartReason

Parameters

  • perMachine
    Type: System.Boolean

    Specifies whether an extension should be installed on a per-computer basis or only for the current user.

Return Value

Type: Microsoft.VisualStudio.ExtensionManager.RestartReason
RestartReason.PendingEnable if a restart of Visual Studio is required; otherwise, RestartReason.None.

Remarks

Although this API supports the Extension Manager infrastructure, we recommend that you do not use it because it is subject to change.

Installing an extension by using this method automatically enables the extension as well. A restart of Visual Studio may be required for the extension to become loadable.

If installation succeeds, this method sets the PackagePath property of the IInstallableExtension object.

.NET Framework Security

See Also

Reference

IVsExtensionManager Interface

Microsoft.VisualStudio.ExtensionManager Namespace