[wix-devs] OnExecutePackageComplete without OnExecutePackageBegin

Sean Hall r.sean.hall at gmail.com
Wed Mar 16 10:10:06 PDT 2016

I think every Begin callback should always have a corresponding Complete
callback, even if an error occurred.  A Complete callback should never be
sent unless the corresponding Begin callback was sent, if Burn is doing
this then I think that's a bug.

I'd have to look at code for the OnCacheBegin/OnCacheComplete question, if
the whole cache phase is skipped I don't think they should be sent.

On Wed, Mar 16, 2016 at 12:03 PM, Heath Stewart <Heath.Stewart at microsoft.com
> wrote:

> 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
> http://blogs.msdn.com/heaths
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/

More information about the wix-devs mailing list