AppxManifest (Cordova) 中 Identity 元素的发布者属性

Publisher attribute of the Identity element in AppxManifest (Cordova)

我正在尝试在 windows 商店上发布 windows phone cordova 应用程序。 我构建应用程序:

cordova build widows --release

上传时出现错误

Package acceptance validation error: The Publisher attribute of the Identity element in the app manifest of file CordovaApp.xxx.appx is CN=$username$, which doesn't match your publisher ID: CN=xxxxxxxxxxxxx.

我尝试将应用关联到定义下一行 config.xml:

  <preference name="windows-publisher-id" value="-appCN-" />

但仍然存在:

 <Identity Name="xxx" Publisher="CN=$username$" Version="1.0.0.0" ProcessorArchitecture="neutral" />

在 AppxManifest.xml 构建后。 如何指定 CN 值? (我没有使用 Visual Studio)

尝试更改 /platforms/windows/package 中 Identity 标签的 Publisher 属性。phone.appxmanifest

编辑: 现在有一个更好的解决方案(见下面 cadesalaberry 的回答)

根据https://cordova.apache.org/docs/en/dev/guide/platforms/win8/index.html#signing-an-app

您现在可以在 config.xml 旁边使用 build.json 文件,它看起来像这样:

 {
      "windows": {
          "release": {
              "packageCertificateKeyFile": "c:\path-to-key\keycert.pfx"
              "publisherId": "CN=xxxxxxxxxxxxxxxxxxxxxx"
          }
      }
  }