WPF:未找到 RibbonControlsLibrary.Luna.dll
我使用过 RibbonControlsLibrary 在我的应用程序中。在 Windows 7 中,一切都很好,但在 Windows XP 中,在参数 e.Name 的事件处理程序 AppDomain.CurrentDomain.AssemblyResolve 中,我得到了 RibbonControlsLibrary.Luna.dll。 Assembly.LoadFrom(e.Name) 引发异常:FileNotFoundException。我该如何解决这个问题?
I've used RibbonControlsLibrary in my application. In Windows 7 everything was fine, but in Windows XP in the event handler AppDomain.CurrentDomain.AssemblyResolve
in parameter e.Name I got RibbonControlsLibrary.Luna.dll. Assembly.LoadFrom(e.Name) threw the exception: FileNotFoundException. How can I fix this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,你不能。 WPF 正在寻找与 RibbonControlsLibrary 关联的主题程序集。如果找到,它将加载适当的 Luna 主题。否则,它将回退到 RibbonControlsLibrary 中的通用主题。
因此,您的 AssemblyResolve 应该忽略未找到 RibbonControlsLibrary.Luna 的事实。
Basically, you can't. WPF is looking for the theme assembly associated with he RibbonControlsLibrary. If it's found, then it would load the appropriate Luna theme. Otherwise, it will fall back to the generic theme in the RibbonControlsLibrary.
So your AssemblyResolve, should just ignore the fact that the RibbonControlsLibrary.Luna is not found.