I have a wpf 4.5 application where I want to use a document viewer in an attempt at creating my own report viewer (based on this example). But if I add a DocumentViewer to one of my user controls I get the following error during the initialize component for the usercontrol.
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.
But as you can see from the screen shot of my references, this file is included:
I get this error even if the document viewer is empty.
What I tried:
- I used blend4 to edit the default style of the DocumentViewer Control. I removed all style references that used control parts from the Aero2 library. I even tried using an empty style. But the error still appears.
- I created both a wpf 4 and wpf 4.5 empty solution and added a document viewer to the main window. THe projects both run without error and they both run without adding a reference to any Aero Presentation dll.
- I tried to add a new wpf project to the solution where I am getting the error. IN that project I added a documentviewer to the main window, and the same error was generated. It seems to be solution specific.
Problem
Can someone help me figure out why I am getting this error, or how to remove the control's dependency on this Aero2 dll.
thank you in advance