The GetSupportedExtensions method of DocumentFormatProvidersManager throws NullReferenceException when invoked.
Workaround:
HashSet<string> supportedExtensions = new HashSet<string>();
foreach (var provider in DocumentFormatProvidersManager.FormatProviders)
{
foreach (var extension in provider.SupportedExtensions)
{
supportedExtensions.Add(extension);
}
}