【发布时间】:2015-12-07 14:17:29
【问题描述】:
我在 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# 项目。
【问题讨论】:
-
我有类似的问题,但在 Linux (debian 8) 上。你能解决这个问题吗?
-
@Nanda,我不能。也许在(尚未)支持的 VSCode 非 ASP.NET 项目中,我不知道。
标签: c# mono visual-studio-code omnisharp