问题
How to add support for Roslyn Analyzers(.ruleset) in Visual Studio 2017 .NET Core Projects?
In "project.json" it is configured by using buildOptions
:
"buildOptions": {
"additionalArguments": [ "/ruleset:rules.ruleset" ]
},
回答1:
Just edit the .csproj file and add:
<PropertyGroup><CodeAnalysisRuleSet>rules.ruleset</CodeAnalysisRuleSet></PropertyGroup>
Note: path is relative to a .csproj file.
Original post here: https://www.linkedin.com/pulse/supporting-roslyn-analyzers-visual-studio-2017-net-core-jake-brandt
来源:https://stackoverflow.com/questions/43227639/supporting-roslyn-analyzers-ruleset-in-visual-studio-2017-net-core-projects