Visual Studio编译正常,但仍显示红线 [英] Visual studio compiles fine but still shows red lines
问题描述
我正在使用VS 2012,在我开始观察到一些有趣的行为之前,它运行良好。当我打开代码时,它会显示红色的下划线,当代码中有错误时,通常会看到这些下划线。出人意料的是,代码可以正常编译。我做了以下观察,这些观察根本不正常。
I am using VS 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, code compiles all fine. I have made following observations that are not normal at all.
- 代码中的红色下划线
- 在清理或构建解决方案时没有错误。
- 红色下划线在构建/清理解决方案后消失了一段时间,但最终又回来了。 因此,我的智能感知功能停止工作。
- 我无法右键单击任何组件并转到其定义。
- Red Underlines in the code
- While cleaning or building the solution no error.
- red Underlines go away for some time after I build/clean the solution but comes back eventually.
- Because of this my intellisense stopped working.
- I can not right click to any component and go to its definition.
有什么想法吗?
推荐答案
删除临时ASP.NET文件夹的内容,然后重新生成。它将位于您的用户文件夹(对于 IIS Express-\AppData\Local\Temp\临时ASP.NET文件)或Windows目录(对于 IIS-C :\Windows\Microsoft.Net\Framework\vx.xx\ASP.NET临时文件)
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屋!