C# how to treat Resharper errors as compile errors in msvs 2010?

南笙酒味 提交于 2019-12-07 00:51:30

问题


I want to treat resharper 5.0 error "Possible NullReference Exception" as MSVS 2010 compile error. Is it possible?


回答1:


Update, since it seems people are still finding this answer:

This, or something very much like it, is possible today with e.g. StyleCop Analyzers. There's a whole bunch of analyzer tools which you can plug into the .NET compiler platform - I recommend checking out the DotNetAnalyzers GitHub org, as well as (of course) the home of the .NET compiler platform itself.


Original answer:

You can edit the type of warning that will be issued by R# under ReSharper/Options/Code Inspection/Inspection Severity.

However, this will not necessary mean that the compiler throws errors - R# isn't responsible for actually compiling the code when you hit "Build" in your project.



来源:https://stackoverflow.com/questions/3361495/c-sharp-how-to-treat-resharper-errors-as-compile-errors-in-msvs-2010

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