【问题标题】:Omnsharp's Intellisense not workingOmnsharp 的 Intellisense 无法正常工作
【发布时间】:2016-08-10 11:56:40
【问题描述】:

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

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

但有一件事是,当 VS Code 打开时,Omnisharp 会启动……但是,有一个错误:

[INFO] 在 '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”

感谢任何帮助。

谢谢。

【问题讨论】:

    标签: c# intellisense visual-studio-code omnisharp


    【解决方案1】:

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

    转到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

    【讨论】:

      【解决方案2】:

      首先,你应该从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。

      为 c# Intellisense 提示设置 vscode 配置。

      打开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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-10-15
        • 1970-01-01
        • 2011-05-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-04-24
        相关资源
        最近更新 更多