【发布时间】:2018-08-17 09:19:58
【问题描述】:
有谁知道如何使用 MSbuild 工具通过桌面桥(桌面扩展)包构建(.appxupload/.appxbundle)自动化 UWP?
我已经有了following blog 上的设置。
对于简单的 UWP 应用(没有桌面扩展),我可以使用以下命令:
msbuild UWP.sln /p:Configuration=Release;AppxBundle=Always;AppxBundlePlatforms=”x86|x64|ARM”;UapAppxPackageBuildMode=StoreUpload
但是,当我在 Package.wapproj 上尝试时,我遇到了一堆错误。
例如,虽然 Package 项目有证书,但 UWP 项目也需要一个证书(为什么?),当我解决这个问题时,msbuild 需要来自 bin/Debug 的 build.appxrecipe,尽管我正在构建 Release 等。
【问题讨论】:
-
请贴出错误信息。
-
@XavierXie-MSFT 我和 OP 有同样的问题,帮助更快地解决这个问题。我可以在仅使用 UWP 和打包项目的新解决方案上重现此问题,然后通过
"msbuild /p:Configuration=Release /p:Platform=x86"构建打包项目 --- 错误:C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(350,5): error : Could not find a recipe file for the referenced UWP application at '[..]\PackagingTest\PackagingTest.UWP\bin\Debug\PackagingTest.UWP. build.appxrecipe'. Please build the project.
标签: uwp msbuild build-automation