简体   繁体   English

c# omnisharp intellisense 不适用于 vscode 中的 net 5.0(Windows 10)

[英]c# omnisharp intellisense not working with net 5.0 in vscode (windows 10)

vscode version: 1.54.2 (user setup) vscode 版本:1.54.2(用户设置)

visual studio version: 16.8.6视觉工作室版本:16.8.6

c# omniSharp version: 1.23.9 c# omniSharp 版本:1.23.9

intellisense is not working in .net5 and also when trying to generate assets for build and debug this error pops up: intellisense 在 .net5 中不起作用,并且在尝试生成用于构建和调试的资产时,会弹出此错误:

Error: Unable to generate assets to build and debug.错误:无法生成要构建和调试的资产。 OmniSharp server is not running. OmniSharp 服务器未运行。

Try changing your Omnisharp Project Load Timeout as the server might not able to start before the load Timeout so it just cancels the server startup process.尝试更改您的 Omnisharp 项目加载超时,因为服务器可能无法在加载超时之前启动,因此它只会取消服务器启动过程。

I've changed mine to 10000 to be able to properly wait for the server to startup before automatically stoping the operation and that seems to fix the problem for me.我已将我的更改为 10000,以便能够在自动停止操作之前正确等待服务器启动,这似乎解决了我的问题。

You need to have current .net, as well as current sdk.您需要拥有当前的 .net 以及当前的 sdk。 You will need to download these online.您需要在线下载这些内容。 Then, in vs.code go to file > preferences > settings and search for settings.json.然后,在 vs.code go 中到文件 > 首选项 > 设置并搜索 settings.json。 This will give you the settings for your vs.code.这将为您提供 vs.code 的设置。 delete all present omnisharp settings.删除所有现有的omnisharp 设置。 reinstall current c# in extensions.在扩展中重新安装当前的 c#。 You may have to restart for settings to implement.您可能需要重新启动设置才能实施。 Dont forget CTRL + SHIFT + P, where you can search ommnisharp and restart.不要忘记 CTRL + SHIFT + P,您可以在其中搜索 ommnisharp 并重新启动。

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

相关问题 vscode omnisharp intellisense 不适用于 dotnet 5.0(目标 net5.0) - vscode omnisharp intellisense not working with dotnet 5.0 (target net5.0) Intellisense 在 VSCode 中不起作用 - OmniSharp 错误 - Intellisense not working in VSCode - OmniSharp Error 加载统一 C# 脚本时,如何修复 VSCode 中的 IntelliSense 不起作用和 OmniSharp 错误消息? - How do I to fix IntelliSense in VSCode not working and OmniSharp error messages when loading unity C# scripts? C# 和 VSCode - OmniSharp 不适用于多项目工作区 - C# & VSCode - OmniSharp not working for multi project workspace VSCode OmniSharp / C#intellisense没有看到Ionide / F#lib模块/命名空间 - VSCode OmniSharp/C# intellisense does not see Ionide/F# lib modules/namespaces VScode 中的 Unity intellisense 不工作,Omnisharp 给出多个错误和警告 - Unity intellisense in VScode not working and Omnisharp is giving multiple errors and warnings c# Intellisense for unity 在 vscode 中不起作用 - c# Intellisense for unity is not working in vscode Omnisharp C# 无法在带有 Unity 的 Ubuntu 22.04 上运行 - Omnisharp C# Not Working on Ubuntu 22.04 with Unity VSCode 智能感知不适用于解决方案下的一个 c# 项目 - VSCode intellisense not working for one c# project under the solution 当 select 第二个项目时,在 VsCode C# (Omnisharp) 中出现错误 - Getting error in VsCode C# (Omnisharp) when select the second project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM