Visual Studio Code IntelliSense 建议不会自动弹出 [英] Visual Studio Code IntelliSense suggestions don't pop up automatically

查看:32
本文介绍了Visual Studio Code IntelliSense 建议不会自动弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照 、VSCode支持 C# IntelliSense.

我不认为这是错误,也许我在安装 VSCode 时做错了什么.如何解决这个问题?

解决方案

OmniSharp 不知道您的项目文件在哪里.在您的屏幕截图中,左侧边栏显示您尚未打开文件夹".OmniSharp 将在您当前打开的文件夹中查找项目文件.

  1. 添加您的文件夹.文件 > 打开文件夹...
  2. 确保您有一个项目文件(project.json 或您的 *.csproj 文件).

这应该足以让 OmniSharp 开始为您提供智能感知.

I followed the install instructions in https://code.visualstudio.com, but when I write C# code, the IntelliSense suggestions don't pop up automatically, so I must trigger it by using shortcut Command+Space, meanwhile, the suggestions are just from the code I wrote.

Here is the screen capture below:

I checked in https://code.visualstudio.com/Docs/editingevolved, VSCode do support C# IntelliSense.

I don't think it is bug, maybe I did something wrong when installing VSCode. How to solve this problem?

解决方案

OmniSharp doesn't know where your project files are. In your screenshot, the left sidebar says "You have not opened a folder". OmniSharp will look in your currently opened folder for project files.

  1. Add your folder. File > Open Folder...
  2. Make sure you have a project file (either project.json or your *.csproj files).

This should be enough for OmniSharp to start providing you Intellisense.

这篇关于Visual Studio Code IntelliSense 建议不会自动弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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