My problem is as follows: I added a reference to the assembly "System.Windows.Interactivity" to my WPF-project (.NET 4, VS2010) to implement a behavior. The whole solution builds and runs. The desired functionality that was implemented as behavior works fine.
But as soon as I open a XAML file (only XAML-code is shown, designer is not displayed) I get two exceptions in the error window:
1st Exception: "System.IO.FileLoadException was thrown on "SomeFile.xaml": Could not load 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)."
2nd Exception: "Could not load 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)"
The exceptions arise even if I open a XAML file that does not contain the new behavior. Despite those exceptions, the solution builds and runs. If I close the XAML file, the exceptions disappear.
A similar issue is described in http://connect.microsoft.com/VisualStudio/feedback/details/648819/visual-studio-2010-silverlight-designer-crash. But this is for SL4.
How can I remove these exceptions? What is wrong here?
Thanks, Florian