Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
316 lines (267 sloc) 9.97 KB
Description Search.Product title ms.assetid author ms.author keywords ms.prod ms.technology ms.topic ms.date
Declares an extensibility point for the app.
eADQiWindows 10XVcnh
Extension (in type: CT_ApplicationExtensions)
e25d664a-67e8-4a22-a666-1b11286b58f3
laurenhughes
lahugh
windows 10, uwp, schema, package manifest
windows
winrt-reference
reference
04/05/2017

Extension (in type: CT_ApplicationExtensions)

Declares an extensibility point for the app.

Element hierarchy

<Package>
<Applications>
<Application>
<Extensions>
<Extension>

Syntax

<Extension Category     = "windows.fileTypeAssociation" | "windows.protocol" | "windows.autoPlayContent" | "windows.autoPlayDevice" | "windows.shareTarget" | ...
           Executable?  = A string between 1 and 256 characters in length that must end with ".exe" and cannot contain these characters: <, >, :, %, ", |, ?, or *. It specifies the default executable for the extension. If not specified, the executable defined for the app is used.  If specified, the EntryPoint property is also used. If that EntryPoint property isn't specified, the EntryPoint defined for the app is used.
           EntryPoint?  = A string between 1 and 256 characters in length, representing the task  handling the extension. This is normally the fully namespace-qualified name of a Windows Runtime type.
If EntryPoint is not specified, the EntryPoint defined for the app is used instead.

           RuntimeType? = A string between 1 and 255 characters in length that cannot start or end with a period or contain these characters: <, >, :, %, ", /, \, |, ?, or *.
           StartPage?   = A string between 1 and 256 characters in length that cannot contain these characters: <, >, :, %, ", |, ?, or *. >

  <!-- Child elements -->
  ( FileTypeAssociation
  | Protocol
  | AutoPlayContent
  | AutoPlayDevice
  | ShareTarget
  | FileOpenPicker
  | FileSavePicker
  | BackgroundTasks
  )?

</Extension>

Key

?   optional (zero or one)

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
Category

The type of app extensibility point.

This attribute can have one of the following values:

  • windows.fileTypeAssociation
  • windows.protocol
  • windows.autoPlayContent
  • windows.autoPlayDevice
  • windows.shareTarget
  • windows.search
  • windows.fileOpenPicker
  • windows.fileSavePicker
  • windows.cachedFileUpdater
  • windows.contactPicker
  • windows.backgroundTasks
  • windows.cameraSettings
  • windows.accountPictureProvider
  • windows.printTaskSettings
Yes
EntryPoint

The activatable class ID.

A string between 1 and 256 characters in length, representing the task handling the extension. This is normally the fully namespace-qualified name of a Windows Runtime type. If EntryPoint is not specified, the EntryPoint defined for the app is used instead. No
Executable

The default launch executable.

A string between 1 and 256 characters in length that must end with ".exe" and cannot contain these characters: <, >, :, %, ", |, ?, or *. It specifies the default executable for the extension. If not specified, the executable defined for the app is used. If specified, the EntryPoint property is also used. If that EntryPoint property isn't specified, the EntryPoint defined for the app is used. No
RuntimeType

The runtime provider. This attribute is used typically when there are mixed frameworks in an app.

A string between 1 and 255 characters in length that cannot start or end with a period or contain these characters: <, >, :, %, ", /, \, |, ?, or *. No
StartPage

The web page that handles the extensibility point.

A string between 1 and 256 characters in length that cannot contain these characters: <, >, :, %, ", |, ?, or *. No

 

Child Elements

Child Element Description
[AutoPlayContent](element-autoplaycontent.md)

Declares an app extensibility point of type windows.autoPlayContent. The app provides the specified AutoPlay content actions.

[AutoPlayDevice](element-autoplaydevice.md)

Declares an app extensibility point of type windows.autoPlayDevice. The app provides the specified AutoPlay device actions.

[BackgroundTasks](element-backgroundtasks.md)

Defines an app extensibility point of type windows.backgroundTasks. Background tasks run in a dedicated background host; that is, without a UI.

[FileOpenPicker](element-fileopenpicker.md)

Declares an app extensibility point of type windows.fileOpenPicker. The app lets the user choose and open the specified types of files.

[FileSavePicker](element-filesavepicker.md)

Declares an app extensibility point of type windows.fileSavePicker. The app lets the user choose the file name, extension, and storage location for the specified types of files.

[FileTypeAssociation](element-filetypeassociation.md)

Declares an app extensibility point of type windows.fileTypeAssociation. A file type association indicates that the app is registered to handle files of the specified types.

[Protocol](element-protocol.md)

Declares an app extensibility point of type windows.protocol. A URI association indicates that the app is registered to handle URIs with the specified scheme.

[ShareTarget](element-sharetarget.md)

Declares an app extension point of type windows.shareTarget. The app can share the specified types of files.

 

Parent Elements

Parent Element Description
[Extensions (type: CT_ApplicationExtensions)](element-1-extensions.md)

Defines one or more extensibility points for the app.

 

Related elements

The following elements have the same name as this one, but different content or attributes:

Remarks

These extensibility points can be declared only once per app:

  • windows.accountPictureProvider
  • windows.cachedFileUpdater
  • windows.cameraSettings
  • windows.contactPicker
  • windows.fileOpenPicker
  • windows.fileSavePicker
  • windows.printTaskSettings
  • windows.search
  • windows.shareTarget

**Note about semantic rules for extensions:  **For any Extension element the following semantic rules are enforced in the manifest API:

If /Application/@StartPage specified, it is a Windows app using JavaScript and the App Extension :

  • Can be empty
  • Can specify just the StartPage
  • Can specify both Executable and EntryPoint (optional RuntimeType allowed), unless it is a BackgroundTask extension, in which case it can omit the Executable and default to the BackgroundTaskHost.exe executable.

If /Application/@StartPage is not specified, it is a Windows Store app using C# or VB and XAML and the App Extension :

  • Can be empty
  • Can specify just the StartPage
  • Must specify EntryPoint if either Executable or RuntimeType is specified.

Examples

The following example is taken from the package manifest of one of the SDK samples.

<Applications>
  <Application Id="App" StartPage="default.html">
    <VisualElements DisplayName="Assocation launching sample" 
         Logo="images\squareTile-sdk.png" SmallLogo="images\smallTile-sdk.png" 
         Description="SDK sample" 
         ForegroundText="dark" BackgroundColor="#FFFFFF" ToastCapable="false">
      <DefaultTile ShowName="allLogos" />
      <SplashScreen BackgroundColor="white" Image="images\splash-sdk.png" />
    </VisualElements>
    <Extensions>
      <Extension Category="windows.fileTypeAssociation">
        <FileTypeAssociation Name=".alsdkjs">
          <SupportedFileTypes>
            <FileType>.alsdkjs</FileType>
          </SupportedFileTypes>
        </FileTypeAssociation>
      </Extension>
      <Extension Category="windows.protocol">
        <Protocol Name="alsdkjs" />
      </Extension>
    </Extensions>
  </Application>
</Applications>

See also

Concepts App contracts and extensions

Requirements

Namespace

http://schemas.microsoft.com/appx/2010/manifest