VS2010 F# 智能标记添加开放导入声明
编辑将术语从智能感知更正为智能标签
好吧,我承认智能感知/智能标签宠坏了我。我已经习惯了 Visual Studio 中的 C# 通知您在为尚未导入的命名空间输入类名时添加 using 导入声明。您会得到漂亮的小彩色下划线,您可以将鼠标悬停在其上或执行 ctrl-dot 来获取用于添加导入或完全限定名称空间的上下文菜单。
我刚刚开始在 VS2010 中使用 F#,当我引用系统库类时,我没有得到有用的提醒。我输入 WebRequest,但智能标记没有启动告诉我需要添加 open System.Net 声明。
我错过了什么吗?是否有可用的 VS 扩展可以增强 F# 智能标记?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在这里混淆了两个功能。智能感知功能可帮助您在键入时完成语句和表达式。
WebRequest
上出现的波浪线告诉您需要为System.Net
添加 using / open ,它是一个智能标记。不幸的是,F# 没有在 Visual Studio 2010 中实现这个特定的智能标记。我也不知道有任何扩展可以提供这种行为。
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 forSystem.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.