Compartilhar via


SPSolution.Retract Method (DateTime, Collection<SPWebApplication>)

Creates a timer job to retract the specified solution from the specified web applications at a particular time.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub Retract ( _
    dt As DateTime, _
    webApplications As Collection(Of SPWebApplication) _
)
'Usage
Dim instance As SPSolution
Dim dt As DateTime
Dim webApplications As Collection(Of SPWebApplication)

instance.Retract(dt, webApplications)
public void Retract(
    DateTime dt,
    Collection<SPWebApplication> webApplications
)

Parameters

  • dt
    Type: System.DateTime

    A DateTime object containing the time to run the timer job.

Remarks

When a solution is retracted, all files for that solution are retracted, even if another solution points to the same file. This can be avoided by ensuring that each solution points to a unique set of files.

If you are running multiple jobs and the order in which they run is important, make sure that the specified times are sufficient for each job to complete before the next job is submitted. When multiple jobs are in the pool, the order in which they run is unpredictable.

To retract a language package, see SPSolutionLanguagePack.

See Also

Reference

SPSolution Class

SPSolution Members

Retract Overload

Microsoft.SharePoint.Administration Namespace