【问题标题】:Getting am error in Appmanifest.xml file while build构建时 Appmanifest.xml 文件中出现错误
【发布时间】:2014-04-23 18:59:24
【问题描述】:

我正在将统一游戏移植到 Windows 商店游戏中,因此当我在 Windows 8.1 平台上从 Visual Studio 2013 构建统一构建解决方案时,我从 unity4.2.2 生成了 Windows 商店构建(将解决方案重新定位到 8.1)我收到错误在 AppManifest.xml 中的以下行

    <?xml version="1.0" encoding="utf-8"?>
    <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest"    xmlns:build="http://schemas.microsoft.com/developer/appx/2012/build" IgnorableNamespaces="build">

  <Identity Name="FIR_gameA2" Publisher="CN=circ" Version="1.0.0.0"ProcessorArchitecture="arm" />
     <Properties>
    <DisplayName>SHOOT</DisplayName>
      <PublisherDisplayName>circ</PublisherDisplayName>
     <Logo>Assets\StoreLogo.png</Logo>
     </Properties>

以下是我收到的错误和警告

错误 1 ​​文件内容不符合指定的架构。名字' 属性无效 - 值“FIR_gameA2”无效,根据 它的数据类型 'http://schemas.microsoft.com/appx/2010/manifest:ST_PackageName' - 的 模式约束失败。 E:\Windows 游戏商店\firshootXAMLC#\SAB 嘉射\bin\ARM\Debug\AppxManifest.xml 10 13 SAB 嘉射 警告 2 “名称”属性无效 - 值“FIR_gameA2”为 根据其数据类型无效 'http://schemas.microsoft.com/appx/2010/manifest:ST_PackageName' - 的 模式约束失败。 E:\Windows 游戏商店\firshootXAMLC#\SAB Ka Shoot\bin\ARM\Debug\AppxManifest.xml 10 19 其他文件 警告 3 命名空间中的元素“包” 'http://schemas.microsoft.com/appx/2010/manifest' 有无效的孩子 命名空间中的元素“元数据” 'http://schemas.microsoft.com/developer/appx/2012/build'。 E:\Windows 游戏商店\firshootXAMLC#\SAB Ka Shoot\bin\ARM\Debug\AppxManifest.xml 71 4个杂项文件

【问题讨论】:

  • 您是否尝试过从Name="FIR_gameA2"** 中的&lt;Identity /&gt; 中删除**
  • ** 是格式化的一部分...它不在我的代码中
  • 但是为什么它在双引号之外?
  • 我已经编辑了代码......这是实际的代码。
  • 去掉**后尝试编译。

标签: c# xml visual-studio windows-store-apps


【解决方案1】:

根据Identity 上的Package manifest schema reference 条目:

姓名

 string between 3 and 50 characters in length that consists of alpha-numeric, period, and dash characters.

备注

Important  

For the Name and ResourceID strings, the following rules must be followed:

Allowed Input Characters = ASCII subset
    Uppercase letters (U+0041 thru U+005A)
    Lowercase letters (U+0061 thru U+007A)
    Numbers (U+0030 thru U+0039)
    Dot (U+002E)
    Dash (U+002D)
Prohibited Strings
    Cannot equal…
        ".", "..", "con", "prn", "aux", "nul", "com1", "com2", "com3", "com4", "com5", "com6", "com7", "com8", "com9", "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9"
    Cannot begin with…
        "con.", "prn.", "aux.", "nul.", "com1.", "com2.", "com3.", "com4.", "com5.", "com6.", "com7.", "com8.", "com9.", "lpt1.", "lpt2.", "lpt3.", "lpt4.", "lpt5.", "lpt6.", "lpt7.", "lpt8.", "lpt9.", "xn--"
    Cannot end with…
        "."
    Cannot contain…
        ".xn--"

您的Name 包含“下划线”字符_ (U+005F),它不是有效字符。删除它,可能用 Dash - 或 Dot. 替换它。

希望这对编码有所帮助!

【讨论】:

  • 但现在我收到平台错误错误 1 ​​错误:DEP0700:应用程序注册失败。 Windows 无法安装软件包 FIRgameA2,因为该软件包需要架构 ARM,但此计算机具有架构 x64。 (0x80073cf3)
  • 当我使用 x64 架构类型构建时,出现 3 个错误,错误 6 找不到类型或命名空间名称“UnityPlayer”(您是否缺少 using 指令或程序集引用?)错误7 找不到类型或命名空间名称“WinRTBridge”(您是否缺少 using 指令或程序集引用?) E:\Windows Games Store\shoot d3lc c#\Shoot\App.cs 17 11 Shoot Error 8 类型或找不到命名空间名称“AppCallbacks”(您是否缺少 using 指令或程序集引用?
  • 很好,关于应用程序的实际内容而不是包装(清单)会出现不同的错误。不过,您可以就这些问题提出新问题。
  • 它解决了我安装了 unity 4.3.4 并用它重新构建(d3dc++)它工作正常!!!
猜你喜欢
  • 2020-04-26
  • 1970-01-01
  • 2018-07-24
  • 1970-01-01
  • 2020-08-23
  • 2018-08-13
  • 2017-03-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多