Intellisense无法自动运行VSCode
我刚刚下载了Visual Studio Code,但是我的Intellisense无法自动运行.
I just downloaded Visual Studio Code and my Intellisense is not automatically working.
控制此设置的两个设置似乎正确设置:
The two settings that control this seem to be set correctly:
"editor.quickSuggestions": true,
"editor.suggestOnTriggerCharacters": true,
当我开始键入并按"CTRL +空格键"时,确实会得到一个Intellisense菜单,但这会给我列出所有内容的列表,而不是我的对象专用的列表.
I do get an Intellisense menu when i start typing and press "CTRL + Space", but this gives me a list of everything and not things specifically for my object.
我在做什么错了?
Visual Studio Code的更高级的编辑功能(IntelliSense,重构工具等)仅在C#文件中有效,前提是您拥有 project.json 知道的code>文件或
*.sln
文件.使用 *.sln
文件或项目打开文件夹(即,打开 File 菜单,然后单击 Open Folder ... ).json
和VSCode将尝试在文件夹中查找所有项目/解决方案文件.如果有多个项目,则可能需要从状态栏右侧(窗口底部)的项目按钮中选择一个.
Visual Studio Code's more advanced editing features (IntelliSense, refactoring tools, etc.) only work in C# files if you have a project.json
file or *.sln
file that VSCode is aware of. Open the folder (i.e. open the File menu and click Open Folder...) with the *.sln
file or project.json
and VSCode will attempt to find all project/solution files in the folder. If there are multiple projects, you may need to select one from the projects button on the right side of the status bar (bottom of the window).
从 VSCode网站:
- 选择一个
project.json
文件会打开一个DNX项目,而VSCode将加载该项目以及引用的项目- 选择一个
*.sln
文件正在打开一个MSBuild项目.它将加载引用的*.csproj
-projects和同级或后代的project.json
-file,但不加载从解决方案文件引用的其他项目文件.- 选择一个
folder
将使VSCode扫描*.sln
和project.json
文件,而VSCode将尝试全部加载它们./li>
- Selecting a
project.json
-file is opening a DNX-project and VSCode will load that project plus the referenced projects- Selecting a
*.sln
-file is opening a MSBuild-project. It will load the referenced*.csproj
-projects and sibling or descendantproject.json
-files but no other project files that are referenced from the solution file.- Selecting a
folder
will make VSCode scan for*.sln
andproject.json
files and VSCode will attempt to load them all.