Issue
I've been trying to get rid off IDE
warnings for a Unity project:
While csc.rsp
works for CS
warnings, it doesn't for IDE
warnings:
-nowarn:CS0649,IDE0063,IDE0071
Question:
How to remove IDE warnings for a Unity project?
Solution
Here's the simplest and most straightforward approach:
(for suppressing warnings solution-wide)
- no need to use
CodeAnalysisRuleSet
- no need to use
AssetPostprocessor
norProjectFilesGenerator
- both being error-prone and unfriendly as one can be
Instead,
.editorconfig
Visual Studio 2019 is smart enough to pick it up and apply it to all projects:
[*.{cs,vb}]
# IDE0051 Private member is unused.
dotnet_diagnostic.IDE0051.severity = none
If you need more granularity, add specific .editorconfig
files at projects that needs different rules.
Of course you lose the GUI editing aspect but it isn't really a stopper in my case.
Answered By - aybe Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.