I'm using the new asp.net mvc via github here: https://github.com/aspnet/home and I installed the Omnisharp package for Sublime Text 3 to get C# autocomplete. I am attempting to run the HelloMvc project, which works fine when I run k kestrel
and then open http://localhost:5004/
However, a bit of annoyance is when I save a file (for example, HomeController.cs) and then Sublime Text console opens and gives me the following errors:
Error : Unknown Resolver Error - (1, 23)
Error : '?' does not contain a definition for 'Mvc' - (1, 27)
Error : 'Controller' is not a known identifier - (6, 45)
Error : 'IActionResult' is not a known identifier - (8, 29)
Error : 'View' is not a known identifier - (10, 24)
Error : 'HomeController' does not contain a definition for 'View' - (10, 32)
And then it give me swigglies under the matching lines. I would like whatever the feature is that is ensuring it is good code, however, is there a way to change the settings so that it recognizes this is all valid?
Or does Omnisharp not yet support the new way asp.net 5.0 handles external packages?
Sublime Text and Omnisharp must have access to both Mono and MSBuild. I tried using mono --version and msbuild --version in Windows Terminal (using Powershell), yet none of them worked (even if I have BOTH of them installed, most likely they still aren't in PATH, will test again if I regained my sanity).
Clone repository. Move to plugin directory, update submodule and build. The server will automatically find the the solution file from the folder you have opened in Sublime. If you have multiple solutions you have to specify the solution file you wish to use in a sublime-project. Go to File -> Open and select the folder with your solution in it.
OmnisharpSublime is a plugin for ST3 to provide a C# development environment. It communicates with omnisharp-roslyn by nosami for IDE functions. Asynchronous communication with OmniSharpServer (Never freeze!) Code Actions eg. Convert LINQ query to Fluent Syntax
The current packaged version of omnisharp-sublime is using the omnisharp-server backend (NRefactory based), not omnisharp-roslyn (Roslyn based and support for Asp.Net 5 projects).
Work is ongoing both on omnisharp-roslyn, and the sublime plugin to make things work https://github.com/OmniSharp/omnisharp-sublime/tree/roslyn
I haven't tried it out yet (I'm an emacs guy), but from what I've heard, it's working really well! I use emacs with the omnisharp-roslyn server to develop omnisharp-roslyn with (the server itself is an Asp.Net 5 solution https://github.com/OmniSharp/omnisharp-roslyn)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With