首先,我已经尝试了获取“错误:无法连接到 OmniSharp”中概述的步骤,并按照提到的 reddit 帖子中发布的说明进行操作。
我在 OS X Yosemite 上安装了 VSCode,加载 sln 时出现此错误。
Error: Failed to connect to OmniSharp
我知道 OmniSharp 随 VSCode 一起安装,但我也安装了 Mono 以及使用 brew 安装的 dnvm、aspnet/dnx。
有人可以提供建议吗?我喜欢 VSCode 的外观和感觉,阅读文档后可以看出它有一些很棒的功能。我一直在耐心等待在我的 macbook 上完成我的 c# 工作,并且非常期待能够尝试 VSCode。
感谢您的任何建议。
这是我的 OmniSharp 日志的输出:
Starting OmniSharp at '/Volumes/cca/cca.sln'...
[INFORMATION:OmniSharp.Startup] Omnisharp server running on port '2000' at location '/Volumes/cca' on host 930.
[INFORMATION:OmniSharp.AspNet5.AspNet5Paths] Using runtime '/Users/jayrue/.dnx/runtimes/dnx-mono.1.0.0-beta4'.
[INFORMATION:OmniSharp.AspNet5.AspNet5ProjectSystem] Scanning '/Volumes/cca' for ASP.NET 5 projects
[INFORMATION:OmniSharp.AspNet5.AspNet5ProjectSystem] No project.json based projects found
[INFORMATION:OmniSharp.MSBuild.MSBuildProjectSystem] Detecting projects in '/Volumes/cca/cca.sln'.
[WARNING:OmniSharp.MSBuild.MSBuildProjectSystem] Skipped unsupported project type 'http://localhost:63367'
这是我的 sln:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Web
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "cca", "http://localhost:63367", "{53236049-2FD4-436E-B20D-8E53D6F9EC7E}"
ProjectSection(WebsiteProperties) = preProject
UseIISExpress = "true"
TargetFrameworkMoniker = ".NETFramework,Version%3Dv2.0"
Debug.AspNetCompiler.VirtualPath = "/localhost_63367"
Debug.AspNetCompiler.PhysicalPath = "E:\inetpub\wwwroot\cca\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63367\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/localhost_63367"
Release.AspNetCompiler.PhysicalPath = "E:\inetpub\wwwroot\cca\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_63367\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
SlnRelativePath = "E:\inetpub\wwwroot\cca\"
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{53236049-2FD4-436E-B20D-8E53D6F9EC7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53236049-2FD4-436E-B20D-8E53D6F9EC7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal