msbuild可以为多个平台创建一个.appxbundle吗?

时间:2015-09-09 01:52:39

标签: visual-studio msbuild windows-store-apps windows-10 appx

我正在尝试使用包含x86,x64和ARM平台的msbuild为我的Windows 10 UWP商店应用构建.appxbundle。我可以使用Create App Pacakges向导从VS2015 RTM执行此操作,但是当我使用msbuild时出现错误。知道我做错了吗?

我的命令行:

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

我得到的错误:

"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]

谢谢, ç

2 个答案:

答案 0 :(得分:3)

尝试在项目文件中指定AppxBundlePlatforms参数,例如:<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>.

这适用于VS2015。

答案 1 :(得分:-1)

This回答对我有用。我在这里复制它不仅仅是留下仅链接的答案。

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