"Feature.xml"-Dateien

Letzte Änderung: Dienstag, 6. April 2010

Gilt für: SharePoint Foundation 2010

In einer Datei vom Typ Feature.xml definiert das Feature-Element ein Feature und gibt den Speicherort der Assemblys, Dateien, Abhängigkeiten und Eigenschaften an, die das Feature unterstützen.

Feature

  ActivationDependencies

    ActivationDependency

  ElementManifests

    ElementFile

    ElementManifest

  Properties

    Property

  UpgradeActions-Element (Feature)

    AddContentTypeField-Element (Feature)

    ApplyElementManifests-Element (Feature)

      ElementFile-Element (Feature)

      ElementManifest-Element (Feature)

    CustomUpgradeAction-Element (Feature)

      Parameters-Element (Feature)

        Parameter-Element (Feature)

    MapFile-Element (Feature)

    VersionRange-Element (Feature)

      AddContentTypeField-Element (Feature)

      ApplyElementManifests-Element (Feature)

      CustomUpgradeAction-Element (Feature)

      MapFile-Element (Feature)

Informationen zum Erstellen und Implementieren von Feature.xml-Dateien finden Sie unter Verwenden von Features. Informationen zum Upgrade von Features finden Sie unter Aktualisieren von Features.

Beispiel

Im folgenden Beispiel wird veranschaulicht, wie mithilfe einer Datei vom Typ Feature.xml Aktivierungsabhängigkeiten, Spezialfelder und relative Pfade zu Elementdefinitionsdateien angegeben werden.

<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>

Siehe auch

Konzepte

Verwenden von Features