如何告诉 Visual Studio 不要多次显示相同的警告?
几周前,我开始注意到我的 VS 显示了一些警告两次。两个显示的警告位于同一行/列。它与错误列表中显示两次的警告完全相同。
例如:
我在代码中添加了以下行,这样我就不会忘记它,因为整个解决方案有相当多的 TODO 标记:
#warning TODO: Refactoring needed
当我点击“重建解决方案”时,VS 最终显示相同的警告两次。一次是警告 1,再次是警告 10。
我尝试将 VS 设置恢复为默认设置,并且还重新安装了 VS。警告仍然显示两次。
我还没有找到任何解决方案,我想也许我可以问问是否有人以前见过这个问题。也许有人可以告诉我如何解决这个问题,因为它开始让我感到非常不安。
A few weeks ago I started noticing that my VS displays some warnings twice. Same Line/Column for both displayed warnings. It's exactly the same warning which is displayed twice within the Error List.
For example:
I've added the following line within my code such that I don't forget it because the whole solution has quite a few TODO marks:
#warning TODO: Refactoring needed
When I hit "Rebuild solution" VS ends up displaying the same warning twice. Once as warning 1 and again as number 10.
I've tried reverting VS settings to default and I've also reinstalled VS. Still the warning is displayed twice.
I haven't found any solution yet and I thought maybe I ask if someone has seen this problem before. Maybe someone can tell me how to resolve this problem since it start to really upset me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该代码被编译多次。每一次传递都会产生该警告,就像每一次传递都会产生一些代码一样。检查您实际上没有多个同名文件或通过另一个项目中的链接引用的同一文件。
The code is being compiled more than once. Each pass is going to produce that warning, just as each pass produces some code. Check that you don't actually have multiple files with the same name or the same file referenced via link in another project.