0

我看到在在的csproj VS 2017年企业以下,PROJECT1,这是正在兴建的.Net 4.5.2:VS 2017年 - DotNetAnalyzers警告没有显示在生成输出,而不是代码分析

18>------ Rebuild All started: Project: Project1, Configuration: Debug Any CPU ------ 
18>C:\git\27844-2-StyleCop\company\Class1.cs(26,31,26,47): warning CS0169: The field 'Class1.field' is never used 
18>C:\git\27844-2-StyleCop\company\Class2.cs(31,48,31,69): warning SA1214: Readonly fields must appear before non-readonly fields 
18>C:\git\27844-2-StyleCop\company\Interface1.cs(9,45,9,69): warning SA1127: Generic type constraints must be on their own line 
18> Project1 -> C:\git\27844-2-StyleCop\company\Project1\Project1\bin\Debug\Project1.dll 
18> Running Code Analysis... 
18> Code Analysis Complete -- 0 error(s), 0 warning(s) 

显然有3个警告是由内置的C#DotNetAnalyzers和版本1.0.2的StyleCop.Analyzers组合拾取的。我不知道是为什么:

18> Code Analysis Complete - 0 error(s), 0 warning(s) 

不节:

18> Code Analysis Complete - 0 error(s), 3 warning(s) 

为什么没有这些警告(或错误为此事,因为我已经看到这种情况发生与处理规则作为误差)出现在代码分析日志文件,Project1.dll.CodeAnalysisLog.xml

我已经试过:

  • 关闭/ O ñEnable Code Analysis on Build在项目属性
  • 关闭/开启Treat Warnings as Errors在项目属性
  • 确保有项目属性
  • 确保我使用的规则集的配置/平台,我上没有运行Suppress warnings建立在
  • 清洗/重建
  • 该项目明确运行代码分析

难道我做错了什么?

回答