简体   繁体   English

Visual Studio Code 未显示建议

[英]Visual Studio Code not showing suggestions

I'm following a Blazor tutorial in Visual Studio Code.我正在关注 Visual Studio Code 中的 Blazor 教程。 However I don't get VS Code suggestions such as missing assemblies (when my context file inherits from DbContext of Entity Framework Core) or if I have a public interface, I don't get the "Implement interface" option.但是,我没有收到 VS Code 建议,例如缺少程序集(当我的上下文文件继承自 Entity Framework Core 的DbContext时),或者如果我有一个公共接口,我没有得到“实现接口”选项。 The bulb does not showing up in any place, so I have to write all the code manually.灯泡没有出现在任何地方,所以我必须手动编写所有代码。

I tried to uninstall and reinstall VS Code, deleting the preferences folder first.我尝试卸载并重新安装 VS Code,首先删除首选项文件夹。 Also, restarting Omnisharp but nothing do the trick.此外,重新启动 Omnisharp 但无济于事。 My sln file is recognized, however.但是,我的 sln 文件已被识别。

不显示建议

Environment:环境:

  • VS Code 1.54.1 (system setup) VS Code 1.54.1(系统设置)
  • .NET Core 5.1 .NET 核心5.1

Extensions:扩展:

  • Activitus Bar活动酒吧
  • Blazor Snippets Blazor 片段
  • C# (Omnisharp) C#(Omnisharp)
  • C# Extensions C# 扩展
  • C# XML Documentation Comments C# XML 文档注释
  • Razor+剃须刀+
  • Path Intellisense路径智能感知
  • Nuget Package Manager Nuget Package 经理
  • dotnet点网
  • Dotnet Core Essentials (DCE) Dotnet 核心基础 (DCE)

Any suggestions?有什么建议么? Or is it better to go back to Visual Studio?还是将 go 返回 Visual Studio 更好?

You can try to reinstall the Nuget package with the NugetGallery extension.您可以尝试使用 NugetGallery 扩展重新安装 Nuget package。 If it has not worked try to type dotnet restore in Command Prompt at the project directory.如果它不起作用,请尝试在项目目录的命令提示符中键入dotnet restore Checking the dependencies of the project may resolve the problem.检查项目的依赖关系可能会解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 没有为其中一个项目显示 C# 的代码建议 - Visual Studio not showing code suggestions for C# for one of the projects 在 Visual Studio 中显示代码警告 - Showing code Warnings in Visual Studio Visual Studio代码IntelliSense建议不会自动弹出 - Visual Studio Code IntelliSense suggestions don't pop up automatically 代码映射Visual Studio不显示循环引用 - Code Map Visual Studio not showing circular references MS Visual Studio 2019 C# 智能感知建议未显示,但按 Tab 键时自动完成工作正常 - MS Visual Studio 2019 C# intellisense suggestions not showing up, but autocomplete when pressing tab is working 如何通过使代码变暗而不是 3 个点来恢复 Visual Studio 的旧方式提醒建议? - How to get back Visual Studio's old way of alerting of suggestions by darkening code instead of by 3 dots? Visual Studio 2017社区:类的“使用”建议 - Visual Studio 2017 Community: “Using” suggestions for classes 建议栏上未显示 Visual Studio 自定义片段 - Visual studio customized snippet not shown on suggestions bar 为什么 Visual Studio 不显示正确的自动完成建议 - Why is Visual Studio not displaying correct autoCompletion suggestions Visual Studio通过IntelliSense更改建议的优先级设置 - Visual Studio change priority settings of suggestions by IntelliSense
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM