Cannot run Code Analysis Analyzer in Visual Studio 2015
I installed Microsoft.CodeAnalysis.CSharp.FxCopAnalyzers from nuget into a project.
The project it is installed into is an existing project, building against Framework 4.5.1.
Code Analysis is Enabled on the project...
... and I see CA warnings in the Build out put and the error window as expected, so I believe the ruleset to be valid.
However I can't seem to see out put from the analyzer, and I can't seem to find what this icon means in the documentation:
Right clicking on the Analyzers node and selecting Open Active Rule Set
I can see the CA rules that the FxCop analyzer should be using:
Checking the location of the DLL, it's there in the nuget folder as expected:
This package hasn't been updated since January. I guess it's been replaced by
Microsoft.CodeAnalysis.FxCopAnalyzers
You can right click on the Analyzers node and select Open Active Rule Set
to see all of the analyzers enabled on your project. You can then modify this list and it will save those changes back to your project. If an analyzer isn't firing, then maybe it isn't enabled in your project.
If there is an anlayzer DLL that is missing, you can add it from the Analyzer node right click menu or via nuget packages (depending on where it comes from).
I have a post on my blog with more information on using analyzers in your project: https://johnkoerner.com/csharp/using-analyzers-in-your-projects/
链接地址: http://www.djcxy.com/p/87582.html上一篇: 如何在离子软键盘插件中添加下一步按钮