Rine le Comte
Rine le Comte

Reputation: 312

TFS Version Control Item extensions

is it possible to extend a TFS Version Control Item with custom fields or properties? Most entries found are about custom properties on TFS Work Items.

I want to keep a version control Item linked to a record in a database, using a set of custom properties that contain the db/table/primary key of the record.

Thanks, Rine

Upvotes: 0

Views: 646

Answers (2)

Delcho Milchev
Delcho Milchev

Reputation: 44

You delete a property by setting its value to null.

public static void DeleteGenericProperty( this IPropertyService propertyService, 
    string moniker, string propertyName, int version = 1 )
{
     var artifactSpec = new ArtifactSpec(ArtifactKinds.Generic, moniker, version);
     propertyService.SetProperty(artifactSpec, propertyName, (string) null);
}

Upvotes: 0

granth
granth

Reputation: 8939

Team Foundation Server 2010 introduced a new feature called 'Properties'. Almost every item in TFS, be it a version control file/branch, or a work item can have a property bag associated with it.

What is missing from TFS 2010, is a generic UI to view/set these properties, however you can use the TFS Object Model to view/set them yourself.

For more information, see the following links:

Upvotes: 1

Related Questions