How can I build and package a packaged single-project MSIX app in command line? #1835
-
After migrating my existing packaged WinUI C# project to the single-project MSIX app and getting rid of the WAP project, I find the CI failed to build a MSIX package. The CI uses the following command to build the app. msbuild $env:Solution_Name /restore /p:Platform=$env:TargetPlatform /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:BuildMode /p:AppxBundle=$env:AppxBundle /p:PackageCertificateKeyFile=$env:PfxPath /p:PackageCertificatePassword="${{ secrets.Pfx_Key }}" which works fine when the WAP project is there. When I execute the command in my local environment, the app does get build, but no MSIX package is generated. When I use the Create App Package function in Visual Studio to package the app, an I cannot find any documentation on this topic. How can I package the app in command line and fix the CI/CD pipeline? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @HEIGE-PCloud, thanks for asking this question! This is something we need to get added to our docs (another customer asked this last week). In the meantime, I'll provide the answer here 😊 The key missing build command option is Here's an example of a GitHub action building a WinUI 3 single project app: https://github.com/andrewleader/WindowsAppSDKGallery/blob/main/.github/workflows/dotnet-desktop.yml#L102 Also, one other thing to note...
|
Beta Was this translation helpful? Give feedback.
Hey @HEIGE-PCloud, thanks for asking this question! This is something we need to get added to our docs (another customer asked this last week). In the meantime, I'll provide the answer here 😊
The key missing build command option is
/p:GenerateAppxPackageOnBuild=true
... that'll cause the MSIX package to be generated!Here's an example of a GitHub action building a WinUI 3 single project app: https://github.com/andrewleader/WindowsAppSDKGallery/blob/main/.github/workflows/dotnet-desktop.yml#L102
Also, one other thing to note...