3

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.

4
  • I'm getting: 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. when I construct a FlowDocumentScrollViewer. Have you solved your issue yet? Commented Aug 21, 2013 at 18:53
  • No. It looks like the same issue though. I ended up just displaying it with regular controls and printing it blind. Commented Aug 22, 2013 at 18:33
  • I am having the same problem, did you ever get this working? Commented Mar 14, 2014 at 2:12
  • Nope. Went with alternatives. Commented Mar 14, 2014 at 2:15

1 Answer 1

3

I had this same problem in a wpf 4.5 solution.

What I ended up doing was:

  1. creating a new blank solution
  2. then adding the existing projects from the "old" solution to the new solution. (for me my solution had 5 projects in it so I had to add them all).
  3. I then built and ran the new solution.

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Interesting. Run a Diff on the project/solution files and see what's different. It could be something as simple as load order.
I tried this and it worked for me. After making the change and doing a diff, I noticed a few things were changed, but I don't think that made a difference. The order the projects are listed changed, but when I made the old solution match the order of the new solution, it didn't resolve the problem. The other change was the configuration platforms were different, but again, after making them match it didn't solve the problem. I even named the new solution to be the same as the old, and still no problems. So in essence, it works, but I haven't a clue as to why it works.
I had the exact same problem and this solution worked for me as well. I would just like to add that replacing the sln file didn't work, only when I replaced the .suo file it worked! But comparing two binary files is difficult, so I don't know exactly what the problem was unfortunatly.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.