Visual Studio Code Intellisense停止在C#文件上工作 [英] Visual Studio Code Intellisense stopped to work on C# files
问题描述
我意识到我无法使用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 .
您可以尝试的几件事:
- 打开命令面板( Ctrl + Shift + P )
-
类型
Omnisharp: Restart OmniSharp
- Open the Command Palette (Ctrl + Shift + P)
Type
Omnisharp: Restart OmniSharp
B)查看OmniSharp日志
- 打开输出面板( Ctrl + ')
-
从下拉列表中选择
OmniSharp Log
)
- Open Output Panel (Ctrl + ')
Select
OmniSharp Log
from the dropdown)
C)启用OmniSharp日志记录
-
启用C#调试器记录在Omnisharp中
Enabling C# debugger logging in Omnisharp
"configurations": [
{
"...": "...",
"logging": {
"engineLogging": true
}
},
{ "...": "..." }
]
这篇关于Visual Studio Code Intellisense停止在C#文件上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!