ElementFile Element (Feature)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Specifies a support file required for the Feature.

Definition

<ElementFile
  Location = "Text">
</ElementFile>

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

**Location**

Required **Text**. Specifies the relative file path to a support file for the Feature, for example, `"controls\searcharea.xml"`.

Child elements

None

Parent elements

ElementManifests

Occurrences

Minimum: 0

Maximum: Unbounded

Example

In the following example, the ElementFile element is used to deploy language resources used to localize a Feature.

    <Feature xmlns="http://schemas.microsoft.com/sharepoint/"
      Id="4f670c98-0b81-41e0-8793-ab4325c57938"
      Title="$Resources:WeeklyStatusListFeature"
      Description="$Resources:WeeklyStatusListFeatureDesc"
      Scope="Web">
      <ActivationDependencies>
        <ActivationDependency FeatureId="e874ff63-dd9b-49ec-a96e-6e4ba163838e"
           FeatureDescription="$Resources:WeeklyStatusReportFeatureDesc"
           FeatureTitle="$Resources:WeeklyStatusReportFeature" />
      </ActivationDependencies>
      <ElementManifests>
        <ElementManifest Location="ListInstance1\Elements.xml" />
        <ElementManifest Location="Resources\Elements.xml" />
        <ElementFile Location="Resources\Resources.resx" />
        <ElementFile Location="Resources\Resources.es-es.resx" />
        <ElementFile Location="Resources\Resources.en-us.resx" />
      </ElementManifests>
    </Feature>