gpt4 book ai didi

c# - MacOS OmniSharp 在 vscode 超时错误

转载 作者:太空宇宙 更新时间:2023-11-03 15:03:54 26 4
gpt4 key购买 nike

今天早上我开始使用 vscode(1.13.1) 并想用 C# (dotnet core) 编写代码。但是我得到了同样的错误,你可以在谷歌中找到,但在当前版本的 OmniSharp 中。 Omnisharp 正确地看到了我的项目,但没有启动。在 OmniaSharp 日志中是这样的:

OmniSharp server started wth Mono
Path: /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.10.0/bin/run
PID: 1351

OmniSharp: -s /Users/petrtomasek/Projects/CestujnakoleNew --hostPID 1267 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/petrtomasek/Projects/CestujnakoleNew' on host 1267."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
Initializing in /Users/petrtomasek/Projects/CestujnakoleNew
[info]: OmniSharp.DotNet.DotNetProjectSystem
Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
MSBUILD_EXE_PATH environment variable set to /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.10.0/bin/omnisharp/msbuild/MSBuild.dll
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
MSBuildExtensionsPath environment variable set to /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.10.0/bin/omnisharp/msbuild
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
MSBuild will use local OmniSharp installation.
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
No solution files found in '/Users/petrtomasek/Projects/CestujnakoleNew'
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
Loading project: /Users/petrtomasek/Projects/CestujnakoleNew/CestujnakoleNew.csproj
Discovered Mono file path: /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
Resolved symbolic link for Mono file path: /Library/Frameworks/Mono.framework/Versions/5.2.0/bin/mono-sgen64
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

我尝试重启 mac,重新安装 vscode、omnisharp,现在升级到 5.2。预览版。没有任何帮助。仍然是同样的错误。 Intellisense、转到定义等也不起作用。

还有什么我可以尝试做的吗?

感谢您的宝贵时间。

编辑

vscode的c#扩展版本是最新的(1.10.0)

最佳答案

使用以下代码行更新您的用户设置或工作区设置

{
"omnisharp.projectLoadTimeout": 600
}

默认 60 以外的任何数字都应该没问题。

关于c# - MacOS OmniSharp 在 vscode 超时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44698658/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com