我在 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 程序集的子包, install dnvm
and run dnvm upgrade -r mono
, run dnu restore
,但是 OmniSharp 一次又一次地失败并且 IntelliSence 在 VSCode 中不起作用。
我该如何解决?
PS 这不是 ASP.NET,只是控制台 C# 项目。