vscode-csharp: [ERROR] Error: OmniSharp server load timed out.

Environment data

.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
 Version:            2.0.0-preview1-005977
 Commit SHA-1 hash:  414cab8a0b

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0-preview1-005977/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview1-002111-00
  Build    : 1ff021936263d492539399688f46fd3827169983

VS Code version: 1.13.1 (1.13.1)

C# Extension version: 1.11.0-beta4 (or 1.10.0 - tried both)

Steps to reproduce

Just start vscode in 6/21/2017 morning (maybe vscode automatically installed any updates. I’m not sure)

Expected behavior

Start omnisharp, working intellisence, “go to definiton”, etc.

Actual behavior

[ERROR] Error: OmniSharp server load timed out. Use the ‘omnisharp.projectLoadTimeout’ setting to override the default delay (one minute).

Starting OmniSharp server at 6/23/2017, 11:10:44 AM
    Target: /Users/petrtomasek/Projects/CestujnakoleNew

OmniSharp server started wth Mono
    Path: /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.11.0-beta4/bin/run
    PID: 5164

OmniSharp: -s /Users/petrtomasek/Projects/CestujnakoleNew --hostPID 5046 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/petrtomasek/Projects/CestujnakoleNew' on host 5046."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Initializing in /Users/petrtomasek/Projects/CestujnakoleNew
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBUILD_EXE_PATH environment variable set to /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.11.0-beta4/bin/omnisharp/msbuild/MSBuild.dll
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBuildExtensionsPath environment variable set to /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.11.0-beta4/bin/omnisharp/msbuild
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBuild will use local OmniSharp installation.
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        No solution files found in '/Users/petrtomasek/Projects/CestujnakoleNew'
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/petrtomasek/Projects/CestujnakoleNew/CestujnakoleNew.csproj
Discovered Mono file path: /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
Resolved symbolic link for Mono file path: /Library/Frameworks/Mono.framework/Versions/5.0.1/bin/mono-sgen32
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

The same problem with release versions of CLI (1.0.4) Can you help me, what is wrong? Thank you very much, for your time.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (6 by maintainers)

Most upvoted comments

I’ve also been getting this error and have been disabling OmniSharp > reload vscode > enable OmniSharp > reload vscode and it works again.

I’ll be working on improving the start up performance/experience of the OmniSharp server soon. In the meantime, you can set the ‘omnisharp.projectLoadTimeout’ setting in VS Code as the error says to do. By default, this is set to 60 and increasing it can help.

The Timeout setting, I set to 1200 then only it works. But I have to wait for so long to complete the OmniSharp server to load completely. In some cases, the server fails to load and facing issues. Planing to go back to Visual Studio until this issue is resolved. I will keep watching this thread with my fingers crossed…

I’ve also been getting this error and have been disabling OmniSharp > reload vscode > enable OmniSharp > reload vscode and it works again.

Omg, after hundreds of tries, this finaly worked for me! Thank you ❤️

Had to reinstalled the C# extension (v1.18.0 now) and this issue seems to have come up again. I have tried setting the default to 120 and 1200 and continue to get the output in the log seen below.

I tried uninstalling/reinstalling, restarting OmniSharp but just keep getting the time out error. I was able to get omnisharp started by downgrading to 1.17.1 (using these instruction https://tpodolak.com/blog/2017/04/09/downgrading-visual-studio-code-extension/)

################################################## Starting OmniSharp server at 3/27/2019, 3:45:37 PM Target: c:\Users[…]\Desktop\ProjectWork\Task2_DQ\MACBIS_DQ.sln

OmniSharp server started. Path: C:\Users[…].vscode\extensions\ms-vscode.csharp-1.18.0.omnisharp\1.32.11\OmniSharp.exe PID: 11404

[ERROR] Error: OmniSharp server load timed out. Use the ‘omnisharp.projectLoadTimeout’ setting to override the default delay (one minute).

#####################################################

Extension Author (truncated) Version
ng-template Ang 0.1.11
npm-intellisense chr 1.3.0
path-intellisense chr 1.4.2
bracket-pair-colorizer Coe 1.0.61
githistory don 0.4.6
xml Dot 2.4.0
gitlens eam 9.5.1
tslint eg2 1.0.43
vscode-npm-script eg2 0.3.5
prettier-vscode esb 1.8.1
angular2-switcher inf 0.2.0
csharpextensions jch 1.3.0
vscode-nuget-package-manager jmr 1.1.6
Angular-BeastCode Mik 7.2.6
mssql ms- 1.5.0
python ms- 2019.3.6139
csharp ms- 1.18.0
debugger-for-chrome msj 4.11.3
material-icon-theme PKi 3.7.0
LiveServer rit 5.5.1
autoimport ste 1.5.3

I did miss that --thanks!

I don’t believe it will affect deployment, but I’m not an expert in ASP.NET projects. It would be best to try a dotnet publish and make sure everything is in the right place.

However, I expect it will affect your build by making it faster. Assuming there are no files in wwwroot/global/ or wwwroot/vendors/ required for compilation, dotnet build should run much faster.

Excellent! Thanks for verifying!

@DustinCampbell , At this point you are a great man to save my life…! Thanks a lot!..

I just added these line given below as mentioned in the thread but with respect to my folder structure and this thing pushed the loading of OmniSharp in couple of seconds, <PropertyGroup> <DefaultItemExcludes>wwwroot/global/**;$(DefaultItemExcludes)</DefaultItemExcludes> <DefaultItemExcludes>wwwroot/vendors/**;$(DefaultItemExcludes)</DefaultItemExcludes> </PropertyGroup>

But, Is it going to create any side effects in terms of building for deployment or so? Just wanted to confirm if you know.

Once again thanks to you!

You mentioned adding Angular and lots of JavaScript files slows down project loading. Is it possible that you’re encountering this issue? https://github.com/dotnet/cli/issues/7525

@DustinCampbell: Thanks for considering my issue.

Mine is a .Net core 2 solution with 6 Projects in it. Among them 5 are .Net Standard Class Libraries. These are ofcourse loading faster and no issues I am facing with them. The one that takes me to the hell is the MVC Web Project It does have 6 controllers including the HomeController, a Startup.cs file, Program.cs and three to four simple static helper classes. But it has a bunch of client-side libraries like, Angular and other js stuffs. Initially it was somehow good enough to load this project in 30 seconds. But, as I started developing more Angular, Javascript code files, and couple of more API methods in the existing controllers, the loading time of this particular project went upto level of requirement to have Project Timeout settings to have the value 900 in it. Now I am having 1200 which is working. but more than 15 to 20 minutes!..

I uninstall the OmniSharp and reinstalled it. But, found no use of doing it.

I hope you understand the situation. Is there any ways to exclude OmniSharp to exclude wwwroot folder while interpreting the project files?

The Output Window of OmniSharp was showing as below… It took more than 15 minutes to contunue from this : /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Web/DiamondCut.Web.csproj.

Starting OmniSharp server at 2017-10-13 20:24:20
    Target: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.sln

OmniSharp server started wth Mono
    Path: /Users/ganesh/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/run
    PID: 8019

OmniSharp: -s /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.sln --hostPID 7998 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/ganesh/Projects/Diamond/DiamondCut' on host 7998."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Initializing in /Users/ganesh/Projects/Diamond/DiamondCut
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        OmniSharp initialized with Mono MSBuild.
    MSBUILD_EXE_PATH: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/MSBuild.dll
    MSBuildExtensionsPath: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/xbuild
    TargetFrameworkRootPath: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/xbuild-frameworks
    RoslynTargetsPath: /Users/ganesh/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn
    CscToolPath: /Users/ganesh/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn

[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Detecting projects in '/Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.sln'.
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Standards/DiamondCut.Standards.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.EF/DiamondCut.EF.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Entities/DiamondCut.Entities.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Models/DiamondCut.Models.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Commands/DiamondCut.Commands.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Web/DiamondCut.Web.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Standards
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.EF
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Entities
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Models
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Commands
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Web
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/ganesh/Projects/Diamond/DiamondCut'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.Services.WorkspaceHelper
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Startup
        Configuration finished.