VSTS build for UWP app not producing a .appxupload

2019-07-29 16:34发布

问题:

Issue: When building a UWP using the VSTS build service no .appxupload file for store submissions is created.

What I did: I created a build definition using the Universal Windows App template that contains 4 build steps. Apart from setting the repository to my external Git repository I didn't change anything.

After the build finishes I only have the _Test folder in my drop. No .appxupload file.

What I tried so far:

  1. According to Build your Universal Windows Plattform app I have to add the UapAppxPackageBuildMode (set to CI) switch to the MSBuild arguments. I did it exactly as shown there. However, neither the .appxupload nor the _Test folder are created but the build step itself completes successfully. (Actually, the AppxPackages folder that is specified by default using the AppxPackageDir switch is missing, too)
  2. I tried running the Create App Packages... option from within Visual Studio. This results in both, the .appxupload and _Test folder.
  3. [Update] I found another switch to try at the MSBuild arguments which is AppxPackageIsForStore (set to true). This will generate the _Test folder but still not .appxupload package.

回答1:

I could reproduce your issue. If don't use argument /p:UapAppxPackageBuildMode=CI, I could only get _Test folder. If add argument /p:UapAppxPackageBuildMode=CI, I'll get error message during Publish Artifact step:

Not found PathtoPublish: C:\a\1\b\AppxPackages

But I just tried argument /p:UapAppxPackageBuildMode=StoreUpload, it can generate both _Test folder and .appxupload file, you may have a try.