1

Reshaper does not recognize my type alias "DataType":

Type 'DataType' is not defined.

enter image description here

However, "DataType" is defined in my project settings and the program works correctly:

enter image description here

=> How can I suppress that specific warning (without disabling other, possibly justified data type warnings)?

I tried to

A. Wrap the corresponding lines with

#Disable Warning BC30002
...
#Enable Warning BC30002

B. Put

'ReSharper disable All

at top of the file.

C. #Region "No Resharper" ...
#End Region

D. <SuppressMessage("ReSharper", "All")>

None of them worked so far. I would expect a suppression option in the quick fix suggestions. But there is none.

I use VisualStudio 15.7.3 and Resharper 2018.1.2

Related questions:

Stefan
  • 10,010
  • 7
  • 61
  • 117
  • Here's my opinion. I think the reason why ReSharper isn't using this as a valid data type alias declaration is that you're abusing a feature that is meant to do something else. The whole UI mentions "namespaces", not "using directives". As such it isn't surprising that ReSharper isn't considering these *namespaces* as alias declarations. For sure, you should tell Jetbrains about this, but I don't think there are any *supported* and *good* ways to get ReSharper to stop complaining. – Lasse V. Karlsen Jun 12 '18 at 10:01
  • If you disable ReSharper via Tools | Options | ReSharper Ultimate | Suspend now - will the squiggle still appear in the editor? I am asking about that since the light bulb and the quick fix pop-up definitely comes from Roslyn, not ReSharper. ReSharper does not show the light bulb in the middle of the editor, just on or next to the gutter mark. – Alexander Kurakin Oct 22 '18 at 16:59

0 Answers0