Usually, I recommend a simpler mechanism. Add "-sval" to your light.exe
calls then use smoke.exe to run validation serially at the end.

virtually, Rob Mensching - http://robmensching.com


On Thu, Oct 15, 2009 at 9:31 AM, Blair <os...@live.com> wrote:

> Not sure. The semi-pseudocode would look like the following, however:
>
> [assembly: AssemblyDefaultWixExtension(typeof(MyConcurrencyExtension))]
> class MyConcurrencyExtension : WixExtension
> {
>    private ValidatorExtension myValidation;
>
>    public override ValidatorExtension ValidatorExtension
>    {
>        get
>        {
>            if (null == myValidation)
>            {
>                myValidation = new MyValidatorExt();
>            }
>            return myValidation;
>        }
>    }
> }
> class MyValidatorExt : ValidatorExtension
> {
>    private Mutex msiMutex;
>
>    public override void InitializeValidator()
>    {
>        base.InitializeValidator();
>        msiMutex = acquire-mutex();
>    }
>
>    public override void FinalizeValidator()
>    {
>        release-mutex(msiMutex);
>        base.FinalizeValidator();
>    }
> }
>
> Heath has blogged about using the public "well known" MSI mutex (in other
> contexts) which should also help prevent build errors caused by WUS or
> other
> background operations accessing MSI during your builds. In a previous
> project (before having a better idea what was really happening) I used a
> private semaphore and discovered that the number of concurrent validation
> sessions had to be exactly "one", and then managed to have a background
> installation operation (a corporate patch push of some sort) happen during
> a
> build which lead me to believe the best synchronization object would be the
> MSI mutex.
>
> You could use the above extension with both light and smoke. It will hold
> the mutex the minimal amount of time necessary, which will allow maximal
> use
> of the concurrency you have built into your build system while still
> preventing the errors you were seeing.
>
> -----Original Message-----
> From: Kevin Gu [mailto:k...@microsoft.com]
> Sent: Wednesday, October 14, 2009 9:18 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] light.exe failed randomly when running ICEs.
>
> Hi Blair,
>
>   Thanks for your information.
>
>   Is there any example of writing a ValidatorExtension?
>
>
> Thanks,
> Kevin GU | SDE | CSAT China | 8621-61518167
>
>
> -----Original Message-----
> From: Blair [mailto:os...@live.com]
> Sent: Thursday, October 15, 2009 12:33 AM
> To: 'General discussion for Windows Installer XML toolset.'
> Subject: Re: [WiX-users] light.exe failed randomly when running ICEs.
>
> ICE validations run the Windows Installer transaction engine (which is a
> singleton), but it doesn't seem to check for the public mutex first. The
> error messages returned as a result often don't make sense, however.
>
> The best fix is to add a validation extension that acquires the
> installation
> mutex when starting validation and releasing it when it ends. The next best
> fix is to either ensure that only one copy of light runs at a time (you can
> create multiple cabs on multiple threads to regain most of the performance
> impact lost by making light a singleton) or suppress validation in light
> and
> run smoke as a singleton. If you run smoke, pass it both the MSI and the
> wixpdb together to get the same/best output (pointing to your source code
> where possible).
>
> -----Original Message-----
> From: Kevin Gu [mailto:k...@microsoft.com]
> Sent: Wednesday, October 14, 2009 9:16 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] light.exe failed randomly when running ICEs.
>
> Hi,
>
>   I've got this kind of error when building concurrently using 4 threads.
>
> Error executing ICE action 'ICE38'. The most common cause of this kind of
> ICE failure is an incorrectly registered scripting engine. See
> http://wix.sourceforge.net/faq.html#Error217 for details and how to solve
> this problem. The following string format was not expected by the external
> UI message logger: "Error 1711.An error occurred while writing installation
> information to disk. Check to make sure enough disk space is available, and
> click Retry, or Cancel to end the install.".
>
>   This error occurs randomly. It seems that ICE validations are not stable
> when running on multiple instances of MSIs. Any idea about how to fix this
> issue?
>
>
> Thanks,
> Kevin GU | SDE | CSAT China | 8621-61518167
>
>
> ----------------------------------------------------------------------------
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ----------------------------------------------------------------------------
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ----------------------------------------------------------------------------
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to