How to fix 'NonComVisibleBaseClass was detected'

How to fix "NonComVisibleBaseClass was detected" in Visual Studio

Selecting Debug=>Windows=>Exception Settings

Selecting Managed Debugging Assistants => Uncheck the NonComVisibleBaseClass

For old Visual Studio

Navigate to Debug->Exceptions, then expand the "Managed Debugging Assistants"

Next, Uncheck the NonComVisibleBaseClass thrown option.

Finally, Click Ok