It seems the DocumentViewer control may not like Windows 8. Just by having it on the form (with all the defaults, not data set to it or anything, it hasn't even finished InitializeComponent yet) I'm getting this error:
BindingFailure was detected
The assembly with display name 'PresentationUI.Aero2' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'PresentationUI.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
If I get rid of the control, the issue goes away. Strangely, the designer has absolutely no problems with it at all.
I tried adding a reference to the only framework assembly with Aero2 in its name, that did nothing. And there are no references to this error anywhere on google. I'm trying to put together a documentpaginator, and I'm having to use a pdf printer to get around this issue, but I'm going to need a working viewer eventually.
I had this same problem in a wpf 4.5 solution.
What I ended up doing was:
This solved the error and there are no references to Aero2 in any of my projects.
I am not sure why this fixed it, But I am glad that it did.
EDIT:
It seems that .suo file is the cause of all this. I've ran into this couple times - making a new project doesn't work, but new solution works - in the end I realized (thanks to a comment below) it's down to the .suo file. After removing it it worked ok.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With