WPF DocumentViewer control not loading

It seems the DocumentViewer control might not like Windows 8. Just having it on the form (with all defaults, not data set for it or whatever, it hasn't finished InitializeComponent yet). I am getting this error

BindingFailure detected

The node with display name "PresentationUI.Aero2" did not load in the context of the "Load" binding for AppDomain ID 1. The reason for 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 problem goes away. Oddly enough, the designer has absolutely no problem with him.

I tried to add a reference to a single frame assembly named Aero2 in its name without doing anything. And there are no links to this error anywhere on Google. I am trying to put together a documentpaginator and I will have to use a PDF printer to work around this problem, but ultimately I need a working view.

+3


source to share


1 answer


I had the same problem in wpf 4.5 solution.

What I ended up doing:

  • creating a new empty solution
  • then adding existing projects from the "old" solution to the new solution. (for me, there were 5 projects in my solution, so I had to add them all).
  • Then I built and ran a new solution.

This solved the error and there are no references to Aero2 in any of my projects.



I don't know why this is fixed, but I'm glad it was.

EDIT:

It seems that the .suo file is the cause of all this. I ran into this a couple of times - creating a new project doesn't work, but the new solution does work - I eventually figured it out (thanks below) in the .suo file. After uninstalling, it worked fine.

+3


source







All Articles