使用 WPF Toolkit 的未知构建错误 [英] Unknown Build Error using WPF Toolkit
问题描述
我安装了 2010 年 2 月的 WPF 工具包,因为我对评估 AutoCompleteBox 控件很感兴趣,但我的成功非常有限.我可以让控件工作,但是一旦我尝试在 XAML 中设置它的任何属性,我就会得到以下信息:
I installed the Feb 2010 WPF Toolkit as I'm interested in evaluating the AutoCompleteBox control and I'm having extremely limited success. I can get the control to work, but as soon as I try and set any of it's properties in XAML, I get the following:
未知的构建错误,无法解析对程序集的依赖关系"WPFToolkit,版本=3.5.40128.1,Culture=neutral,PublicKeyToken=31bf3856ad364e35",因为它尚未预加载.使用 ReflectionOnly API 时,必须通过 ReflectionOnlyAssemblyResolve 事件预加载或按需加载依赖程序集.
我一直在新解决方案中的空白 WPF 窗口上对此进行测试.我猜我只是缺少一个参考或其他东西......这是 XAML(我没有向 .xaml.cs 添加任何内容):
I've been testing this on a blank WPF window in a new solution. I'm guessing I'm just missing a reference or something... Here's the XAML (I've added nothing to the .xaml.cs):
<Window x:Class="WpfToolkitApplication.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
Title="Window1" Height="300" Width="300">
<Grid>
<toolkit:AutoCompleteBox Height="25"/>
</Grid>
</Window>
我添加的唯一参考是 System.Windows.Controls.Input.Toolkit.有什么想法吗?
The only reference I've added is System.Windows.Controls.Input.Toolkit. Any ideas?
推荐答案
您需要添加对 WPFToolkit.dll 的引用(不仅仅是 System.Windows.Controls.Input.Toolkit).
You need to add a reference to WPFToolkit.dll (Not just System.Windows.Controls.Input.Toolkit).
这篇关于使用 WPF Toolkit 的未知构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!