无法解析程序集Microsoft.Expression.Interactions

时间:2013-08-01 15:53:02

标签: c# wpf xaml expression mvvm-light

我目前正在尝试实现一个找到here的插件系统。这是一个很棒的插件系统但如果我尝试在包含的WpfApplication上加载MainWindow.xaml的设计器,我会得到一个例外:

System.Reflection.Adds.UnresolvedAssemblyException
Type universe cannot resolve assembly: Microsoft.Expression.Interactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

所有内容都可以构建并运行良好,但在没有UI视图的情况下在XAML中进行设计尤其令人沮丧。有没有办法解决这个错误?这里到底发生了什么?

.dll也位于“C:... \ PluginSystem \ Libraries \ Microsoft.Expression.Interactions.dll”下的我的项目文件夹中。 .dll随插件系统本身一起分发。

打开窗口标记:

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
xmlns:local="clr-namespace:PluginSystem.Controls;assembly=PluginSystem" 
xmlns:ee="http://schemas.microsoft.com/expression/2010/effects" 
xmlns:PluginSystem="clr-namespace:PluginSystem;assembly=PluginSystem" 
xmlns:PluginSystem_Controls="clr-namespace:PluginSystem.Controls;assembly=PluginSystem" 
xmlns:Plugin1="clr-namespace:Plugin1;assembly=Plugin1" 
xmlns:Plugin3Dependency="clr-namespace:Plugin3Dependency;assembly=Plugin3Dependency" 
xmlns:WpfApplication_ViewModel="clr-namespace:WpfApplication.ViewModel" 
x:Class="WpfApplication.MainWindow"
            Title="MainWindow" Height="350" mc:Ignorable="d" Width="525">

1 个答案:

答案 0 :(得分:1)

确保在项目中向DLL添加引用,并在MainWindow中正确包含命名空间。

相关问题