在构建时获取Appmanifest.xml文件中的错误

时间:2014-03-18 08:06:42

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

我正在移植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   Ka Shoot \ bin \ ARM \ Debug \ AppxManifest.xml 10 13 SAB Ka Shoot   警告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其他文件

1 个答案:

答案 0 :(得分:1)

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

名称

 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),这不是有效字符。删除它,可能用短划线-或点.替换它。

希望这有助于编码!