Can msbuild create an .appxbundle for multiple platforms?

夙愿已清 提交于 2019-12-10 16:48:34

问题


I'm trying to build an .appxbundle for my Windows 10 UWP Store app using msbuild that contains x86, x64, and ARM platforms. I can do this from VS2015 RTM using the Create App Pacakges wizard, but I get errors when I use msbuild. Any idea what I'm doing wrong?

My command line:

msbuild HelloWorld.csproj /p:Configuration=Release;AppxBundle=Always

Errors I'm getting:

"E:\TestApps\HelloWorld.csproj" (default target) (1) ->
(_CreateBundle target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(3631,5): error MSB3030: Could not copy the file "E:\TestApps\bin\x64\Release\HelloWorld_1.0.4.0_x64.appx" because it was not found. [E:\TestApps\HelloWorld.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(3631,5): error MSB3030: Could not copy the file "E:\TestApps\bin\ARM\Release\HelloWorld_1.0.4.0_ARM.appx" because it was not found. [E:\TestApps\HelloWorld.csproj]

Thanks, C


回答1:


Try to specify AppxBundlePlatforms parameter in your project file, something like: <AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>.

This should work with VS2015.




回答2:


This answer worked for me. I copy it here for not just leaving the link-only answer.

MSBuild mysolution.sln  /p:Configuration=Release;AppxBundle=Always;AppxBundlePlatforms="x86|x64|ARM"


来源:https://stackoverflow.com/questions/32469750/can-msbuild-create-an-appxbundle-for-multiple-platforms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!