Question

After I had added some new references to View in my WPF application, I got an exception:

{"Could not load file or assembly 'System.Windows.Interactivity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"}

StackTrace:

at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at MyApplication.GUI.MyPage.InitializeComponent() in c:\Users\Dl\Documents\Visual Studio 2012\Projects\MyApplication\MyApplication.GUI\MyPage.xaml:line 1
at MyApplication.GUI.MyPage..ctor(SettingsViewModel settingsViewModel) in c:\Users\Dl\Documents\Visual Studio 2012\Projects\MyApplication\MyApplication.GUI\MyPage.xaml.cs:line 13 

And this is the code that causes Exception:

<i:Interaction.Triggers>
    <si:DataEventTrigger EventName="MyEvent">
        <ei:ControlStoryboardAction Storyboard="{StaticResource MyStoryboard}" 
               ControlStoryboardOption="Play"/>
    </si:DataEventTrigger>
</i:Interaction.Triggers>

The references I added:

Microsoft.Expression.Interactions (ver. 4.5)
System.Windows.Interactivity (ver. 4.5)
Expression.Samples.Interactivity (ver. 1.0.0.0)

I have no idea where System.Windows.Interactivity 3.5 dependency comes from. Could you give me a clue?

BTW: This may clarify my intentions.

Was it helpful?

Solution

The soulution is to reference assemblies provided by blend rather than those from .NET Framework 4.5.

Thank you Magus for your help. You put me on the right truck.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top