使用指定的功能名称添加新功能。
命名空间: Microsoft.VisualStudio.SharePoint
程序集: Microsoft.VisualStudio.SharePoint(在 Microsoft.VisualStudio.SharePoint.dll 中)
语法
声明
Function Add ( _
featureName As String, _
skipAutoPackage As Boolean _
) As ISharePointProjectFeature
ISharePointProjectFeature Add(
string featureName,
bool skipAutoPackage
)
参数
- featureName
类型:System.String
功能名称。
- skipAutoPackage
类型:System.Boolean
为 true 时,不要向项目包中添加功能。
返回值
类型:Microsoft.VisualStudio.SharePoint.ISharePointProjectFeature
一个表示功能的对象。
异常
异常 | 条件 |
---|---|
CheckoutException | 项目或程序包文件无法签出时发生 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。