[wix-devs] OnExecutePackageComplete without OnExecutePackageBegin

Heath Stewart Heath.Stewart at microsoft.com
Wed Mar 16 10:03:28 PDT 2016

We ran into a scenario where a caching error prevented OnExecutePackageBegin from executing (basically, in apply.cpp, the check for the caching HRESULT happens just before calling OnExecutePackageBegin on the BA) but OnExecutePackageComplete was called (it's the first line after the LExit label for each package-specific execute function in apply.cpp. We can work around this (just keep track of what packages were started and check that set in the completion callback), but begs the question whether in burn we should call a Complete callback without a corresponding Begin callback. It's not common to see that sort of behavior (thinking about async APIs in various frameworks I've used).

What is more consistent with typical async behavior - and allows a BA to clean anything specific to the downloading/caching of a package still - is that ApplyCache does call OnCacheBegin invariably (i.e. no exits before said call) and OnCacheComplete in the LExit (again with no early exits) so they are always a pair.

So should this maybe changed for wix4?

Heath Stewart
Visual Studio, Microsoft

More information about the wix-devs mailing list