Hi TobiBo,
At first, we need to know why the savedState is null. Did you modify it before? Is the program installed successfully?
To prevent the savedState null exception, we can check it and set it to a new dictionary instance. This is a code snippet:
public override void Uninstall(IDictionary savedState)
{
if (Check())
base.Uninstall(savedState);
else
{
if (savedState == null)
{
savedState = new Dictionary<string, string>();
//Add some default values to the dictionary here.
}
//Call the rollback method.
this.Rollback(savedState);
}
}
Regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.