My problem is this: I added a reference to the "System.Windows.Interactivity" assembly to my WPF project (.NET 4, VS2010) to implement the behavior. The whole solution is built and works. The desired functionality that was implemented as behavior works great.
But as soon as I open the XAML file (only the XAML code is displayed, the designer is not displayed), I get two exceptions in the error window:
First exception: "Fixed System.IO.FileLoadException on" SomeFile.xaml ": failed to load file or assembly" System.Windows.Interactivity, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "or one of its dependencies not supported. (Exception from HRESULT: 0x80131515).
The second exception: "Failed to load the file or assembly" System.Windows.Interactivity, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 "or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Exceptions occur even if I open a XAML file that does not contain new behavior. Despite these exceptions, the solution is built and launched. If I close the XAML file, the exceptions will disappear.
A similar problem is described at http://connect.microsoft.com/VisualStudio/feedback/details/648819/visual-studio-2010-silverlight-designer-crash . But this is for SL4.
How to remove these exceptions? What is wrong here?
Thanks Florian
source share