在自定义操作中,我覆盖了以下函数并在回滚情况下出现异常......
“savedState 字典不包含预期值,可能已损坏。”
有没有其他方法可以回滚?
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);
}
}