Scott Hanselman

OmniSharp - Making cross-platform .NET a reality, and a pleasure

November 27, 2014 Comment on this post [58] Posted in ASP.NET | Open Source
Sponsored By

In case you missed it, make sure to read Announcing .NET 2015 - .NET as Open Source, .NET on Mac and Linux, and Visual Studio Community because there's been some big stuff going on.

Here's the summary of the .NET 2015 Wave of awesomeness.

The other thing I wanted to talk about is a newly organized group of technologies called OmniSharp. Just to be sure there's no confusion, OmniSharp isn't a Microsoft project. While there are two Microsoft folks on the team of 8 or so, we are working on it as community members, not in an official capacity.

I "launched" this project in my talk at the Connect() mini-conference in New York a few weeks back. You can watch that video here on Channel 9 now if you like. However, the technologies around and under OmniSharp have been around for over a decade!

As a team and a community we pulled together a bunch of projects and plugins, got organized, and created and Jonathan Channon has a great overview blog post you should check out that talks about how Jason Imison created OmniSharpServer which is an...

HTTP wrapper around NRefactory allowing C# editor plugins to be written in any language. NRefactory is the C# analysis library used in the SharpDevelop and MonoDevelop IDEs. It allows applications to easily analyze both syntax and semantics of C# programs. It is quite similar to Microsoft's Roslyn project; except that it is not a full compiler – NRefactory only analyzes C# code, it does not generate IL code.

OmniSharp runs as its own process and runs a local Nancy-based web api that your editor of choice talks to. If you have an editor that you like to use, why not get involved and make a plugin? Perhaps for Eclipse?

We now have plugins for these editors:

  • Sublime
  • Brackets from Adobe
  • Atom from GitHub
  • Emacs
  • Vim

And these work on (so far) all platforms! It's about choice. We wanted to bring more than autocomplete (which is basically "I think you typed that before") to your editor, instead we want actual type-smart intellisense, as well as more sophisticated features like refactoring, format document, and lots of other stuff you'd expect only to see in Visual Studio.

We also brought in the Sublime Kulture package which gives Sublime users support for ASP.NET 5 (formerly ASP.NET vNext), so they can launch Kestrel (our libuv based local webserver), run Entity Framework migrations, and other arbitrary commands from within Sublime.

.NET in Sublime, in Vim, in Brackets, in Atom, and everywhere else, cross-platform

Here's OmniSharp running in emacs on my Windows machine. The emacs setup (here is an example) is a little more complex than the others, but it also gives emacs folks an extreme level of control. Note that I had to launch the OmniSharp server manually for emacs, while it launches automatically for the other editors.


Here is an ASP.NET MVC app running in Sublime. The Sublime OmniSharp package output can be seen in the debug console there (Ctrl+~ to see it).


OmniSharp is in very active development. We are looking at bringing in Roslyn, using the new ASP.NET Design Time Host, and improving robustness. It's not perfect, but it's pretty darn cool. There's lots of details in Jonathan's writeup with great animated gifs showing features. Also note that we have a Yeoman generator for ASP.NET that can get you started when creating ASP.NET 5 apps on Mac or Linux. The yeoman generator can create Console apps, MVC apps, and NancyFx apps.

You can get started at  See you there!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
November 27, 2014 18:09
Hi Scott, great post! Where were you 2 nights ago when I was trying to set up my Mac to run my ASP.NET 5 site?

Joke aside, you may want to highlight the fact that, outside Windows, things are a bit volatile at the moment and it takes a bit of effort to get all the moving parts working together. For example, if you take an ASP.NET solution from VS2015 and copy it to your Mac then Omnisharp intellisence wont work. You need to use the the dev stream for ASP.NET (currently beta2), change Sublime settings etc. I will blog about it next week.

I am sure that the way things are progressing we will soon have a consistent and interoperable .NET platform to work with, but for now it is a bit of a pain to get started. We all love the work that the team is putting in though!!! keep it up
November 27, 2014 19:26
So much awesomeness. Love where this is and where it's headed!
November 27, 2014 20:04
its awesome to code into editors likes emacs or vim. great stuff thanks for sharing.
November 27, 2014 21:08
i imagine it is completely doable with VS Online, but having one that is on your server that can compile code from various languages on your server, download or send, link into GitLab... Could start using iPads and Surface 2s for "real work" (yeah, Office is nice, but I really only use excel because that is everyone's favorite way of sending me data and then doing a =CONCATANATE() to build a SQL query).

Looks like the dream is getting closer. People have made Brackets hosted. Just a matter of time and I can't wait. Fantastic work
November 27, 2014 21:29
This is terrific stuff. I've been using the Sublime Kulture plugin on my Macbook for a couple of months now - in fact I only touch Windows for legacy stuff now. Thanks :-)
November 27, 2014 23:11
Hey @Scott,
I can't explain how delighted am I to see dotNet embrace the Open Source.
This means I can go back to my beloved Ubuntu to still be able to do dotNet the way I can do on Windows.

P.S I don't see any Linux screenshots.

November 28, 2014 11:25
It would be great to see Silverlight running one MAC :)
November 28, 2014 14:23
The functionality is awesome, the only thing I wonder about is why there's a webserver in between the editor and the engine. Isn't it a bit over-engineering to have a 'web' detour between the editor and the actual engine which does the work? (just curious why this is, I have no idea about the various trade offs alternatives require)
November 28, 2014 16:18
Good work, but I think we are a ways of yet. How do I get .NET on a Mac? How do I run unit tests using a .exe runner?
November 28, 2014 16:36
Nice! That's, what, 16 years after it was first promised? Nevertheless, nice (o:
November 28, 2014 17:15
Frans - because it's the cheapest and fastest way to do cross-platform out of process communication that is easy and accessible to program against given the diversity of editor plugin models. It's pretty quick in fact. If you have a better idea, join us on github.
November 28, 2014 19:17
Mike - install Mono and read the Omnisharp Sublime documentation on running unit tests
November 29, 2014 1:09
This brings a dilemma because no matter how much I like Vim, Sublime, etc.
I know .NET development will always be faster/easier using VS.
November 29, 2014 1:20
Forgive me for not having done my reading, but does this mean that everything dotNet can run on all platforms? Wpf?
November 29, 2014 3:05
@Jonathan I don't get it, I thought .NET was open sourced, why do I need to get Mono?

Ugh, @Scott, why is this so weird? The K runtime, the KVM, Mono, .NET, ASP.NET 5. I seriously can't see the forest for the trees.

If someone can explain the moving parts, how they work and interact, and how to get it up and running, instead of gushing about the fact that OMG .NET is open source, that would be so much more helpful. Because despite the open sourcing and touted platform support, I haven't seen Microsoft .NET compiler and CLR for OS X anywhere.
November 29, 2014 3:08
Also, why is the .NET runtime on OS X installed through 'aspnet/k' or something? ASP.NET is not .NET, so that very confusing. I don't think I have seen a more confusing state of affairs for any platform.
November 29, 2014 3:17
Great news. Are there any plans of adding debugger support as part of the package? Not sure which editors would be able to support debugging but I imagine at least emacs would.
November 29, 2014 4:00
@Scott, sorry for spamming your blog with comments, but I want to point out how confusing the current situation is.

- github/dotnet

Lists a repository named corefx. 'FX' is short for 'effects', sort of like 'JavaFX', right? Its description is "foundational libraries that make up development stack". I understand libraries, those are .dlls. But a development stack is much more than that. It must include a runtime and a compiler, otherwise it's only "foundational libraries". It Github readme tells me it contains not enough class libraries to build any application with. Where is system, or mscorlib, or system.core? Finally links to the '.NET home repository', I'll get back to that later, but for now, think about what 'home' means for .NET. Is it a website, like MSDN? If this is 'corefx' and 'makes up the development stack', then what is '.NET home'?

Further lists a repository named buildtools. This project does not explain if these tools are needed to build the corefx project, or to build my own projects. It seems I can ignore them if I'm not interested in contributing to .NET itself, right? Or is this like MSBuild? MSBuild is a buildtool. Is it (going to be) open source? Is this it?

Further lists the home repository. Hey, I rember just reading about this, 'the .NET home repository' was mentioned in the readme of the corefx project, right? Except that readme links to Microsoft/dotnet, so that's not the same as dotnet/home. Hmm, I must keep the Microsoft/dotnet in mind, I'll revisit it later.

For now, let's look at the last repository: core. Wait, scroll up, there's a corefx repository. What is this the core of then? Well, its description says it's the 'home repository for .NET Core'. So is that different than the repository named home that is listed right above it? And also different from the Microsoft/dotnet repository, which has been referred to as the '.NET home repository'?

Conclusion: I have looked at 5 repositories, and am now seriously confused...

I haven't even touched on, where there is a dotnet repository, or aspnet/home, yet another 'home' repository (the whole aspnet account is even more of a mess).

What happened? MSDN used to be very structured and clear, and now it's just a data dump, with what seems like multiple team throwing incomplete stuff against the wall under confusing names without coordination.

I hope you can move some more mountains to make sure there's actually a coherent story and that developers will 'fall into the pit of success' rather than have to 'stumble through the forest' when it comes to finding (re)sources online.

Sorry for the rant.
November 29, 2014 10:43
@Mike what are you trying to do rebuild dot net ? they just dumped the code their because they did not have any hard disk space at microsoft. and after firing all the technical writers and half the people moving to google long time back , people @ MSFT just ......
November 29, 2014 19:33
I often travel, I like the idea of a virtual machine running community, which I can access from web cafes etc., can you do a blog or get someone to do a guest blog on such a scenario.

Also, I assume, with a virtual machine, azure handles backups so I can revert to a previous point in time ?

I 'get it' now, great way to ensure backups, best resources available, as the compile time is the killer sometimes....

Love the idea that I can put in a few hours coding when visiting venice or the lake district :)
November 29, 2014 20:12
These are exciting news. I wish MS could make VS Community work on all platforms....or do a version of VS for each platform. That'd be great.
November 29, 2014 21:03
@Nick, why dont you take a rocket to the moon
November 30, 2014 0:26
Do you remember where you were the day Java died? Neither do I. Nor Cobol or Smalltalk or even Ruby on Rails. Would you choose any of those for the next project you're making all the tech decisions for? Neither would I. They're dead. Sure, they're still being used by companies that resist change and devs that cant learn new things, but no question about it, they're dead. The recent vNext/Omnisharp announcements should be ringing funeral bells in your ears. .Net is dead too. Many are refusing to notice, but the corpse is cold. It's owners noticed. That's why they put it out on Github for the plague cart to haul away. There's nothing there. It's a dead, cold, lifeless, shell of something that used to make people smile but now just fills its surroundings with the putrid smell of death. The fact is that if you are one of the few out to change the world with software that pushes boundaries and makes the world a better place, you aren't doing it with C#. It's nice that .Net is now open source and that MS has realised that they have never known anything about VCS ("we put it on GitHub because nobody would have noticed if we stuck it on Codeplex"), but its really just a convenient solution for distancing themselves from a platform that no longer serves a purpose.
November 30, 2014 1:28
Rob - that's just silly.
November 30, 2014 1:37
@Rob I suspect you haven't got out in a while, or you're making inferences based on your own insular circle of developers. Perhaps it's time to get back in touch with what the rest of the world is doing? .Net is quite prolific, and in fact becoming moreso given the hacker-friendly developments over the last year or so.
November 30, 2014 1:42
@Rob .Net is far from dead... same for Java, although I do at times wish Java harm ;)
November 30, 2014 1:45
Rob, if you want to write click-bait rants, you should do it on your own blog and collect the traffic.
November 30, 2014 1:50
@Rob Where is this high level of frustration coming from? The fact that .Net is open source now cannot be the only reason for your conclusions? If going open source is nothing you were looking for - obviously - then what did you expect them to do with .Net?!
November 30, 2014 1:59
Not sure what Rob is on about, then again I am a technology agnostic Solution Architect, so religious wars between dev environments is quite far from my day to day problem solving domain.
November 30, 2014 3:20
Um @Rob, (that one), a couple of things. Firstly - presumably if .NET is dead, it's because there is a better alternative out there that "everybody's using now"? Only ask because you didn't mention one. And I can't think of one. Just let us know pal. And secondly, love your analogies. You're like a modern-day Plato. Is there somewhere I can read your musings EVERY day? I want that. Love X
November 30, 2014 5:09
@Rob can you give me mobile number of your dealer? That stuff should be damn good!
November 30, 2014 6:40
Guys, don't bite Rob that much - we got a confused man here. He lost his faith in .NET and while we all may keep it - why don't we try to figure out why that happened and what can we do to bring him back to .NET?

@Scott - Omnisharp looks like a good idea, it would be great if we can see 1-step deployment of these tools on all supported platforms.
November 30, 2014 10:10
The problem with the .NET community is that we've become so used to everything being pre-packaged and neatly packaged. This is something that years of enterpise distribution will do to you.

Moving stuff into the public domain is awesome but usually diverses things a bit and takes away the out-of-the-box mentality.

So if your complaining about things being unclear, try setting up a Rails development environment or getting any of the node.js frameworks to fly without consulting the support forums :)

Keep up the great work guys!
November 30, 2014 11:09
I'm really excited about this - I've been meaning to give Linux a whirl for a while now but held back because "Visual Studio is my IDE". This is just the excuse I need to press on!

Plus, I've got a vague background fear that using VS as my sole IDE is protecting me from the rough edges of development a little. Whilst I don't enjoy rubbing up against the rough edges I think it's important to remove my ignorance...

Great work guys!
November 30, 2014 12:32
I thought .Net was dying too. Mainly because it wasn't open source. Java had the clear advantage with new projects I was doing in my spare time. Spring MVC, Play framework, and even some Scala. That is what I was learning lately.

.Net going open source is restoring my faith though. At least it means .Net is here to stay.
November 30, 2014 14:05
These are exciting news. I wish MS could make VS Community work on all platforms....or do a version of VS for each platform. That'd be great.
November 30, 2014 14:22
This is yet more stunning news, not only have you OSS'd the code and released a working version on these platforms but you are now catering to how people on those platforms currently develop. This is to be commended. Its genius you try and slot into the existing developer tools on those platforms especially as some of those platforms users aren't exactly ms friendly.

Hopefully those sorts of prejudices will vanish in time with technologists seeing the advantages of all available platforms. Giving people more tools is a good thing, they can choose to use them or not. The difference is that before they didn't have access to them and so made choices based on that. Perhaps their choices will change.

Either way its a good gateway to interact with Azure, which after all is a key microsoft strategy :)
November 30, 2014 14:25
I agree with some of the points Rob made, but not with the opinion that .Net is dead.

However, currently net developers of desktop applications are in trouble.
We need to create desktop apps that target both mac and windows (and linux why not). Microsoft has no tools for that and this happened because they followed the wrong way as they did with windows 8 metro fail. They created metro just because they could, not because developers or other people needed it.

We are now in a position that in windows 8 we can build a desktop app using three different frameworks (winforms, wpf, rt (+the unmanaged ways)) which are incompatible between each other.

So instead of having ONE UI Framework targeting multiple platforms (windows,mac,linux) we have 3+ frameworks targeting the same platform (windows 8) and this is completely wrong.
November 30, 2014 14:53
In May 2014 we announced the general availability of Regional Virtual Network. This enabled users to utilize their virtual network at regional scale and enjoy new features such as ‘Reserved IPs’, ‘Internal Load Balancing’ and ‘Instance level Public IPs’. Along with the announcement we indicated that migrating existing resources associated with an Affinity group to regional scope would be available in the future. We now provide additional information on the timing of migration availability
November 30, 2014 22:43
I agree with Rob in a few regards.
Clarity is not there. This contributes to the crisis of confidence. This goes all the way back to sxs and the failure to address library management on systems. Installing dev env on platforms should be choco install, one-get install or yum install,etc without 1hr install times - try 1 minutr bootstrap or less to begin dev. They should give you all the things, and anything beyond should be nuget install.

I see this happening on many fronts, ie docker on windows. Why not explain the offering instead of announcing it only to set up for shortcomings.

Open source is about transparency, and not getting it right yourself by having the community steer and contribute to right the ship.

I think msft is going in the right direction but my fellows in linux circles say dotnet is dotdead and are off learning golang, node, or ruby to address the next gen of apps. They are probably right as dotnet has insulated itself for too long and accessing it from other langs (the sign of effective useful apis) is too difficult.
Try to config the IP stack of a windows server programmatically without powershell.
Win32, ole, wmi .net its out of control

December 01, 2014 5:47
Emacs can start and control the Omnisharp server quite happily, provided it knows where to look for it:

(require 'cl)
(add-hook 'csharp-mode-hook 'omnisharp-mode)
; Set path below, or add to Windows path environment variable.
; I had to reboot between Windows path changes for Emacs to see it correctly, for some reason.
(setq omnisharp-server-executable-path "C:\\bin\\OmniSharpServer\\OmniSharp\\bin\\Debug\\omnisharp.exe")
December 01, 2014 7:24
@Rob, stay off the drugs man.
December 01, 2014 12:18
@Rob .Net died - Joke of this year :) . According to you everything died :) May I know on what you are currently working on ? :)
December 01, 2014 13:33
Good info. A hard sell to upper management here as they do not want any development tools which aren't going to be well supported in 3 years. The questions asked by management are in order 1) What does the tool do, 2) How big is its organization/development team, 3) When is the latest release for it? 4) When was the latest major release?, 4) How many developers need to leave the company/the OS project for it to be dead?, ....

Our shop does not allow any developer to bring in their per tool, scripting language, library, OS project, version control front end, utility, .... for being torpedoed at the cost of tens of thousands of dollars in the past.

Minimizes that consultant with expected tenure of 1 year or less on a project.
December 01, 2014 13:51
Well @tom, that's some harsh guideliness for any company in our line of business :) May I ask what segment of customers you're focused on if mgmnt can run things in that manner?

I mean, there's basically NO new teqhniques that passes those guidelines :)
December 01, 2014 15:56
On the topic of multi-platform editing and building, has there been any word on providing open specifications/implementations of MSI.DLL? I'm setting up an in-house Jenkins CI server right now, and I'd intended to do the Windows build from Linux under Mono, but WIX won't currently build MSIs on Linux because of that platform dependency. I can put Wine in there as well, but I'd really hoped to stay away from that particular rabbit hole.

Since they're opening things up, I'd love for that little portion of Windows to get out into the light as well. I know the team had expressed some concerns with people using non-standard means of access, but that wouldn't be a big issue with a standard implementation on GitHub.
December 01, 2014 23:25
Haha... Its amazing how many disenchanted coders always boil things down to platform and language holy wars... Imagine how F'n stupid a mechanic would sound if he was to argue with a potential client that he doesn't work on BMW, Saab, Audi because those makes are "dying, outdated, etc..."

Java,.Net, C++, whatever... really boil down to being nothing more than tools.

Stop thinking like evangelists and start approaching programming as a professional software engineer...

Exit Soapbox ...
December 02, 2014 0:00
I think some folks may be missing the big picture here. Yes it is a bit fragmented, the naming conventions and structure might be a little confusing, and there are some steps to get this working. But I would think of all people software developers would understand how things go with such a paradigm shift. There is a huge amount of plugging square pegs into round holes, and it's happening before our very eyes. It's making progress.

Software that was traditionally closed source, single platform, and married to Microsoft tooling is now open sourced, running on multiple platforms, and working with tools created by someone else. Does this seem like something anyone could accomplish overnight? Nobody from Microsoft is saying this is first class and production ready, and to start moving all your .Net infrastructure to Linux servers tomorrow. But they are definitely saying "we're serious about this, look what's coming" and that's enough for me to be pretty excited about it.

As for Microsoft's financial dealings, ".Net is dead", and other pappy killing discussions it's outside the scope of this blog post and serves as a distraction. The big picture here is Microsoft is putting its money where it's mouth is, fulfilling a promise with vigor, and we're all going to benefit from it.

So fire up your favorite text editor on your favorite OS and goof around with this stuff, it works surprisingly well. If you hate it, improve it.
December 02, 2014 13:30
This is great news.

Compatibility and Interoperability with Roslyn will be a great bonus.

But what it's your final goal?
(ASP) .Net Adoption?
The Editor / PlugIn Part?

I hope you guys are building an installer too.
I really do not want to install 10x small packages and read 100 pages of documentation just to be able to install it.
A small .NSIS/? script ( installer ) that will check for available software (already installed) and suggest new software if not already installed.

And some 5+ Template Applications + TDD + Compile Options/Software.

December 02, 2014 21:15
@Jeremy Morgan ok jermey prove yourself first and improve it :-) (big talker)
December 02, 2014 23:57
I'm kinda with @Mike on all of this - Its great that all of this is happening but the message is very muddled. In the end all I want to know is - will this allow me to build cross platform universal applications using a single source code base? Ideally i would love to see a Visual Studio like version of Embarcadero's AppMethod (Embarcadero aka Borland). If you haven't taken a look at their product then check out this 2 minute youtube vid -

Watching this upsets me cause it makes me stop and ask - "why is it Embarcadero (that has nowhere near the resources MS does) has produced a great cross-platform app building IDE but MS hasn't?"

And in this 2 minute video I was able to understand fully what AppMethod offers. Yet I've read numerous blog posts and articles on this open source announcement and I'm still confused as hell as to what it all means. And who are we kidding, MS is more than aware of the confusing nature of the communication going out. They are more than likely purposely limiting what's being said and how its being said to protect corporate strategy, roadmap, limit expectations, etc.

@Hakan also mentioned that the .Net community has a mindset of expecting things to be "pre-packaged and neatly packaged". Well duh yeah! When did developers stop being customers?

I wouldn't deliver source code to my customer and then expect them to create their own build and install process and work thru all of the bugs. So no I don't want to go and "goof around and figure it out".

MS is worth billions and is more than capable of providing polished software to its customers - developers. I think it is a very slippery slope when we start expecting a low standard of quality with our development tools all in the name of open source.

I'll be the happiest .Net dev in the world when there is a nice polished production ready OSX version of VS that allows me to build cross-platform universal apps using a single source code base. But I'm sorry without that "polished pre-packaged" solution I'm staying on the sidelines. It's called "bleeding edge" for a reason and with over 20 years experience I've been cut enough times to learn to avoid it and to wait for the polish.

So @Scott, I'm very much looking forward to the day when you post about a production ready version of VS (or equivalent) coming to OSX that allows me to build cross-platform universal apps. But until then I'm happily riding the bench and watching from the sidelines.
December 04, 2014 0:03
Hi Scott,

again, that are fantastic news! The current movement is just great! It's not about the choice of 1 particular language and 1 tool - it's about choose the right tool for the job and the freedom to do so.

And thanks for the good introduction will head over to Jonathan Channon's Blog to get into more detail...

December 06, 2014 20:53

Simple to understand given large corporations have hundreds to thousands of applications built in-house.

Understandable when they've been burned many times each year by some tool, library, vendor or third party app going unsupported, broken by an os or other update, or in zombie support status.

That's why tools, libraries, vendors, languages, security models, architectures are vetted and approved before being introduced into a large corporation.

It's a code review like op for an application, its environment, deployment tools and the tools needed to release/build a new version.

It's why large corporations don't pick projects with 2 developers, niche libraries, or third party vendors likely to go out of business/become unsupported.

Planning for a 5-10 year system life is why they may not pick the latest fad library, tool, language, methodology ...
December 29, 2014 2:11
Great , every developer who works on .net technologies wants to hear this from a long time . So now java has competition for being the preferred programming language for platform independency
December 31, 2014 12:00
This is absolutely amazing, I mean the live comment preview...
and of course, some other amazingness are listed bellow

  • .Net being open source

  • Rob talking about corpses

  • me, having all these comments read

  • (again) Live Comment Preview, like the stone age ones without tools above;)

January 30, 2015 17:59
in contrast to getting named appropriate if we do high-class European designer, the determine
arrives inside notion that sunglasses are produced to ban the rays through the sun. There are
sunglasses available for very small amounts of money, and for occasional use they're fine but they are unlikely to have
good, protective lenses. A deodorant could be in the same way successful with out comprising alcohol consumption along with aluminum chlorhydrate.
The only problem you'll have is deciding on merely
one to your outdoor activity.
February 04, 2015 19:19
After looking into a few of the articles on your blog,
I seriously like your technique of blogging. I book marked it to my bookmark
webpage list and will be checking back soon. Please check out my website as well and let me know what you think.
February 05, 2015 16:49
I'm sorry. I was wrong. I had a brain fart.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.