无法加载具有相同 Visual Studio 解决方案设置的文件或程序集

问题描述 投票:0回答:1

VS 2019.
我遇到的问题是正确运行当前版本(2.4)解决方案的构建。 我一直遇到以下错误

System.IO.FileNotFoundException: 'Could not load file or assembly 
'csMeriamDeviceFoundation.dll' or one of its dependencies. The specified module could not be found.

我有这个解决方案的两个版本,2.0 和 2.4。 2.0 版是从同事的笔记本电脑上检索的,2.4 版是通过 Microsoft 团队基础服务器下载的。我能够构建 2.0,几乎没有什么问题,但无法构建 2.4。我比较了 DLL 文件,它们是相同的。我确保每个项目的设置都是相同的,卸载并重新加载项目,甚至删除并重新添加项目。我还确保每个项目的参考文献都是相同的(图片)。
最后要注意的一件事是,当尝试在 2.4 中发布项目只是为了看看会发生什么时,我收到了以下错误。再说一次,这只发生在 2.4 上,而不会发生在 2.0 上。

Failed to connect to ‘path' with the following error: Unable to create the Web site ‘path’.
The path 'path' does not exist or you do not have access. The specified path is invalid.

enter image description here

c# visual-studio reference
1个回答
0
投票

结果我的项目中缺少依赖项。 使用 https://github.com/lucasg/Dependency 检测到丢失的 DLL 文件是什么,现在可以在调试中运行。

© www.soinside.com 2019 - 2024. All rights reserved.