“无法加载文件或程序集”错误。在我的计算机上可以使用,但不能在其他计算机上使用 [英] "Could not load file or assembly" Error. Works on my computer but not others

查看:71
本文介绍了“无法加载文件或程序集”错误。在我的计算机上可以使用,但不能在其他计算机上使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含单个项目文件的解决方案。我正在部署为ClickOnce应用程序。一切在我的计算机上都可以正常运行,但是当我尝试在其他人的计算机上运行时,出现此错误

I have a solution with a single project file. I am deploying as a ClickOnce application. It all runs fine and well on my computer but when I try to run it on someone else's I get this error

System.IO.FileNotFoundException:无法加载文件或程序集'System.Windows.Forms.DataVisualization,版本= 3.5.0.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一。该系统找不到指定的文件。
文件名:'System.Windows.Forms.DataVisualization,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'

System.Windows.Forms.DataVisualization 已载入方面作为我项目中的参考,我相信无论使用哪里,都有适当的using语句。

System.Windows.Forms.DataVisualization is in facet loaded as a reference in my project and I believe there to be appropriate using statements where ever it is being used.

当我转到我的项目时,属性>发布>应用程序文件... System.Windows.Forms.DataVisualization旁边带有一个感叹号,其提示文字为 This项目不再引用该项目。如果不再需要,可以通过右键单击该项目将其删除。发布状态为包含,哈希为包含。但是,发布状态不是包含(自动);排除旁边有自动文字。但是,无论我包含还是排除我,在其他人的计算机上运行时都会遇到相同的错误。

When I go to my project Properties>Publish>Application Files... System.Windows.Forms.DataVisualization has an exclamation point next to it that tooltip text of "This item is no longer referenced by the project. If it is no longer needed, it can be removed by right clicking on the item." the Publish status is "Include" and the Hash is "Include." the publish status is not, however, "Include (auto)"; Exclude has the auto text next to it. But whether I include or exclude I get the same error when running on someone else's machine.

您认为我应该怎么做才能正确引用此文件?

What do you think I should do to get this file to be properly referenced?

谢谢

更新:

我尝试将Local Copy = true设置为无可用。

I've tried setting Local Copy = true, build rebuild to no avail.

我现在正在研究所有其他建议。 (在我和无法工作的计算机之间走了很长一段路!)

I'm going through all the other suggestions now. (It's a long walk between me and the computer that doesn't work!)

推荐答案

听起来像您需要包含链接的声音在您的redist中下载-即使您拥有该程序集,您也可能会缺少依赖项:

Sounds like you need to include the linked download in the in your redist - even if you've got the assembly you'll probably be missing dependencies:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14422

这篇关于“无法加载文件或程序集”错误。在我的计算机上可以使用,但不能在其他计算机上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆