wpf 无法加载程序集,来自 HRESULT 的异常:0x80131040

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7202065/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 23:02:50  来源:igfitidea点击:

Could not load assembly, Exception from HRESULT: 0x80131040

wpfchartswpf-controlsvisifire

提问by Lohit

Exception:

例外:

Could not load file or assembly 'WPFVisifire.Charts, Version=4.1.0.0, Culture=neutral, PublicKeyToken=99d724542e4db593' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

无法加载文件或程序集“WPFVisifire.Charts, Version=4.1.0.0, Culture=neutral, PublicKeyToken=99d724542e4db593”或其依赖项之一。定位的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)

We are working with our stock exchange charting application using Visifire. We have two app versions. Online Silverlight version and desktop WPF version. I already created Silverlight application and its working well. Same code I copied in WPF application but WPF chart application throws exception.

我们正在使用 Visifire 处理我们的证券交易所图表应用程序。我们有两个应用程序版本。在线 Silverlight 版本和桌面 WPF 版本。我已经创建了 Silverlight 应用程序并且它运行良好。我在 WPF 应用程序中复制的相同代码,但 WPF 图表应用程序引发异常。

I'm very new to dot net development. Please help.

我对 dot net 开发很陌生。请帮忙。

采纳答案by Somnath

Are you using Windows7 OS?

您使用的是 Windows7 操作系统吗?

I suggest you to follow the steps below.

我建议您按照以下步骤操作。

  1. Remove reference of WPFVisifire.Charts.dll and WPFToolkit.dll (if used) from your project.
  2. Clean your project.
  3. Close the application.
  4. Right click no WPFVisifire.Charts.dll and WPFToolkit.dll(if used) then click on properties.
  5. Go to General Tab.
  6. Click on Unblock button.
  7. Now open your project in Visual Studio.
  8. Add new reference to unblocked WPFVisifire.Charts.dll and WPFToolkit.dll(if used).
  9. Compile your project and run.
  1. 从您的项目中删除 WPFVisifire.Charts.dll 和 WPFToolkit.dll(如果使用)的引用。
  2. 清理你的项目。
  3. 关闭应用程序。
  4. 右键单击没有 WPFVisifire.Charts.dll 和 WPFToolkit.dll(如果使用),然后单击属性。
  5. 转到常规选项卡。
  6. 单击取消阻止按钮。
  7. 现在在 Visual Studio 中打开您的项目。
  8. 添加对未阻止的 WPFVisifire.Charts.dll 和 WPFToolkit.dll(如果使用)的新引用。
  9. 编译您的项目并运行。