有人知道如何使用MSbuild工具自动化UWP与桌面桥接(桌面扩展)包的构建(.appxupload/.appxbundle)吗?我已经按照这篇博客中的设置进行了操作。
对于简单的UWP应用程序(没有桌面扩展),我可以使用以下命令完成此操作:
msbuild UWP.sln /p:Configuration=Release;AppxBundle=Always;AppxBundlePlatforms=”x86|x64|ARM”;UapAppxPackageBuildMode=StoreUpload
然而,当我在Package.wapproj
上尝试时,出现了许多错误。例如,虽然Package项目有一个证书,但UWP项目也需要一个(为什么?),即使我解决了这个问题,msbuild也需要从bin/Debug获取build.appxrecipe,尽管我正在构建发布版本等。
"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.
- xabre