简体   繁体   English

Visual Studio 2019:Intellisense 无法识别引用的程序集

[英]Visual Studio 2019: Intellisense does not recognize assemblies as referenced

I am encountering an annoying error.我遇到了一个恼人的错误。 We have a solution that roughly consists of about 50 separate projects all being built and referenced to main project as dlls.我们有一个解决方案,大致由大约 50 个单独的项目组成,所有项目都在构建并作为 dll 引用到主项目。 In Visual Studio 2017 all is fine, no Intellisense errors, project builds and no errors are encountered.在 Visual Studio 2017 中一切正常,没有 Intellisense 错误,项目构建也没有遇到错误。

Visual Studio 2019 displays missing assembly references eventhough I can successfully build and run the project:即使我可以成功构建和运行项目,Visual Studio 2019 仍会显示缺少的程序集引用:

在此处输入图像描述

What I have tried to overcome the error:我试图克服的错误:

  • Cleaned and rebuilt the solution清理并重建解决方案
  • Removed bin and obj folder of ALL projects as well as the hidden.vs folder in the solution - Built again: Same errors删除了所有项目的 bin 和 obj 文件夹以及解决方案中的 hidden.vs 文件夹 - 再次构建:相同的错误
  • Updated to newest Visual Studio version更新到最新的 Visual Studio 版本
  • Repaired Visual Studio and reinstalled ReSharper修复了 Visual Studio 并重新安装了 ReSharper

I had no success with all of those steps.所有这些步骤我都没有成功。 Does anyone have an idea on what else I could try?有人知道我还能尝试什么吗?

I seem to have found a solution for my problem.我似乎找到了解决我的问题的方法。 This link and Andrei Romans answer helped.链接和 Andrei Romans 的回答有所帮助。 Basically it says:基本上它说:

Go to Tools -> Options -> Projects and Solutions -> General -> Uncheck "Allow parallel project initialization" Go 到工具 -> 选项 -> 项目和解决方案 -> 常规 -> 取消选中“允许并行项目初始化”

Then close the solution, restart it and finally rebuild the project.然后关闭解决方案,重新启动它,最后重建项目。 That worked for me - no more errors:-)这对我有用 - 没有更多错误:-)

EDIT:编辑:

When branching and checking out the error persisted.分支和签出错误仍然存在。 What I did then is to check the usings that wheren´t recognized and un- and reloading the corresponding project.然后我所做的是检查无法识别的用途并取消并重新加载相应的项目。 Currently my issues are resolved by this step.目前我的问题已通过此步骤解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM