IFluentInterface icon indicating copy to clipboard operation
IFluentInterface copied to clipboard

IFluentInterface no longer appears to work in recent versions of Visual Studio (e. g. 15.5.2)

Open stakx opened this issue 6 years ago • 1 comments

TL;DR: This is likely caused by a Roslyn bug; see https://github.com/dotnet/roslyn/issues/4434.


I've noticed for a while now that letting an interface inherit from IFluentInterface no longer appears to result in System.Object members being hidden in IntelliSense in recent versions of Visual Studio.

For example, here's a screenshot of a solution in Visual Studio Community 2017 (version 15.5.2) using Moq (which gets imported in the standard fashion, i. e. as a NuGet package):

ifluentinterface-code

My IntelliSense options are as follows:

ifluentinterface-options

Visual Studio's support for [EditorBrowsable] isn't generally broken—other members are still properly hidden, e. g.:

  • Moq.Mock.Expect (method marked with EditorBrowsableState.Never)
  • Moq.Internals.InterfaceProxy (type marked with EditorBrowsableState.Never)
  • Moq.LookupOrFallbackDefaultValueProvider (type marked with EditorBrowsableState.Advanced)

Can you confirm that this is a problem with current versions of Visual Studio?

stakx avatar Dec 27 '17 10:12 stakx