-
Notifications
You must be signed in to change notification settings - Fork 166
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
Issue when using mono? #23
Comments
I don't think this is a mono specific problem. I'm using mono as we speak. Do you have the latest OmniSharp? This looks like an issue that @gwilliams fixed a couple of days ago. |
The unable to connect to server message is pretty pointless right now. It displays that whenever there is any exception on the client. It's on my (huge) list of stuff to sort out. |
Just for info, I'm using the latest master with mono on OSX without any issues. |
yup i'm using the latest on master... does it matter what my current working directory is when I launch vim? My sln was generated by unity3d could this be the issue? Should I try using the OmniSharp.sln? would that be a good test to validate my system is setup correctly? |
Working directory shouldn't make any difference. I think that it would be a good smoke test to use the OmniSharp sln. It's what I always use ;) I've tried OmniSharp on quite a few solutions now though without any issues. It's probably far from bullet proof though. If your code isn't sensitive, I could take a look at it if you like. |
I think the issue is related to a Unity3d sln The OmniSharp.sln worked fine and I got some nice completion :) Let me whip together a sample project for you. |
Here is a really bare bones example: https://github.com/vito-c/ExampleUnity |
@vito-c Thanks for that. I'll take a look. |
@vito-c I just commited a fix for this. |
awesome thanks so much! The Example Project works but I am still seeing errors in my main project :( Project /Users/vito-c/workrepos/mobile/MobileProject/Assembly-CSharp-firstpass.csproj has unsupported type {4C2D6F16-28F7-6964-F259-E4608E3E113F} |
@vito-c I just added that GUID as a new csharp project type. Should work now. |
I added {4C2D6F16-28F7-6964-F259-E4608E3E113F} to the case statement and the server started up and looks like it's working! now to try the YCM completer.. thanks so much for writing this project! |
👍 |
hi. |
Could you verify that? Could you send a pull request, or failing that, your sln file? |
md5("ExampleProject") == "cfbf81bea5a883230e2fc9b25881c624" |
Should all project type ids be accepted? |
I'm not so sure.... I don't know what would happen if a VB.Net project was part of the solution for example and it could result in unnecessary parsing. I think we should just check to see if md5("projectname") == "projectguid" unless there is a better way to identify it as a C# project. |
LGTM |
Starting Server:
mono ./OmniSharp/bin/Debug/OmniSharp.exe -s /Users/vito-c/workrepos/myproject/project.sln
I am pretty sure the server is running on port 2000 (I can open localhost:2000/autocomplete in a browser and when I tried to echo "ack" to a port it gave me a bad response error back)
In Vim:
I start to type a method then type and it gives me: Could not connect to http://localhost:2000/autocomplete
Error Dump From Server:
System.InvalidOperationException: Operation is not valid due to the current state of the object
at System.Linq.Enumerable.First[IProject](IEnumerable
1 source, System.Func
2 predicate, Fallback fallback) [0x00000] in :0at System.Linq.Enumerable.First[IProject](IEnumerable
1 source, System.Func
2 predicate) [0x00000] in :0at OmniSharp.Solution.CSharpSolution.ProjectContainingFile (System.String filename) [0x00000] in :0
at OmniSharp.Parser.BufferParser.ParsedContent (System.String editorText, System.String filename) [0x00000] in :0
at OmniSharp.AutoComplete.AutoCompleteHandler.CreateProvider (OmniSharp.AutoComplete.AutoCompleteRequest request) [0x00000] in :0
at OmniSharp.AutoComplete.AutoCompleteModule+c__AnonStorey15.<>m__31 (System.Object x) [0x00000] in :0
at Nancy.Routing.Route.Invoke (Nancy.DynamicDictionary parameters) [0x00000] in :0
at Nancy.Routing.DefaultRouteInvoker.Invoke (Nancy.Routing.Route route, Nancy.DynamicDictionary parameters, Nancy.NancyContext context) [0x00000] in :0
at Nancy.Routing.DefaultRequestDispatcher.Dispatch (Nancy.NancyContext context) [0x00000] in :0
The text was updated successfully, but these errors were encountered: