1

我在 Windows 8.1 上,对 VS Code 版本 1.0.1-rc2 使用 VS Code 1.0.0 和 C#。

问题是我在打开 C# 项目时无法让 Intellisense 工作,但在开发扩展时,我确实启用了 Intellisense。

为扩展工作...

不适用于 C#

但有一件事是,当 VS Code 打开时,Omnisharp 启动......但是,出现了一个错误:

[信息] 在 'c:\dev\TestI' 处启动 OmniSharp... [错误] 错误:连接 ETIMEDOUT 192.30.252.126:443

这是我的 project.json 文件:

{
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true
  },
  "dependencies": {
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0-rc2-3002392"
    }
  },
  "frameworks": {
    "netcoreapp1.0": {}
  }
}

我也已经设置了“http.proxy” 。

任何帮助表示赞赏。

谢谢。

4

2 回答 2

0

以防万一有人遇到同样的问题。尽管它似乎不是代理问题,但有手动步骤可以解决该问题。

转到https://github.com/OmniSharp/omnisharp-roslyn/releases/并下载您需要的omnisharp 版本。解压它,在 VS Code 首选项中添加一个新项目:“csharp.omnisharp”:“path/to/where/you/unpacked/the/files/”。

重新启动 VS 代码。

取自:https ://github.com/OmniSharp/omnisharp-vscode/issues/200

于 2016-04-18T19:55:51.097 回答
0

首先,你应该从https://github.com/OmniSharp/omnisharp-roslyn/releases下载omnisharp-win-x64-netcoreapp1.0.zip ,然后解压到C:\tmp\omnisharp-win-x64-netcoreapp1.0 .你会得到文件C:\tmp\omnisharp-win-x64-netcoreapp1.0\OmniSharp.exe。</p>

为 c# Intellisense 提示设置 vscode 配置。</p>

打开vscode菜单“File”->“Option”->“setting”,可以编辑文件settings.json.Add newLine

转到:http ://www.freemanwoman.com/running-c-aspnet-core-rc2-in-visual-studio-code-with-the-latest-omnisharp-plugin

于 2016-04-24T16:46:26.673 回答