C# System.Windows.Interactivity-加载程序集时发生异常
在我的WPF应用程序中添加了一些要查看的新引用之后,我遇到了一个异常:C# System.Windows.Interactivity-加载程序集时发生异常,c#,.net,wpf,.net-assembly,blend,C#,.net,Wpf,.net Assembly,Blend,在我的WPF应用程序中添加了一些要查看的新引用之后,我遇到了一个异常: {"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 ma
{"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)"}
堆栈跟踪:
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
这是导致异常的代码:
<i:Interaction.Triggers>
<si:DataEventTrigger EventName="MyEvent">
<ei:ControlStoryboardAction Storyboard="{StaticResource MyStoryboard}"
ControlStoryboardOption="Play"/>
</si:DataEventTrigger>
</i:Interaction.Triggers>
我不知道System.Windows.Interactivity 3.5依赖项从何而来。你能给我一个线索吗
顺便说一句:可以澄清我的意图。解决方案是引用blend提供的程序集,而不是.NET Framework 4.5中的程序集
谢谢Magus的帮助。你让我上对了车 System.Windows.Interactive是Blend附带的dll。您可能希望将dll复制到解决方案中。表达式.Samples很可能引用的是旧版本。
Microsoft.Expression.Interactions (ver. 4.5)
System.Windows.Interactivity (ver. 4.5)
Expression.Samples.Interactivity (ver. 1.0.0.0)