Поделиться через


Файлы Feature.xml

Дата последнего изменения: 6 апреля 2010 г.

Применимо к: SharePoint Foundation 2010

В файле Feature.xml элемент Feature определяет компонент и указывает расположение необходимых ему сборок, файлов, зависимостей или свойств.

Feature

  ActivationDependencies

    ActivationDependency

  ElementManifests

    ElementFile

    ElementManifest

  Properties

    Property

  Элемент UpgradeActions (компонент)

    Элемент AddContentTypeField (Feature)

    Элемент ApplyElementManifests (Feature)

      Элемент ElementFile (Feature)

      Элемент ElementManifest (Feature)

    Элемент CustomUpgradeAction (Feature)

      Элемент Parameters (Feature)

        Элемент Parameter (Feature)

    Элемент MapFile (Feature)

    Элемент VersionRange (Feature)

      Элемент AddContentTypeField (Feature)

      Элемент ApplyElementManifests (Feature)

      Элемент CustomUpgradeAction (Feature)

      Элемент MapFile (Feature)

Сведения о создании и внедрении файлов Feature.xml см. в разделе Использование компонентов. Сведения об обновлении компонента см. в разделе Обновление компонентов.

Пример

В следующем примере показано использование файла Feature.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>

См. также

Концепции

Использование компонентов