“复制本地=假"引用的项目显示“无法加载文件或程序集" [英] "Copy Local = false" referenced project shows "Could not load file or assembly"

查看:20
本文介绍了“复制本地=假"引用的项目显示“无法加载文件或程序集"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了几天时间寻找答案,但没有弄清楚会发生什么.

I have spent days looking for an answer but have not figured out what happens.

我有一个包含 4 个项目的解决方案.其中之一被其他3个引用.所有引用都设置为copy local = false".

I have a solution with 4 projects. One of them is referenced to other 3. All references are set "copy local = false".

我已经为他们每个人制作了输出文件夹,一切都很顺利,直到我决定更改输出文件夹.:-(

I have made output folders for each of them and everything was going great, until I decided to change the output folder. :-(

现在,当我将项目引用到另一个具有copy local = false"属性的项目时,项目不会加载,并且出现错误提示

Now when I reference the project to another with property "copy local = false" project does not load and I have an error saying

无法加载文件或程序集..."或其依赖项之一.系统找不到指定的文件.

Could not load file or assembly "..." or one of its dependencies. The system cannot find the file specified.

从 FusionLog 的错误中我很确定 Studio 仍在旧路径中寻找项目的 .dll.

I am quite sure from the FusionLog of the error that Studio is still looking for the project's .dll at the old path.

当我设置copy local = true"时,项目会运行,但此解决方案是不可接受的.

When I set "copy local = true" projects runs but this solution is not acceptable.

我应该怎么做才能再次加载我的项目并将 copy local 设置为 false?如何更改 Visual Studio 正在查找的路径?有我可以清除或更新的缓存吗?

What should I do so I can load my project again with copy local set to false? How can I change the path that Visual Studio is looking? Is there a cache that I can clear or update?

在此先感谢您对此的任何帮助.

Thanks in advance for any help on this.

推荐答案

  1. 备份整个解决方案(所有文件)
  2. 找到您的解决方案 (.sln) 文件.
  3. 右键单击其图标并选择打开方式",然后选择记事本或类似的文本编辑器.
  4. 搜索部分或全部旧路径.
  5. 如果您在文件中找到它,请将旧路径的所有实例替换为新路径.
  6. 保存文件.

这篇关于“复制本地=假"引用的项目显示“无法加载文件或程序集"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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