Visual Studio Code Intellisense停止在C#文件上工作 [英] Visual Studio Code Intellisense stopped to work on C# files

查看:111
本文介绍了Visual Studio Code Intellisense停止在C#文件上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到我无法使用ctrl + .快捷方式导入其他C#类.此快捷方式仅适用于其他文件类型,例如打字稿.

I realized that I can't use ctrl + . shortcut to import other C# classes. This shortcut works just fine for other file types like typescript.

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

I have uninstalled and installed back again. I also installed old version of VS code too. But nothing worked.

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

As I shown above, there is no import feature shows up when I do ctrl + .. Those are only the choices I was given. It's fine using without it but it's also annoying to import those files manually typed.

推荐答案

VS代码中的C#语言功能由名为OmniSharp的服务提供.

The C# language features in VS Code are provided by a service called OmniSharp .

您可以尝试的几件事:

  1. 打开命令面板( Ctrl + Shift + P )
  2. 类型Omnisharp: Restart OmniSharp

  1. Open the Command Palette (Ctrl + Shift + P)
  2. Type Omnisharp: Restart OmniSharp

B)查看OmniSharp日志

  1. 打开输出面板( Ctrl + ')
  2. 从下拉列表中选择OmniSharp Log)

  1. Open Output Panel (Ctrl + ')
  2. Select OmniSharp Log from the dropdown)

C)启用OmniSharp日志记录

  1. 启用C#调试器记录在Omnisharp中

  1. Enabling C# debugger logging in Omnisharp

"configurations": [
    {
        "...": "...",
        "logging": {
            "engineLogging": true
        }
    },
    { "...": "..." }
]

这篇关于Visual Studio Code Intellisense停止在C#文件上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆