編輯

共用方式為


FeatureDefinition complexType

(AppHostWebFeatures)

Note

The string app appears as part of or all of some element, attribute, and file names because SharePoint Add-ins were originally called "apps for SharePoint." To ensure backward compatibility, the schemas have not been changed.

Type information

Information Location
Namespace http://schemas.microsoft.com/sharepoint/
Schema file apphostwebfeatures.xsd
Extension base None

Definition

    <xs:complexType name="FeatureDefinition">
        <xs:all>
            <xs:element name="ElementManifests" type="ElementManifestReferences" minOccurs="0" maxOccurs="1"></xs:element>
            <xs:element name="Properties" type="FeaturePropertyDefinitions" minOccurs="0" maxOccurs="1"></xs:element>
            <xs:element name="ActivationDependencies" type="FeatureActivationDependencyDefinitions" minOccurs="0" maxOccurs="1"></xs:element>
            <xs:element name="UpgradeActions" type="UpgradeActionsDefinition" minOccurs="0" maxOccurs="1"></xs:element>
        </xs:all>
        <xs:attribute name="Id" type="UniqueIdentifier" use="required" />
        <xs:attribute name="Title" type="LocalizableString" />
        <xs:attribute name="Description" type="LocalizableString" />
        <xs:attribute name="Version" type="FeatureVersion" />
        <xs:attribute name="Scope" type="FeatureScope" use="required" />
        <xs:attribute name="ReceiverAssembly" type="AssemblyStrongName" />
        <xs:attribute name="ReceiverClass" type="AssemblyClass" />
        <xs:attribute name="Creator" type="LocalizableString" />
        <xs:attribute name="DefaultResourceFile" type="xs:string" />
        <xs:attribute name="Hidden" type="TRUEFALSE" />
        <xs:attribute name="SolutionId" type="UniqueIdentifier" />
        <xs:attribute name="ActivateOnDefault" type="TRUEFALSE" />
        <xs:attribute name="AutoActivateInCentralAdmin" type="TRUEFALSE" />
        <xs:attribute name="AlwaysForceInstall" type="TRUEFALSE" />
        <xs:attribute name="RequireResources" type="TRUEFALSE" />
        <xs:attribute name="ImageUrl" type="RelativeFilePath" use="optional" />
        <xs:attribute name="ImageUrlAltText" type="LocalizableString" use="optional" />
        <xs:attribute name="UIVersion" type="UIVersion" />
    </xs:complexType>

Elements and attributes

If the schema defines specific requirements, such as sequence, minOccurs, maxOccurs, and choice, see the definition section.

Child elements

Element

Type

Description

ActivationDependencies

FeatureActivationDependencyDefinitions

ElementManifests

ElementManifestReferences

Properties

FeaturePropertyDefinitions

UpgradeActions

UpgradeActionsDefinition


Attributes

Attribute

Type

Required

Description

Possible values

ActivateOnDefault

TRUEFALSE

optional

Values of the TRUEFALSE type.

AlwaysForceInstall

TRUEFALSE

optional

Values of the TRUEFALSE type.

AutoActivateInCentralAdmin

TRUEFALSE

optional

Values of the TRUEFALSE type.

Creator

LocalizableString

optional

Values of the LocalizableString type.

DefaultResourceFile

xs:string

optional

Values of the xs:string type.

Description

LocalizableString

optional

Values of the LocalizableString type.

Hidden

TRUEFALSE

optional

Values of the TRUEFALSE type.

Id

UniqueIdentifier

required

Values of the UniqueIdentifier type.

ImageUrl

RelativeFilePath

optional

Values of the RelativeFilePath type.

ImageUrlAltText

LocalizableString

optional

Values of the LocalizableString type.

ReceiverAssembly

AssemblyStrongName

optional

Values of the AssemblyStrongName type.

ReceiverClass

AssemblyClass

optional

Values of the AssemblyClass type.

RequireResources

TRUEFALSE

optional

Values of the TRUEFALSE type.

Scope

FeatureScope

required

Values of the FeatureScope type.

SolutionId

UniqueIdentifier

optional

Values of the UniqueIdentifier type.

Title

LocalizableString

optional

Values of the LocalizableString type.

UIVersion

UIVersion

optional

Values of the UIVersion type.

Version

FeatureVersion

optional

Values of the FeatureVersion type.