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

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

问题描述

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

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.

从错误日志中我很确定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?

在此先感谢您的帮助.

推荐答案

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

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

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