Feature.xml Files

In a Feature.xml file, the Feature element defines a Feature and specifies the location of assemblies, files, dependencies, or properties that support the Feature.

Feature

  ActivationDependencies

    ActivationDependency

  ElementManifests

    ElementFile

    ElementManifest

  Properties

    Property

For information about where to create and how to implement Feature.xml files, see Working with Features.

Example

The following example shows how to use a Feature.xml file to specify activation dependencies, special fields, and relative paths to element definition files.

Xml
<Feature 
  Id="11111111-1111-1111-1111-11111111111" 
  Title="Location Services"
  Description="This Feature contains lists and parts that let you link location data to your customer lists."
  Scope="Web">
  <ActivationDependencies>
    <ActivationDependency
      FeatureId="11111111-1111-1111-1111-111111111111" />
  </ActivationDependencies>
  <ElementManifests>
    <ElementManifest 
      Location="Location\LocationPart.xml"/>
    <ElementManifest 
      Location="CustomerLocation\CustomerLocationList.xml"/>
    <ElementFile 
      Location="test.aspx"/>
  </ElementManifests>
  <Properties>
    <Property
      Key="Color"
      Value="Blue"/>
    <Property
      Key="Shape"
      Value="Triangle"/>
  </Properties> 
</Feature>

See Also

Tags : feature


Community Content

Serge Luca [MVP]
retrieving the feature property when the feature is activated

public class MyFeatureReceiver : SPFeatureReceiver
{
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPFeatureProperty prop = properties.Feature.Properties["Color"];

//prop.Value

}

//Serge Luca


Page view tracker