繁体   English   中英

TFS 版本控制项扩展

[英]TFS Version Control Item extensions

是否可以使用自定义字段或属性扩展 TFS 版本控制项? 找到的大多数条目都与 TFS 工作项上的自定义属性有关。

我想使用一组包含记录的 db/table/primary 键的自定义属性,将版本控制项链接到数据库中的记录。

谢谢, 赖恩

Team Foundation Server 2010 引入了一项名为“属性”的新功能。 TFS 中的几乎每个项目,无论是版本控制文件/分支,还是工作项目都可以有一个与之关联的属性包。

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.

有关详细信息,请参阅以下链接:

通过将属性值设置为 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);
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM