0

错误:UnhandledException:System.Windows.Markup.XamlParseException:“/WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml”值无法分配给对象“System.Windows.ResourceDictionary”的属性“Source”。

Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.  Error at object 'System.Windows.ComponentResourceKey' in markup file 'WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml'.  Error at object 'System.Windows.ResourceDictionary'. ---> 

System.Windows.Markup.XamlParseException:  Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.  Error at object 'System.Windows.ComponentResourceKey' in markup file 'WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml'. ---> 

System.TypeLoadException: Could not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

我不断收到以下异常。当我从 Release 文件夹运行应用程序 exe 时出现异常。在 Visual Studio 中正常调试应用程序时,我根本没有遇到异常。我已经确定异常是因为我正在使用 DatePicker 控件 - 好像我删除了控件(再次构建并运行发布 exe)异常消失了。

我到底怎么能弄清楚这里出了什么问题?

日期选择器看起来好多了,但是对于这看起来可能要修复的工作,我可能倾向于切换到一个文本框,我在按下提交按钮时验证该文本框!令人失望...

4

1 回答 1

0

问题是由于测试机器具有 .Net Framework 3.5 而不是 3.5 SP1。升级到 3.5 SP1 解决了这个问题。

于 2010-04-13T23:18:31.640 回答