Share via


SPFarm.GetFeatureDefinitionsByVersion method

Get the feature definition collection for the specified compatibility level.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function GetFeatureDefinitionsByVersion ( _
    compatibilityLevel As Integer _
) As List(Of SPFeatureDefinition)
'Usage
Dim instance As SPFarm
Dim compatibilityLevel As Integer
Dim returnValue As List(Of SPFeatureDefinition)

returnValue = instance.GetFeatureDefinitionsByVersion(compatibilityLevel)
public List<SPFeatureDefinition> GetFeatureDefinitionsByVersion(
    int compatibilityLevel
)

Parameters

Return value

Type: System.Collections.Generic.List<SPFeatureDefinition>
A list of SPFeatureDefintion objects of the given compatibility level that currently installed in the farm.

Remarks

It will return the features at the specified compatibility level if presented; otherwise, it will fallback to the previous compatibility level(s) based on the same feature id. For example: if we have feat1 for 14 and 15, feat 2 for 14 and feat3 for 15, GetFeatureDefinitions(15) will return (feat1, feat2, feat3); GetFeatureDefinitions(14) will return (feat1, feat2)

See also

Reference

SPFarm class

SPFarm members

Microsoft.SharePoint.Administration namespace