This documentation is archived and is not being maintained.

Workspace.CheckIn Method (PendingChange[], String, String, CheckinNote, WorkItemCheckinInfo[], PolicyOverrideInfo, CheckinOptions)

Checks in the specified set of pending changes to the version-control repository.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public int CheckIn(
	PendingChange[] changes,
	string author,
	string comment,
	CheckinNote checkinNote,
	WorkItemCheckinInfo[] workItemChanges,
	PolicyOverrideInfo policyOverride,
	CheckinOptions checkinOptions


Type: Microsoft.TeamFoundation.VersionControl.Client.PendingChange[]

The set of pending changes to check in. If you do not specify this parameter, all changes in the workspace are checked in.

Type: System.String

The author of the changeset. If you do not specify this parameter, the user who is making the check-in call is identified as the author.

Type: System.String

The comment to be associated with this check-in. May be null.

Type: Microsoft.TeamFoundation.VersionControl.Client.CheckinNote

CheckinNote information to be associated with this check-in. The default check-in notes are for security reviewer, performance reviewer, and code reviewer. May be null.

Type: Microsoft.TeamFoundation.VersionControl.Client.WorkItemCheckinInfo[]

Information about associated work items. May be null.

Type: Microsoft.TeamFoundation.VersionControl.Client.PolicyOverrideInfo

Information that the user provided to override a check-in policy. May be null.

Type: Microsoft.TeamFoundation.VersionControl.Client.CheckinOptions

One of the following enum values (None, SuppressEvent, or ValidateCheckinOwner) for the check-in.

Return Value

Type: System.Int32
If successful, a positive changeset number for this check-in.


This workspace has been deleted.

Each check-in is an atomic operation. All changes are checked in, or none are. If the check-in is successful, the method returns a positive changeset number. If the set of pending changes for the check-in is null, the server tries to check in all changes in the workspace. However, this operation is not valid if any pending changes in the workspace are edits or adds, because content will not have been uploaded to the server.