我今天早上已经更新了Visual Studio Code,在完成更新后,它会自动重新启动。当我右键单击任何变量,方法,类名时,没有任何选择(即“转到定义”,“重命名符号”)。搜索了一段时间后,我发现打开视图>输出可能有助于我了解发生了什么。并且我发现Omniserver没有运行,并且下面是我在“输出”窗口中得到的错误。
Starting OmniSharp server at 4/17/2019, 2:42:04 PM Target: d:\projects\Division\Division.sln OmniSharp server started. Path: C:\Users\Unity3\.vscode\extensions\ms-vscode.csharp-1.19.0\.omnisharp\1.32.18\OmniSharp.exe PID: 7508 System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. File name: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.b__1() at OmniSharp.HostHelpers.Start(Func`1 action) === Pre-bind state information === LOG: DisplayName = netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (Fully-specified) LOG: Appbase = file:///C:/Users/Unity3/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/ LOG: Initial PrivatePath = NULL Calling assembly : Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Users\Unity3\.vscode\extensions\ms-vscode.csharp-1.19.0\.omnisharp\1.32.18\OmniSharp.exe.Config LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Post-policy reference: netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 LOG: Attempting download of new URL file:///C:/Users/Unity3/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/netstandard.DLL. LOG: Attempting download of new URL file:///C:/Users/Unity3/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/netstandard/netstandard.DLL. LOG: Attempting download of new URL file:///C:/Users/Unity3/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/netstandard.EXE. LOG: Attempting download of new URL file:///C:/Users/Unity3/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/netstandard/netstandard.EXE. [ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).
小智.. 5
更新VSCode后,我对Omnisharp v1.19.0有相同的问题。我最终通过将C#扩展回滚到对我有用的早期版本(1.18.0)来解决此问题。右键单击扩展名,然后选择“安装其他版本...”希望对您有所帮助!
更新VSCode后,我对Omnisharp v1.19.0有相同的问题。我最终通过将C#扩展回滚到对我有用的早期版本(1.18.0)来解决此问题。右键单击扩展名,然后选择“安装其他版本...”希望对您有所帮助!