Visual Studio - 创建应用程序包 - 命令行 [英] Visual Studio - Create App Package - Command Line

查看:109
本文介绍了Visual Studio - 创建应用程序包 - 命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过命令使用Visual Studio创建应用程序包(供本地使用) 提示&NBSP?;我尝试过使用msbuild.exe和devenv.exe,但没有找到任何实际打包appx文件的命令。

Is it possible to create an app package (for local use) with Visual Studio through a command  prompt?  I have tried using msbuild.exe and devenv.exe and have not found any commands that actually package the appx file.

我知道我可以使用devenv.exe来构建解决方案命令提示符然后使用makeappx.exe来创建文件,但是当解决方案中有多个项目时,内容文件不会被放入主项目bin输出目录中,而在
中,appxrecipe文件的正确结构状态群组。简单地在输出目录上调用makeappx不会产生有效的文件。 "创建应用程序包"向导似乎正确地执行了。

I am aware that I can use devenv.exe to build a solution through command prompt and then use makeappx.exe to create the file, but when you have multiple projects in a solution the content files don't get placed into the primary project bin output dir in the proper structure that the appxrecipe file states.  Simply calling makeappx on the output directory does not result in a valid file. The 'Create App Package' wizard seems to do it correctly though.

我不明白为什么MakeAppx。 exe不接受传递appxrecipe文件的参数。 这似乎很合乎逻辑。

I don't understand why MakeAppx.exe doesn't accept a parameter to pass in the appxrecipe file.  That would seem very logical.

谢谢,

Jason Grimme

Jason Grimme

推荐答案

您好Jason,

Hi Jason,

您可以通过使用msbuild在项目上调用构建来在命令行上构建应用程序包.exe(例如MSbuild.exe foo.csproj)。在命令行上构建项目会自动生成应用程序包作为构建的一部分。在构建完成后,
您应该在输出位置看到一个名为AppPackages的文件夹,其中包含应用程序包。请注意,如果您在VS IDE中构建,则行为会略有不同。 在IDE中构建项目不会生成应用程序包。您
必须调用"创建应用程序包"用于构建应用程序包的向导。 

You can build an app package on the command line just by invoking build on the project using msbuild.exe (e.g. MSbuild.exe foo.csproj). Building the project on the command line automatically generates an app package as part of the build. Upon build completion, you should see a folder named AppPackages in the output location with the app package inside it. Note that the behavior is slightly different if you build in the VS IDE. Building the project in the IDE does not generate the app package. You have to invoke the "Create App Package" wizard to build an app package. 

Makeappx.exe是一个可用于构建应用程序包的不同工具。但是,此工具与Visual Studio不同,并且不使用appxrecipe文件状态,因为该文件仅由Visual Studio构建过程使用。
 

Makeappx.exe is a different tool that can be used to build an app package. However this tool is separate from Visual Studio and does not utilize the appxrecipe file states because that file is only used by the Visual Studio build process.  

谢谢,

Candy

Thanks,
Candy


这篇关于Visual Studio - 创建应用程序包 - 命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆