Preview fails with Visual Studio hosting process running
Question / Problem
When I run my project from Visual Studio, pdf, msg or sometimes txt files cannot be previewed in the ShellFilePreview component.
Answer / Solution
Depending on .NET Framework and Visual Studio version the Visual Studio hosting process might interfere with certain registered PreviewHandlers.
This behavior will not occur if Visual Studio is either not running or the hosting process is not enabled.
Try running your project with Visual Studio completely closed.