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

本文关键字:Microsoft Expression Interactions 程序集 | 更新日期: 2023-09-27 18:25:47

我目前正在尝试实现这里的插件系统。这是一个很棒的插件系统,但如果我试图在包含的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">

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

确保在项目中向DLL添加引用,并在主窗口中正确包含Namespace。