我在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一次又一次地失败,而且在VSCode中没有智能感知。
请问我该如何解决这个问题?
备注:这不是ASP.NET,只是一个控制台C#项目。