简体   繁体   English

Visual Studio 2022 Intellisense Complete Word function 问题?

[英]Issue with Visual Studio 2022 Intellisense Complete Word function?

  1. Create an ASP.NET Core project.创建一个 ASP.NET 核心项目。 I created it using the new Empty template using .NET 6 but it shouldn't matter.我使用 .NET 6 使用新的 Empty 模板创建了它,但这无关紧要。 I then compiled the app.然后我编译了应用程序。
  2. In program.cs, locate the line where the builder object is instatiated.在 program.cs 中,找到构建器 object 所在的行。 Add it if it is not found.如果没有找到,请添加。
var builder = WebApplication.CreateBuilder(args);
  1. After the above added line, type the incomplete following line of code and then, with your cursor at end of the unfinished line, click the shortcut control + space to execute the menu command Edit -> Intellisense -> Complete Word在上面添加的行之后,键入未完成的以下代码行,然后在未完成的行末尾输入您的 cursor,单击快捷方式control + space执行菜单命令Edit -> Intellisense -> Complete Word
builder.Services.AddS

I expected the intellisense to pop up and pre-select "AddScoped" in the list.我希望 intellisense 弹出并在列表中预先选择“AddScoped”。 But it just sat there.但它只是坐在那里。

Intellise generally works but not always. Intellise 通常有效,但并非总是有效。 This is one example where it doesn't, at least for me.这是一个没有的例子,至少对我而言。

Does it work for you?对你起作用吗? Should it work as I described?它应该像我描述的那样工作吗? I'm thinking so...我是这么想的...

I'm using the following version if VS:如果 VS,我使用以下版本:

Microsoft Visual Studio Professional 2022
Version 17.4.0
VisualStudio.17.Release/17.4.0+33103.184

I was having the same issue.我有同样的问题。 Used Visual Studio Installer and executed a 'repair'.使用 Visual Studio 安装程序并执行“修复”。 Everything works now!现在一切正常!

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM