Visual Studio 编译正常,但仍显示红线 [英] Visual Studio compiles fine, but it still shows red lines

查看:88
本文介绍了Visual Studio 编译正常,但仍显示红线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Visual Studio 2012 并且一切正常,直到我开始观察到一些有趣的行为.当我打开我的代码时,它会显示红色下划线,我们通常会在代码中出现错误时看到它.令人惊讶的是,代码编译得很好.我做了以下完全不正常的观察.

I am using Visual Studio 2012 and it was working all fine until I started observing some funny behavior. When I open my code it shows red Underlines which we usually see when there is an error in our code. Surprisingly, the code compiles all fine. I have made following observations that are not normal at all.

  1. 代码中的红色下划线
  2. 在清理或构建解决方案时没有错误.
  3. 红色下划线在我构建/清理解决方案后消失了一段时间,但它们最终会回来.
  4. 因此,我的智能感知停止工作.
  5. 我无法右键单击任何组件并转到其定义.
  1. Red underlines in the code
  2. While cleaning or building the solution no error.
  3. Red underlines go away for some time after I build/clean the solution, but they come back eventually.
  4. Because of this, my IntelliSense stopped working.
  5. I can not right click on any component and go to its definition.

有什么想法吗?

推荐答案

删除临时 ASP.NET 文件夹的内容,然后重新生成.它将位于您的用户文件夹(对于 IIS Express - \AppData\Local\Temp\Temporary ASP.NET Files)或 Windows 目录(对于 IIS - C:\Windows\Microsoft.Net\Framework\vx.xx\Temporary ASP.NET Files)

Delete the contents of the temporary ASP.NET folder and then rebuild. It'll either be in your user folder (for IIS Express - \AppData\Local\Temp\Temporary ASP.NET Files) or the Windows directory (for IIS - C:\Windows\Microsoft.Net\Framework\vx.xx\Temporary ASP.NET Files)

路径不在我的脑海中,可能不正确

Paths are off the top of my head and may not be correct

这篇关于Visual Studio 编译正常,但仍显示红线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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