UWP with Desktop Bridge package build automation with MSbuild

Same experience here, but I manage to bypass the "Could not find a recipe file" error by build x86 and x64 project separately, and then run the msbuild command to package both. Here are my notes:

  1. Because my solution has one Desktop Extension project, several c# projects, and a few test projects, I have to specify <AppxBundle>Always</AppxBundle> or <AppxBundle>Never</AppxBundle> in the project files, one by one.

  2. Clean both x86 and x64.

  3. Build x86 first. msbuild .\MyApp.sln /p:Configuration=Release /p:Platform=x86

  4. Build x64. msbuild .\MyApp.sln /p:Configuration=Release /p:Platform=x64

  5. Run this msbuild command in command line:

    msbuild .\MyApp.sln /p:Configuration=Debug /p:AppxBundlePlatforms="x86|x64" /p:AppxPackageDir="C:\Develop\MyApp\AppPackages\" /p:UapAppxPackageBuildMode=StoreUpload

  6. Note that I have to add AppxPackageDir in the command, otherwise it will only bundle x64, not x86. I don't know why yet.

  7. Then you will see all the bundle folders are created under the AppxPackageDir, both x64 and x86. The one single upload bundle will be created outside of the folders.

It takes forever to build the release builds, but it works in command line. Automation, here we go!