当前位置:  开发笔记 > 编程语言 > 正文

OmniSharp服务器抛出System.IO.FileNotFoundException:打开Unity项目时无法加载文件或程序集'netstandard

如何解决《OmniSharp服务器抛出System.IO.FileNotFoundException:打开Unity项目时无法加载文件或程序集'netstandard》经验,为你挑选了1个好方法。

我今天早上已经更新了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)来解决此问题。右键单击扩展名,然后选择“安装其他版本...”希望对您有所帮助!



1> 小智..:

更新VSCode后,我对Omnisharp v1.19.0有相同的问题。我最终通过将C#扩展回滚到对我有用的早期版本(1.18.0)来解决此问题。右键单击扩展名,然后选择“安装其他版本...”希望对您有所帮助!

推荐阅读
wurtjq
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有