开发者

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

开发者 https://www.devze.com 2023-01-09 14:58 出处:网络
I want to treat resharper 5.0 error \"Possible NullReference Exception\" as MSVS 开发者_StackOverflow社区2010 compile error. Is it possible?Update, since it seems people are still finding this answer:

I want to treat resharper 5.0 error "Possible NullReference Exception" as MSVS 开发者_StackOverflow社区2010 compile error. Is it possible?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消