msbuild:构建为一个appxbundle(AppxBundle =始终不起作用) [英] msbuild: build as to a appxbundle (AppxBundle=Always not working)

查看:256
本文介绍了msbuild:构建为一个appxbundle(AppxBundle =始终不起作用)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个共享的Windows8.1项目,其中有一个Phone and Desktop项目.我定义了不同的配置来构建用于台式机的x86/x64和用于电话的ARM.

I have a shared Windows8.1 project with a Phone and Desktop project in it. I defined different configurations to build x86/x64 for desktop and ARM for phone.

msbuild可以正常工作,没有错误,但是尽管我设置了参数 AppxBundle = Always ,但输出文件夹(或其他位置)上没有最终的* .appxbundle文件.

msbuild works fine without error, but there is no final *.appxbundle file on the output folder (or anywhere else) although i set the parameter AppxBundle=Always.

我的命令如下:

msbuild myApp.sln/p:OutputPath =%OUTPATH%; Configuration = Phone; Platform = ARM; AppxBundle = Always; AppxBundlePlatforms = ARM /t:重建,发布

msbuild myApp.sln /p:OutputPath=%OUTPATH%;Configuration=Phone;Platform=ARM;AppxBundle=Always;AppxBundlePlatforms=ARM /t:Rebuild,Publish

输出为:

OUTPATH
├── ForBundle
│   └── AppxManifest.xml
├── AppxManifest.xml
├── App.WindowsPhone.build.appxrecipe
├── App.WindowsPhone_3.2.1_ARM.appx
├── App.WindowsPhone_3.2.1_scale-100.appx
├── App.WindowsPhone_3.2.1_scale-140.appx
├── App.WindowsPhone_3.2.1_scale-180.appx
├── resources.pri
└── SomeDependency.winmd

我尝试用makeappx.exe捆绑包打包此文件夹,但这没有用,我意识到该文件夹​​看上去与appxbundle中的文件夹有点不同.

I tried to pack this folder with makeappx.exe bundle but this didn't work and I realized the folder looks a bit different to what is into a appxbundle.

通过VS GUI创建appxbundle没问题,但是我想使这一步骤自动化!

Creating a appxbundle via VS GUI is no problem, but I would like to automate that step!

提前谢谢!

推荐答案

Microsoft.AppXPackage.Targets中有一个提示注释:

在命令行或TFS中构建时(通过查看$(BuildingInsideVisualStudio)属性确定),如果build为 调用于 应用程序包生产项目,则该项目的软件包将作为构建项目的一部分而生产,而无需指定 任何其他 标志或目标.这是由一个名为GenerateAppxPackageOnBuild的MSBuild属性控制的,默认情况下该属性设置为true.

When building on the command line or in TFS (determined by looking at the $(BuildingInsideVisualStudio) property), if build is invoked on an app package-producing project, the package for the project will be produced as part of building the project without specifying any additional flags or targets. This is control by an MSBuild property named GenerateAppxPackageOnBuild which is set to true by default.

如果$(BuildingInsideVisualStudio)= false和$(GenerateAppxPackageOnBuild)= true,则build也将产生一个 包裹. 真的

If $(BuildingInsideVisualStudio) = false and $(GenerateAppxPackageOnBuild) = true, then build will also produce a package. true

这篇关于msbuild:构建为一个appxbundle(AppxBundle =始终不起作用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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