gpt4 book ai didi

c# - OmniSharp 无法在 Visual Studio Code 中启动

转载 作者:行者123 更新时间:2023-11-30 14:51:32 28 4
gpt4 key购买 nike

我在 Kubuntu 15.04 下的 VSCode (v. 0.10.3) 中的 C# 上打开包含现有 MSBuild 项目(实际上来自 VS 2012)的文件夹。OmniSharp 启动后抛出错误:

[INFO] Starting OmniSharp at '/home/tezaurismosis/Development/NET/ConsoleApp/ConsoleApp.sln'...
[INFO] Started OmniSharp from '/home/tezaurismosis/VSCode/resources/app/extensions/csharp-o/bin/omnisharp' with process id 14956...
System.InvalidOperationException: Failed to resolve the following dependencies for target framework 'DNX,Version=v4.5.1':
framework/System.Collections
framework/System.Collections.Concurrent
framework/System.Globalization
framework/System.IO
framework/System.Net.Http.WebRequest
framework/System.Reflection
framework/System.Runtime
framework/System.Text.Encoding
framework/System.Threading.Tasks
Searched Locations:
... some paths ...
Try running 'dnu restore'.
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) <0xb71f6a58 + 0x0035b> in <filename unknown>:0
[ERROR] Error: Failed to start OmniSharp

我已经安装了最新版本的 Mono (4.2.1) 和所有带有 Mono 程序集的子包,安装 dnvm 并运行 dnvm upgrade -r mono,运行 dnu restore,但 OmniSharp 一次又一次地失败,IntelliSence 在 VSCode 中不起作用。

我该如何解决?

附言它不是 ASP.NET,只是控制台 C# 项目。

最佳答案

您的版本可能已过时。在 vs 代码中卸载并重新安装 C# 扩展。

  1. F1,输入 ext show installed,按 Enter。单击 x 将其删除。
  2. 重启 vscode。
  3. F1,输入ext install,按Enter。单击下载图标进行安装。
  4. 重启 vscode。

Ominsharp 现在将运行。

关于c# - OmniSharp 无法在 Visual Studio Code 中启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34135720/

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