Reputation: 27743
How to hide the ...
that appeared everywhere in Visual Studio 16.10?
e.g.
It appears for unused using
s, expression value not assigned, and many more.
[I'm NOT asking how to turn off graying out of unused using
s.]
Upvotes: 1
Views: 287
Reputation: 311335
Dots like that, along with squiggly underlines, are coming from diagnostics issued by the compiler and analyzers.
Each diagnostic has its own identifier code such as CS1234
or IDE1234
, etc.
You can configure the severity of each of these as described here:
https://learn.microsoft.com/en-us/visualstudio/code-quality/use-roslyn-analyzers?view=vs-2019
The easiest way is to add/edit your .editorconfig
file and put the following in:
dotnet_diagnostic.<rule ID>.severity = <severity>
Where <rule ID>
is the diagnostic ID, and <severity>
is one of none
, silent
, suggestion
, warning
or error
.
This gives you very fine grained control over these kinds of tips in your solution.
If you put the .editorconfig
file in the root of your repo, it will apply to all projects in the solution.
Here's an example of using the lightbulb menu (Ctrl+.) to configure the severity of a diagnostic with code VSTHRD002:
There's also a section "Suppress ..." which lets you suppress a specific instance of the diagnostic, in contrast to changing the severity which applies across a broader scope.
Note you have have multiple .editorconfig
files. For example, if all your unit tests are under a test
folder, you could drop an .editorconfig
file in there that has more relaxed rules.
Upvotes: 3