Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sublime Omnisharp not starting/working and Exception when run manually #255

Open
4 of 8 tasks
tdubourg opened this issue Mar 14, 2019 · 1 comment
Open
4 of 8 tasks

Comments

@tdubourg
Copy link

Platform

  • Linux
  • Windows
  • OSX

Type

  • This is an issue
  • This is a feature request
  • Other

Checklist

  • It hasn't been fixed in the latest master -- assuming Package Control pulls master directly here
  • I can reproduce this issue in a fresh Sublime Text install without other extensions

Versions

output of mono --version:

5.18.0

output of msbuild /version:

4.7.3190.0

Details

What's the bug?

When run through SublimeText directly, the Omnisharp.exe executable just doesn't seem to start at all. I do not see it in the list of running processes and the ST console shows errors connecting to the server:

HTTPConnectionPool(host='localhost', port=63678): Max retries exceeded with url: /checkreadystatus (Caused by ProtocolError('Connection aborted.', ConnectionRefusedError(10061, 'No connection could be made because the target machine actively refused it', None, 10061)))

When run manually, the server does stay up, but as soon as a request comes in, it throws an exception:

[...]\AppData\Roaming\Sublime Text 3\Packages\OmniSharp\prebuilt-omnisharp-roslyn\prebuilt/OmniSharp.exe" -s C:\the\path\to\solution.sln -p 63678 --hostPID 69328

fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      An unhandled exception has occurred while executing the request.
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at OmniSharp.Roslyn.BufferManager.TryAddTransientDocument(String fileName, String fileContent)
   at OmniSharp.Roslyn.BufferManager.<UpdateBufferAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at OmniSharp.Roslyn.CSharp.Services.Buffer.UpdateBufferService.<Handle>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at OmniSharp.Endpoint.EndpointHandler`2.<HandleSingleRequest>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at OmniSharp.Endpoint.EndpointHandler`2.<Process>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at OmniSharp.Endpoint.EndpointHandler`2.<Process>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at OmniSharp.Http.Middleware.EndpointMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()

My ST project config looks like that:

{
	"folders":
	[
		{
			"path": "C:\\[...]\\thefolder"
		}
	],
	"solution_file": "C:\\[...]\thefolder\thesolution.sln"

How-To

How do I reproduce this issue?

Well as far I it happens for me, simply by installing .NET SDK + Mono + Kulture + Omnisharp on top of a pristine Sublime Text 3 and opening a CS file...

@datafile4
Copy link

I also ran into this error, Sublime 3.2.2, Windows 10, Kulture, Omnisharp from Packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants