Visual Studio 编辑器不再在错误下划线

发布于 2024-07-08 23:42:13 字数 208 浏览 13 评论 0原文

我的 Visual Studio (2008) 编辑器已停止在错误下划线(这条漂亮的波浪红线)。 我无法确定具体时间,但可能与 .Net Framework 3.5 SP 1 或 MVC Beta 的安装有关(我猜这不太可能)。 此外,我出于评估目的安装并卸载了 CodeRush 和 Resharper(决定不保留其中任何一个)。

有谁知道这个问题以及如何再次恢复此功能?

My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided not to keep either one of them).

Does anyone know the problem and how to restore this functionality again?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

山田美奈子 2024-07-15 23:42:13

您检查过工具选项...文本编辑器C#高级编辑器中的下划线错误

我通常喜欢在弄乱插件后重置我的设置,因为它们往往会弄乱设置:工具导入和导出设置...重置所有设置

Have you checked ToolsOptions...Text EditorC#AdvancedUnderline errors in the editor?

I usually like to reset my settings after messing around with plugins, as they tend to mess with settings: ToolsImport and Export Settings...Reset all settings.

篱下浅笙歌 2024-07-15 23:42:13

关于可能的原因。

对于 VS 2012 和 2013,如果您在不同计算机上有多个 Visual Studio 实例绑定到一个“实时”帐户,并且在其中一台计算机上安装了 ReSharper,则会禁用本机 IntelliSense和错误下划线(用它自己的规则替换)将通过您的帐户同步到另一台没有 ReSharper 的计算机。

About possible causes.

For VS 2012 and 2013 if you have more than one instance of Visual Studio on different machines binded to one "live" account and have installed ReSharper on one of them, it disables the native IntelliSense and error underlines (to replace by it's own rules) that will be synchronised through your account to another machine without ReSharper.

戏剧牡丹亭 2024-07-15 23:42:13

在 Visual Studio 2019 中找到它:Tools > 选项> 文本编辑器> 一般> 显示错误曲线

Found it in Visual Studio 2019 as: Tools > Options > Text Editor > General > Show error squiggles

坏尐絯℡ 2024-07-15 23:42:13

对于 Visual Studio 2017,请根据 HeeJae 的评论进行操作:

https://developercommunity.visualstudio.com/content/problem/113112/design-time-error-checking-isnt-working.html

即:

嗨。 您可能遇到了一个已知问题。 你可以试试这个吗?

1.更新到最新版本如果这不能解决问题

2.转到工具\选项\项目和解决方案\常规并取消选中“允许并行项目初始化”。

3.关闭VS。

4.删除解决方案文件旁边的“.vs”目录。

5.重新打开VS。

..

谢谢

您可以在问题解决后重新启用“允许并行项目初始化”选项。

我尝试升级 VS、重置 VS 设置、清除 VS 缓存以及人们常规执行的所有操作,但都没有解决这个问题! 最后提到的解决方案对我来说神奇地起作用了。

祝你好运

For visual studio 2017 act according to HeeJae's comments in:

https://developercommunity.visualstudio.com/content/problem/113112/design-time-error-checking-isnt-working.html

i.e:

Hi. you are probably hitting a known issue. can you try this?

1.Update to latest release If that doesn’t solve it

2.Go to Tools\Options\Projects and Solutions\General and uncheck “Allow parallel project initialization”.

3.Close VS.

4.Delete the “.vs” directory beside their solution file.

5.Reopen VS.

..

thank you

You can re-enable the "Allow parallel project initialization" option after the issue was solved.

I tried to upgrade VS, reset VS settings, clear VS cache and everything people do conventionally but none of them solved this issue! At the end the mentioned solution worked for me magically.

Good luck

时光暖心i 2024-07-15 23:42:13

这通常在 Visual Studio 中称为禁用 Squiggly 或 Wavy 线。

您将如何使用 Visual studio 2013?

工具 -> 选项... -> 文本编辑器 -> C/C++ -> 高级 -> 禁用波形曲线True/False(在 IntelliSense 下)-> 按确定

This is generally called Disable Squiggly or Wavy lines in Visual Studio.

How you will do in Visual studio 2013?

TOOLS -> Options... -> Text Editor -> C/C++ -> Advanced -> Disable Squiggles: True/False (Under IntelliSense) -> Press OK

任性一次 2024-07-15 23:42:13

我知道这是一个老问题,并且有多种解决方案,但我以不同的方式解决了它。 我正在使用 VS2017 在我的 C# 代码上使用 Unity3D,突然 VS 决定在我打字时停止下划线错误。 但是,如果我关闭文件选项卡并重新打开,它会突然取消错误。

例如:

class A { 
public int x; 
s;
}

对于那个孤独的“s”符号显然应该给出错误。 但是,在我关闭并重新打开此文件选项卡之前,VS 不会给它添加下划线。

解决方案
复制整个 Unity 项目文件夹(基本上就像常规的 VS 解决方案文件夹)并使用新文件夹,该问题已消失。

I know its an old question, and with various solutions, but I have fixed it in different way. I'm working with Unity3D on my C# code using VS2017, when suddenly VS decides to stop underlining error while im typing. However, if I close the file tab and reopen, it suddenly undelines the error.

For example:

class A { 
public int x; 
s;
}

should obvsiouly give an error for that lonely 's' symbol. But, VS doesn't underline it until I close and reopen this file tab.

Solution:
Copied the entire Unity Project folder (which is like a regular VS Solution folder basically) and worked with the new folder, which issue was gone there.

情栀口红 2024-07-15 23:42:13

从解决方案中卸载并再次加载同一项目即可解决问题。 只需右键单击该项目并单击“卸载项目”即可。 卸载后,再次右键单击同一项目,然后单击“重新加载项目”。 错误突出显示将返回。

Unloading and loading same project again from the solution does the trick. Just right click on the project and click "Unload Project". Once unloaded, again right click the same project and click "Reload Project". Error highlighting will return.

噩梦成真你也成魔 2024-07-15 23:42:13

我在 2017 年遇到了同样的问题。有一个“禁用 intelisense”选项,请确保将其设置为 false。

I had the same issue with 2017. There was a 'disable intelisense' option, make sure that is set to false.

往日情怀 2024-07-15 23:42:13

对于每个想知道 2021 年的人......

在设置中搜索“C_Cpp.errorSquiggles”。

确保它对用户以及工作区处于活动状态。以及工作区
无需重新启动 Visual Studio。

For everyone wondering in 2021..

search for "C_Cpp.errorSquiggles" in the settings.

Make sure to have it active for the user, as well as the workspace.
No need to restart Visual Studio.

烦人精 2024-07-15 23:42:13

对我来说(VS 2019),在尝试了其他答案之后,将分析范围从“当前文档”设置为“打开文档”带回了丢失的错误标记 在此处输入图像描述

For me (VS 2019) , after trying the other answers also, setting the scope of analysis from "Current document" to Open document" brought back the missing error markers enter image description here

终难愈 2024-07-15 23:42:13

只需转到设置并搜索错误和错误波形图中的图像。 您可以看到错误曲线(已修改:工作区 - 现在您看不到它,因为我修改了它)。 只需点击“修改”,您就会看到禁用的选项。 如果您错误地禁用了它,只需启用它,您就可以在代码中再次看到红线错误。

Just go to settings and search for errors and Image in Error Squiggles. You can see the Error squiggles (Modified: Workspace - Right now you can't see it because I modified it). Just click on modified and you will see the disabled option. If by mistake you disabled it, just enable it and you can see the red line errors again in your code.

世界和平 2024-07-15 23:42:13

在最新版本中,检查同一项目文件夹中的 .vscode 文件夹。 其中会有一个setting.json 文件。 删除"C_Cpp.errorSquiggles": "Disabled"键值对。 重新启动 VS 代码。

In latest edition, check for .vscode folder in same project folder. There will be a setting.json file in that. Delete the key value pair of "C_Cpp.errorSquiggles": "Disabled". Restart the vs code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文