Enabling StyleCop.Analyzers on ASP.NET Core projects

非 Y 不嫁゛ 提交于 2019-12-06 06:25:29

My .NET Core version was apparently too old. After upgrading to the latest one it now works.

I was able to get this working with Visual Studio 2015 Update 3 using the following steps:

  1. Create a new project from the ASP.NET Core Application (.NET Core) template.
  2. Add the StyleCop.Analyzers build dependency as you described in your question.
  3. Build the project in Visual Studio and make sure the Error List output is set to Build + IntelliSense.

This is what I get:

I've confirmed that this also works for projects targeting net451 instead of netcoreapp1.0, as well as Class Library projects targeting netstandard1.X.

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