Search code examples
visual-studio-2010visual-studiof#smart-tags

VS2010 F# Smart Tag to add open import declarations


EDITS corrected terminology from Intellisense to Smart Tag

OK, I readily admit that Intellisense/Smart Tags have spoiled me. I've grown accustomed C# in Visual Studio notifying you to add using import declarations when typing in a class name for a namespace that has not yet been imported. You get the nice little colored underscore which you can hover over or do or do ctrl-dot to get the context menu for adding the import or fully qualifying the namespace.

I've just started playing with F# in VS2010, and I'm not getting that helpful reminder when I reference a system library class. I type WebRequest and the Smart Tag doesn't kick in to tell me I need to add an open System.Net declaration.

Am I missing something? Is there a VS extension available that beefs up F# Smart Tagging?


Solution

  • You're confusing two features here. Intellisense is the feature that helps complete statements and expressions as you type. The squiggle that appears over WebRequest to tell you that you need to add a using / open for System.Net is a smart tag.

    F# unfortunately does not implement this particular smart tag in Visual Studio 2010. I don't know of any extension which provides this behavior either.