MSIX / Windows Application Packaging Project - After Build event or target?

Christophe Keller 1 Reputation point
2022-08-30T08:59:12.14+00:00

So I have a Windows Application Packaging Project in Visual Studio which generates a MSIX installer. The AppInstaller URI points to an Amazon S3 bucket.

What I currently do is I first publish to a local drive, then upload the MSIX package to Amazon S3 via a bat file that calls the AWS command line interface.

I'd like this bat file to be automatically invoked via a kind of post-publish event or after publish target. However, I don't find any information if this can be done. I tried an AfterPublish target in the project file, but it seems this only works foe ClickOnce projects, not MSIX ones.

Has somebody be able to automatically invoke commands after the publishing phase of an MSIX project completes?

Thanks in advance.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,997 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 27,271 Reputation points Microsoft Vendor
    2022-08-31T03:35:34.9+00:00

    Hi @Christophe Keller ,

    Welcome to Microsoft Q&A forum.

    From MSBuild side, publish target is only called when doing ClickOnce publishing, so AfterPublish target works for ClickOnce projects is true(see this doc: MSBuild targets for details).

    Neither using AfterTargets="Publish" nor using AfterTargets="AfterPublish" in MSBuild should work.

    You may need to consider other ways, I suggest you also post this question on MSIX community for better help.

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.