The icons in my TaskDialog are missing:
TaskDialog
And in the taskbar:
I'd add this as a comment but I don't have enough rep. The marked answer worked for me once I removed this line of code:
taskDialog.FooterIcon = taskDialog.FooterIcon;
It was causing an unhandled exception.