VS2010 F# 智能标记添加开放导入声明

发布于 2024-09-07 09:40:26 字数 388 浏览 2 评论 0原文

编辑将术语从智能感知更正为智能标签

好吧,我承认智能感知/智能标签宠坏了我。我已经习惯了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无尽的现实 2024-09-14 09:40:26

您在这里混淆了两个功能。智能感知功能可帮助您在键入时完成语句和表达式。 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 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文