每次我构建解决方案时,都会收到此错误消息:
Warning
3
Could not resolve this reference. Could not locate the assembly "StandardClassLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
StandardClassLibrary
所以我的应用程序有许多项目,StandardClassLibrary
就是其中之一。上面的消息是一个警告,据我所知,它对我的解决方案没有影响。
但我宁愿它不在那里,以防万一......
最佳答案
当项目指向不再存在的程序集的旧位置时,您很可能会收到此消息。由于您能够构建它一次,因此该程序集已被复制到您的 bin\Debug
/bin\Release
文件夹中,因此您的项目仍然可以找到一个副本。
如果您在解决方案资源管理器中打开项目的引用节点,则引用旁边应该有一个黄色图标。删除引用并从正确的位置再次添加它。
如果您想知道它被引用的位置,您必须在文本编辑器中打开 .csproj 文件并查找该程序集的 HintPath
- 出于某种原因的 IDE不显示此信息。
关于c# - 无法解析此引用。找不到程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14261412/