Why is there a .NET dustup? Microsoft introduced closed-source C# extension for VS Code

Microsoft will introduce a closed-source extension for C# in Visual Studio Code as an alternative to the existing open source OmniSharp, according to a post yesterday  by principal product manager Tim Heuer. This prompted a sharp retort from Miguel de Icaza, of Gnome, Mono and Xamarin fame, who declared it was “truly disappointing that Microsoft would subvert an active open source project by ramming in a proprietary extension to continue to lock down .NET.”

Miguel de Icaza worked at Microsoft until March this year.

The existing C# extension for VS Code uses OmniSharp, which is open source but inferior to Visual Studio’s C# language support

The background here is that Microsoft manages the two most popular development environments in use today, the open source VS Code and the proprietary Visual Studio, and while VS Code is completely free, some critical extensions which developers may think of as part of the product are not.

Similarly, while the .NET runtime and compiler platform is open source, the .NET debugger is not, which is why a warning appears whenever the debugger runs that: “You may only use the Microsoft .NET Core Debugger (vsdbg) with Visual Studio Code, Visual Studio or Visual Studio for Mac.”

The warning that appears when the .NET debugger is used in VS Code

Microsoft appears determined to reserve commercial advantage for its tools while also taking advantage of open source for feedback, contributions and adoption: a path which is difficult to steer down.

The specific plan for OmniSharp is not all bad news for VS Code .NET developers. OmniSharp does not use the VS Code Language Server Protocol (LSP), a standard mechanism for supporting rich editor features, and the plan is to create a new closed-source LSP tools host which will support both an updated OmniSharp and additional features like the proprietary IntelliCode, also used in Visual Studio.

This will mean that C# developers get coding features more on a par with those in Visual Studio.

‘This did not blindside us in any way’

Heuer also noted, in response to feedback, that “the LSP implementations for Razor and C# will remain open-source (Roslyn and Razor) as they are today. The VS Code C# extension (ms-dotnettools.csharp) itself will also remain open source. That which is open source today remains so and in active OSS development.”

The company did communicate in advance with the independent OmniSharp team including maintainer David Driscoll who said that “this did not blindside us in any way” and that “moving to an LSP model in vscode will help us enable richer features.”

Driscoll also has reservations about the plan, he said, but added that Microsoft had already shown that it will make decisions in favor of Visual Studio, referring to a previous controversy when the company was intent on removing the Hot Reload debugging feature from open source .NET.

Python developers were quick to note that a similar thing happened when the open source Python extension was replaced by the closed-source Pylance extension.

The risk for Microsoft is that while keeping a tight hold on parts of the .NET platform may benefit its developers tools (both Visual Studio and VS Code), it may also diminish adoption of .NET itself.

C# remains popular but developers have plenty of other choices, including TypeScript/JavaScript, Dart, Go, and of course Java.