What is the equivalent CLI command for Visual Studio's "Publish > Create App Packages..." right-click action? #14254
-
I have a Windows Application Packaging Project (
I create release builds by right-clicking I would like to call this via the CLI in order to set up CI builds, but I have been unable to figure out what the corresponding CLI command would be. For non-WAP projects, it sounds like the build command would normally be |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When the However, when I believe if you set your WAP project as the solution's Startup Project (i.e. Right-click on the project in VS and select "Set as Startup Project", then save the changes) then that should make sure that the default app that is built, deployed, and run is your WAP project. (Which should fix if it wasn't getting built before from the command line.) I believe that will get you in a state where your command line build, builds your WAP project, and (hopefully?) even deploys it. The other thing you need, that the "Create App Packages..." flow does is make sure you're signing the project with the proper key so you can submit to the store. Which means you'll need your CI to acquire the PFX and use it in the build. For reference, we do this in the React Native Gallery's CI, see where we specify the So you'll need to add steps to your CI to get your PFX (that you can create in VS, but then, you probably don't want to check that into your repo) do the build, then clean up the PFX so it's not left on whatever CI agent machine you're using. Hope this helps, /jon |
Beta Was this translation helpful? Give feedback.
When the
run-windows
command builds, it builds the whole solution, and (as is default) your UWP app project has its own "built-in" appx package, so of course that "built-in" appx package gets built. If you've added other projects (like the WAP project) then I believe those will get built as well (if not see below).However, when
run-windows
tries to deploy (install the appx package to your machine), there's some logic to determine if we use VS to deploy or do it manually ourselves. And we only install one thing, so it's possible that we may install the "built-in" appx package for your UWP app and not the WAP project you want. (This logic may be different from debug vs release, by design).I…