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

Omnisharp not detecting already started server #177

Closed
henrik-schopmans opened this issue Jan 30, 2015 · 7 comments
Closed

Omnisharp not detecting already started server #177

henrik-schopmans opened this issue Jan 30, 2015 · 7 comments

Comments

@henrik-schopmans
Copy link

I try to use OmniSharp for asp.net vnext stuff, so I do not have a solution file. I start the server separately using
mono OmniSharp.exe -p 2000 -s "~/path/to/my/project"
Unfortunately when I enter vim, I get an error that the server couldn't be started due to missing solution file. It looks like it doesn't detect my already started server. When starting the server, I get this error message:

Monodoc documentation tree could not be loaded.System.IO.FileNotFoundException: Could not find file "/usr/lib/monodoc/monodoc.xml".
File name: '/usr/lib/monodoc/monodoc.xml'
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.GetStreamFromUrl (System.String url, System.String& absoluteUriString) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadTextReader (Int32 remained) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.PeekChar () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.EntityResolvingXmlReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.Schema.XsdValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.String filename) [0x00000] in <filename unknown>:0 
  at Monodoc.RootTree.LoadTree (System.String basedir, Boolean includeExternal) [0x00000] in <filename unknown>:0 
  at MonoDevelop.Projects.HelpService.InitializeHelpTree () [0x00000] in <filename unknown>:0 

But then the server still prints
OmniSharp server is listening

Does anyone have an idea on how to fix this? Btw., I saw that there is OmnisharpRoslyn on its way, is that already usable?

@nosami
Copy link
Contributor

nosami commented Jan 30, 2015

The Monodoc error is safe to ignore.

Yeah, good progress is being made with omnisharp-rolsyn OmniSharp/omnisharp-roslyn#29.

It's currently not compatible though because omnisharp-vim sends requests using form url-encoded, whereas omnisharp-roslyn currently only accepts json requests in the form body OmniSharp/omnisharp-roslyn#27 .

Apart from that minor detail, it should work. I've since defected to the emacs camp though, so I don't have a great deal of motivation to look at this. Fancy taking a look at it?

@henrik-schopmans
Copy link
Author

Since I'm still quite a novice, it's probably gonna remain at a look :D. But maybe I can just get the normal server somehow working for me.

@nosami
Copy link
Contributor

nosami commented Jan 31, 2015

You can definitely get the original server working this way. Looks like you already have.

Don't expect to get completions for aspnet5 stuff though. It won't work.

@henrik-schopmans
Copy link
Author

Mhh, tried it another time, but still can't get it working. When I have a solution file, everything works fine, but when I start the server manually, it still tries to start the server on startup of vim, but fails due to missing solution file.
When i use
let g:Omnisharp_start_server = 0
I get a single error on startup:
Unable to find csc.exe
And this error only happens when I started the server manually, otherwise nothing happens. How could I solve that error?

@nosami
Copy link
Contributor

nosami commented Feb 1, 2015

OmniSharp doesn't reference csc.exe anywhere. What other plugins do you have installed?

@markwoodhall
Copy link
Contributor

I know this is old and you probably figured it out already but if you have vim-csharp plugin installed that will reference csc.exe for its C# compiler.

@JamesMcMahon
Copy link

@markwoodhall Thanks for that tip. There is an open issue in the vim-csharp plugin repo.

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

5 participants