Supporting Roslyn Analyzers(.ruleset) in Visual Studio 2017 .NET Core Projects

梦想与她 提交于 2019-12-01 23:29:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!