views:

187

answers:

0
    In custom action I override following function and got exception in rollback

case... "savedState dictionary does not contain the expected values and might have been corrupted ". Is there any other way to rollback ?

   protected override void OnBeforeInstall(System.Collections.IDictionary savedState)
    {            
        try
        {                

            bool report = false; //Some validation
            if (!report)                
                throw new InstallException("License is not valid.");
            base.OnBeforeInstall(savedState);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            base.Rollback(savedState);
        }

    }