【问题标题】:How to package a HTML/Metro App for deployment outside Visual Studio 2012如何打包 HTML/Metro 应用程序以在 Visual Studio 2012 之外部署
【发布时间】:2012-06-22 13:24:26
【问题描述】:

有谁知道如何打包应用程序以在 Visual Studio 之外部署 HTML/JS Metro 应用程序。我一直听到对“商店”菜单项的引用,但我使用的是 Visual Studio 2012 RC 终极版,并且没有这样的顶级菜单项。

我还尝试使用命令行工具和给定的清单文件(在构建中自动构建的文件)来创建 appx 文件,但在打包结束时会收到一些深奥的错误消息。

更新:命令行错误信息

MakeAppx pack /d  .\Release\AppX /p generic.AppX
The package path (/p) parameter is: "generic.AppX"
The content directory (/d) parameter is: ".\Release\AppX"
Enumerating files from directory ".\Release\AppX"
Packing 52 file(s) in ".\Release\AppX" (content directory) to "generic.AppX" (p    ackage name).
Using ".\Release\AppX\AppxManifest.xml" as the manifest for the package.
Adding ".\Release\AppX\images\splashscreen.png" to the package as a payload file.  Its path in the package is "images\splashscreen.png".
Adding ".\Release\AppX\images\logo.png" to the package as a payload file.  Its path in the package is "images\logo.png".
Adding ".\Release\AppX\images\smalllogo.png" to the package as a payload file.  Its path in the package is "images\smalllogo.png".
Adding ".\Release\AppX\images\storelogo.png" to the package as a payload file.  Its path in the package is "images\storelogo.png".
.........{Cut for brevity's sake}.........
MakeAppx : error: Package creation failed.
MakeAppx : error: 0x8007007b - The filename, directory name, or volume label syntax is incorrect.

更新:想通了(有点)!

我不知道发生了什么,但我创建了一个空白的 XAML/C# Metro 应用程序。当您右键单击该项目时,您将获得一个 Store 选项。它仍然没有出现在我的 HTML/JS Metro 应用程序项目中,所以我创建了一个干净的 HTML/JS Metro 项目……它就是一个“存储”选项。

所以我再次打开我当前的非工作项目,右键单击该项目,然后出现“存储”选项。我不知道这是否是 2012 年的 RC 错误,但我会在这里留下这个问题,以防其他人遇到这个问题。

【问题讨论】:

    标签: html microsoft-metro visual-studio-2012 winjs


    【解决方案1】:

    它在“项目”菜单下。

    就像你说的,这可能是一个错误。 VS2012 目前仍有 bug。

    【讨论】:

      【解决方案2】:

      我也遇到了这个问题,不知道原因,但是文件映射对我有用,请尝试调用:

      makeappx pack /v /o /f mappingfile.txt /p yourapp.appx
      

      mappingfile.txt 的内容:

      [Files]
      "App.xaml"                                                  "App.xaml"
      "AppxManifest.xml"                                          "AppxManifest.xml"
      "folder\file.ext"                                           "folder\file.ext"
      "***.***"                                                   "***.***"
      

      【讨论】:

        猜你喜欢
        • 2013-07-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-05-13
        • 2014-06-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多