我的解决方案中有一个项目程序集引用到另一个项目。
似乎 VS2010 的 Intellisense 并没有意识到引用的存在;它给了我
The type or namespace name [assembly-specific part of namespace] does not exist in the namespace [namespace common to both projects/assemblies] (are you missing an assembly reference?)
我的using
陈述中有一个错误The name [class in referenced assembly] does not exist in the current context
在我使用引用程序集中的类时出现错误。
但是,该参考在实践中运行良好:参考项目成功构建,并且代码运行良好。
(两个项目都针对同一个框架。如果相关,这是一个 SharePoint 项目,所以两个程序集都存在于 GAC 中;我不知道这是否意味着即使引用实际上是它们也可以“找到”对方失踪。)
我以前从其他程序集引用此程序集时遇到过类似的问题。通常,错误仅在带有引用的文件打开时保留在错误列表中。
由于一切都很好,这真的只是一个烦恼,但我真的很想修复它。