VS2019中ASP.NET Core 2.2项目中的分析器警告

编程入门 行业动态 更新时间:2024-10-26 23:31:15
本文介绍了VS2019中ASP.NET Core 2.2项目中的分析器警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我基本上是从默认Razor Pages模板创建的默认ASP.NET Core 2.2项目.

I have what is basically a default ASP.NET Core 2.2 project created from the default Razor Pages templates.

现在,在解决方案资源管理器中->依赖项中有一个名为分析器"的节点.

Now, in solution explorer -> Dependencies there is a node called "Analyzers".

首先,起初我不知道它是干什么的.我想我现在知道了,但是还是有点模糊.

First of all, at first I had no idea what it was for. I think I know now but it's still kind of fuzzy.

第二,为什么它带有警告图标?与其子节点相同.

Secondly, why does it have a warning icon? Same with its child nodes.

注意:我不在"NuGet"节点下,所以这不是有关缺少依赖项或类似问题的问题.

Note: I'm not under the "NuGet" node, so this is not a question about missing dependencies or anything like that.

第三;如果只是为了让我感到困惑,为什么这个功能"在那里?!

And thirdly; why is this "feature" there if it's only there to confuse me?!

推荐答案

我遇到了同样的问题.以管理员权限重新启动Visual Studio之后,分析器标题开始显示名称而不是路径,并且警告"消失了.

I had the same issue. After I restarted Visual Studio with Administrator privileges, Analyzers titles started to show the name instead of the path and the "warning" is gone.

编辑

有一个 GiHub问题.

一个临时解决方法是关闭解决方案并删除.vs文件夹中的.dtbcache文件.

A temporary fix would be to close the solution and to delete .dtbcache file in the .vs folder.

更多推荐

VS2019中ASP.NET Core 2.2项目中的分析器警告

本文发布于:2023-11-15 12:28:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1594444.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分析器   项目   ASP   NET   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!