包/扩展) (Windows 10) 中的扩展 (

声明包的扩展点。

元素层次结构

<包>

    <扩展>

         <扩展>

语法

<Extension
  Category = 'A string that can have one of the following values: "windows.activatableClass.inProcessServer", "windows.activatableClass.outOfProcessServer", "windows.activatableClass.proxyStub", "windows.certificates", "windows.publisherCacheFolders", "windows.comInterface", or "windows.loaderSearchPathOverride".'
  uap10:TrustLevel = 'An optional string that can have one of the following values: "appContainer" or "mediumIL".'
  uap10:RuntimeBehavior = 'An optional string that can have one of the following values: "windowsApp", "packagedClassicApp", or "win32App".'
  uap10:HostId = 'An alphanumeric string with a value between 1 and 255 characters in length. Must begin with a letter.'
  uap10:Parameters = 'An optional string with a value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end.' 
  uap11:Id = 'An optional string with a value between 1 and 255 characters in length with a non-whitespace character at its beginning and end.'
  uap11:Subsystem = 'An optional string that can have one of the following values: "console" or "windows".'
  uap11:SupportsMultipleInstances = 'An optional boolean value.'
  uap11:ResourceGroup = 'An optional alphanumeric string with a value between 1 and 255 characters in length. Must begin with a letter.'
  uap11:CurrentDirectoryPath = 'An optional string that cannot contain these characters: <, >, |, ?, or *. >'
  uap11:Parameters = 'An optional string with a value between 1 and 32767 characters in length with a non-whitespace character at its beginning and end.'
  desktop7:CompatMode = 'An optional string the can have one of the following values: "classic" or "modern".'
  desktop7:Scope = 'An optional string that can have one of the following values: "machine" or "user".'>

  <!-- Child elements -->
  InProcessServer
  OutOfProcessServer
  ProxyStub
  Certificates
  PublisherCacheFolders
  com:ComInterface
  uap6:LoaderSearchPathOverride

</Extension>

特性和元素

属性

属性 说明 数据类型 必须 默认值
类别 包扩展点的类型。 可以具有以下值之一的字符串: windows.activatableClass.inProcessServerwindows.activatableClass.outOfProcessServerwindows.activatableClass.proxyStubwindows.certificateswindows.publisherCacheFolderswindows.comInterfacewindows.loaderSearchPathOverride
uap10:TrustLevel 指定扩展的信任级别。 可具有以下值之一的可选字符串: appContainermediumIL
uap10:RuntimeBehavior 指定扩展的运行时行为。 可具有以下值之一的可选字符串: windowsApppackagedClassicAppwin32App
uap10:HostId 此值指定扩展的主机运行时的 ID。 值长度介于 1 到 255 个字符之间的字母数字字符串。 必须以字母开头。
uap10:Parameters 包含扩展的命令行参数。 长度介于 1 到 32767 个字符之间的字符串,开头和结尾处有一个非空格字符。
uap11:Id 扩展的标识符。 对于包中的所有扩展,ID 必须是唯一的。 值长度介于 1 到 255 个字符之间的可选字符串,开头和结尾处有一个非空格字符。
uap11:Subsystem 此属性继承自基本扩展语法,不适用于 com4 扩展。 除语法验证外,此值将被忽略。 可具有以下值之一的可选字符串: consolewindows
uap11:SupportsMultipleInstances 指定实例是否应在不同的进程中运行。 默认值为 false。 可选的布尔值。
uap11:ResourceGroup 一个标记,可用于将扩展激活组合在一起以进行资源管理, (例如 CPU 和内存) 。 可以设置的 ResourceGroup 值是自由格式且灵活的。 请参阅 Application@ResourceGroup 值长度介于 1 到 255 个字符之间的可选字母数字字符串。 必须以字母开头。
uap11:CurrentDirectoryPath 指定启动应用程序进程时的初始目录。 此属性支持宏。 有关详细信息,请参阅 包清单架构中的宏 不能包含以下字符的可选字符串: <>|?*。 >
uap11:Parameters 此属性继承自基本扩展语法,不适用于 com4 扩展。 除语法验证外,此值将被忽略。 此属性支持宏。 有关详细信息,请参阅 包清单架构中的宏 一个可选字符串,其值长度介于 1 到 32767 个字符之间,开头和结尾处有一个非空格字符。
desktop7:CompatMode 指定此扩展的信息是通过经典方式向 Windows 注册的, (例如,未打包的应用通过注册表) 或通过新的范围更广的方式向 COM 注册类型。 默认值为“modern”。 CompatMode=“classic”需要 Microsoft.classicAppCompat_8wekyb3d8bbwe 功能。 可选字符串 可以具有以下值之一: classicmodern
desktop7:Scope 指定注册是否仅对以用户 (用户) 注册此包的用户运行的其他应用程序可见,或者是否对计算机上的所有用户和服务可见 (计算机) 。 默认值为“user”。 Scope=“machine”需要 Microsoft.classicAppCompatElevated_8wekyb3d8bbwe 功能。 可具有以下值之一的可选字符串: machineuser

子元素

子元素 说明
Certificates 声明 windows.certificates 类型的包扩展点。 应用需要指定证书存储中的一个或多个证书。
InProcessServer 声明 类型为 windows.activatableClass.inProcessServer 的包扩展点。 应用使用动态链接库 (.dll) 公开一个或多个可激活类。
OutOfProcessServer 声明 类型为 windows.activableClass.outOfProcessServer 的包扩展点。 应用使用可公开一个或多个可激活类的可执行 .exe () 。
ProxyStub 声明 类型为 windows.activatableClass.proxyStub 的包扩展点。 代理可以由一个或多个接口组成。
PublisherCacheFolders 声明 类型为 windows.publisherCacheFolders 的包扩展点。 这指定包与同一发布者中的其他包共享的一个或多个文件夹。
com:ComInterface 声明 类型为 windows.comInterface 的包扩展点。
uap6:LoaderSearchPathOverride 声明 类型为 windows.loaderSearchPathOverride 的包扩展点。

父元素

父元素 描述
扩展 (类型:CT_PackageExtensions) 定义包的一个或多个扩展点。

以下元素的名称与此元素相同,但内容或属性不同:

注解

扩展点是一种机制,包可以通过该机制以操作系统定义的方式添加功能。 扩展点是应用可以注册以执行代码或使用当前包的资源的位置。 若要为特定应用添加功能,请使用 Applications 元素的 Application 子元素。

无法在清单中多次声明 windows.certificates 扩展点。

另请参阅

要求

Namespace http://schemas.microsoft.com/appx/manifest/foundation/windows10
Com http://schemas.microsoft.com/appx/manifest/com/windows10
uap6 http://schemas.microsoft.com/appx/manifest/uap/windows10/10