WPF引用不存在的航空组件

问题描述 投票:0回答:3

我在WPF应用程序中对XamDataChart有问题。当我将图表添加到页面时,设计器工作正常,我进行了所有设置,并且在屏幕上看起来正常。然后,我启动该应用程序,然后图表构造函数使该应用程序崩溃,寻找不存在的程序集。在调试和发行版本中都会发生这种情况。

System.IO.FileNotFoundException occurred
Message=Could not load file or assembly 'InfragisticsWPF4.DataVisualization.v11.1.Aero, Version=11.1.20111.2094, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' or one of its dependencies. The system cannot find the file specified.
...
Calling assembly : PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

Callstack(相关部分):

mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoadAssemblyName
mscorlib.dll!System.Reflection.RuntimeAssembly.InternalLoad
mscorlib.dll!System.Reflection.Assembly.Load
PresentationFramework.dll!System.Windows.SystemResources.ResourceDictionaries.LoadExternalAssembly
... 
InfragisticsWPF4.DataVisualization.v11.1.dll!Infragistics.InteractiveControl.InteractiveControl()   InfragisticsWPF4.DataVisualization.v11.1.dll!Infragistics.Controls.XamZoombar.XamZoombar()
InfragisticsWPF4.Controls.Charts.XamDataChart.v11.1.dll!Infragistics.Controls.Charts.XamDataChart.XamDataChart()
System.Xaml.dll!System.Xaml.Schema.XamlTypeInvoker.CreateInstance

[因为我怀疑Infragistics会将其程序集附带未解决的引用,并且我无法在HDD的任何位置找到.Aero程序集,所以我想这是PresentationFramework“代表”控件程序集完成的一些动态程序集加载。我在WPF中仍然不是很好,我也不太了解这种机制,也不清楚WPF为什么尝试加载此程序集,为什么WPF不能正常失败也是如此重要。有人可以对此有所启发,并帮助我解决这一僵局。

c# wpf wpf-controls aero
3个回答
1
投票

我相信,由于您的应用程序是WPF程序,并且它试图与Windows中的当前主题或应用程序的当前主题集成,因此,由于您正在使用Aero主题,因此它将搜索此.Aero dll。您需要找到该dll并添加您的项目,或者更改主题可能是一种解决方法。


1
投票

对我来说,答案是删除我的。suo文件和ReBuild我的整个解决方案。正如对此question的答案之一所建议的。


0
投票

让我开心的一天!我删除了suo文件,打开了解决方案,它可以正常工作

© www.soinside.com 2019 - 2024. All rights reserved.