See the attached demo project, which throws the following exception:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at #=zRfa24k6qRV51vWOnVLP8VICdg7c7CNQNesY…...or improperly configured optimization options. To troubleshoot...document you are trying to optimize is not corrupted and is accessible...