c# - Visual Studio Code Intellisense 停止处理 C# 文件

标签 c# visual-studio-code omnisharp

我意识到我不能使用 ctrl + .导入其他的快捷方式 C#类。此快捷方式适用于 typescript 等其他文件类型。

我已经卸载并重新安装了。我也安装了旧版本的 VS 代码。但没有任何效果。

enter image description here
如上所示,当我执行 ctrl + . 时没有显示导入功能。 .这些只是我得到的选择。没有它也可以使用,但导入手动输入的文件也很烦人。

最佳答案

VS Code 中的 C# 语言功能由名为 OmniSharp 的服务提供。

您可以尝试以下几件事:

A) 重启 OmniSharp

  • 打开命令面板 (Ctrl + Shift + P)
  • 类型 Omnisharp: Restart OmniSharp
    Command Palette > OmniSharp

  • B) 查看 OmniSharp 日志
  • 打开输出面板 (Ctrl + ')
  • 选择 OmniSharp Log从下拉菜单)

    Output Panel > OmniSharp

  • C) 启用 OmniSharp 日志记录
  • Enabling C# debugger logging在 Omnisharp
    "configurations": [
        {
            "...": "...",
            "logging": {
                "engineLogging": true
            }
        },
        { "...": "..." }
    ]
    
  • 关于c# - Visual Studio Code Intellisense 停止处理 C# 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48527394/

    相关文章:

    c# - 来自 PCL 的 Xamarin WebAPI 调用

    为索引 0 插入优化的 C# 集合?

    c# - 如何使用 webrequest 使用 Json 数组绘制折线图

    visual-studio-code - VS Code - 键盘滚动后将光标移动到当前屏幕中心的键盘快捷键

    linux - 当没有 Internet 连接时,如何将扩展安装到作为 Remote-SSH 远程端的 VS Code 服务器中?

    c# - 如何让 VSCode 使用 C# 7 而不是 C# 4?

    c# - 使用 Xamarin Android 时出现异常

    php - 如何使用VSCode远程编辑网站文件?

    c# - 如何更改 C# 错误提示的语言?

    c# - VS代码。 OmniSharp 不加载正确的解决方案