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建立在
  • 清洗/重建
  • 該項目明確運行代碼分析

難道我做錯了什麼?

回答