HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dotnet
roslyn
C#2015–2026
dotnet / roslyn

roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

115Distinct people
143Mentions
1Explicit recommenders
20.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

> - I love that they are adding REPL. I really wish C# had this Here you go :) https://github.com/dotnet/roslyn/wiki/C%23-Interactive-Walkt... Also: csi.exe. Try it :)

josteink used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year143 dated mentions

Observed mentions: 2015-01-14 23:49:47 UTC to 2026-05-11 08:56:48 UTC.

01020302015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 32 mentions; 6 submissions, 26 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 28 mentions; 6 submissions, 22 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 26 mentions; 2 submissions, 24 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 12 mentions; 0 submissions, 12 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 11 mentions; 1 submissions, 10 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC32626
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC28622
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC26224
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC615
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC606
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC12012
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC404
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC312
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC11110
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC808
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC615

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
The .NET Compiler Platform Roslyn is the open-source implementation of both the C# and Visual Basic compilers with an API surface for building code analysis tools. C# and Visual Basic Language Feature Suggestions If you want to suggest a new feature for the C# or Visual Basic languages go here: dotnet/csharplang for C# specific issues dotnet/vblang for VB-specific features dotnet/csharplang for features that affect both languages Contributing All work on the C# and Visual Basic compiler happens directly on GitHub. Both core team members and external contributors send pull requests which go through the same review process. If you are interested in fixing issues and contributing directly to the code base, a great way to get started is to ask some questions on GitHub Discussions! Then check out our contributing guide which covers the following: Coding guidelines The development workflow, including debugging and running tests Submitting pull requests Finding a bug to fix in the IDE or Compiler Finding a feature to implement in the IDE or Compiler Roslyn API suggestions should go through the API review process Community The Roslyn community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects. To chat with other community members, you can join the Roslyn channel on the CSharp Community Discord. Our Code of Conduct applies to all Roslyn community channels and has adopted the .NET Foundation Code of Conduct. Documentation Visit Roslyn Architecture Overview to get started with Roslyn’s API’s. NuGet Feeds The latest pre-release builds are available from the following public NuGet feeds: Compiler: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json IDE Services: https://pkgs.dev.azure.com/azure-public/vside/_packaging/vssdk/nuget/v3/index.json .NET SDK: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json Continuous Integration status Builds Branch Windows Debug Windows Release Unix Debug main Desktop Unit Tests Branch Debug x86 Debug x64 Release x86 Release x64 main CoreClr Unit Tests Branch Windows Debug Windows Release Linux main Integration Tests Branch Debug x86 Debug x64 Release x86 Release x64 main Misc Tests Branch Determinism Analyzers Build Correctness Source build TODO/Prototype Spanish MacOS main .NET Foundation This project is part of the .NET Foundation along with other projects like the .NET Runtime.
Read the full README on GitHub

What Hacker News says

143 sources
I wrote several of typescript's initial compilers. We didn't use red/green for a few reasons: • The js engines of the time were not efficient with that design. This was primarily testing v8 and chakra (IE/edge's prior engine). • Red/green takes advantage of many things .net provides to be extremely efficient. For example structs. These are absent in js, making things much more costly. See the document on red-green trees I wrote here for more detail: https://github.com/dotnet/roslyn/blob/main/docs/compilers/De... • The problem domains are a bit different. In Roslyn the design is a highly concurrent, multi-threaded feature-set that wants to share immutable data. Ts/JS being single threaded doesn't have the same concerns. So there is less need to efficiently create an immutable data structure. So having it be mutable meant working well with
Read the rest
the engines of the time, with sacrificing too much. • The ts parser is incremental, and operates very similarly to what I describe in for Roslyn in https://github.com/dotnet/roslyn/blob/main/docs/compilers/De.... However, because it operates on the equivalent of a red tree, it does need to do extra work to update positions and parent pointers. Tldr, different engine performance and different consumption patterns pushed us to a different model.
In Tree-sitter vs. Language Servers
> Hmm, the strong reason could be latency and layout stability. Tree-sitter parses on the main thread (or a close worker) typically in sub-ms timeframes One of the designers/architects of 'Roslyn' here, the semantic analysis engine that powers the C#/VB compilers, VS IDE experiences, and our LSP server. Note: For roslyn, we aim for microsecond (not millisecond) parsing. Even for very large files, even if the initial parse is milliseconds, we have an incremental parser design (https://github.com/dotnet/roslyn/blob/main/docs/compilers/De...) that makes 99.99+% of edits happen in microseconds, while reusing 99.99+ of syntax nodes, while also producing an independent, immutable tree (thus ensuring no threading concerns sharing these trees out to concurrent consumers). > you introduce a flash of unstyled content or color-shifting artifacts ev
Read the rest
ery time you type, because the round-trip to the server (even a local one) and the subsequent re-tokenization takes longer than the frame budget. This would indicate a serious problem somewhere. It's also no different than any sort of modern UI stack. A modern UI stack would never want external code coming in that could ever block it. So all, potentially unbounded, processing work will be happening off the UI thread, ensuring that that thread is always responsive. Note that "because the round-trip to the server (even a local one)" is no different from round-tripping to a processing thread. Indeed, in Visual Studio that is how it works as we have no need to run our server in a separate process space. Instead, the LSP server itself for roslyn simply runs in-process in VS as a normal library. No different than any other component that might have previously been doing this work. > Relying on LSP for the base layer makes the editor feel sluggish. It really should not. Note: this does take some amount of smart work. For example, in roslyn's classification systems we have a cascading set of classifying threads. One that classifies lexically, one for syntax, one for semantics, and finally, one for embedded languages (imagine embedded regex/json, or even C# nested in c#). And, of course, these embedded languages have cascading classification as well :D Note that this concept is used in other places in LSP as well. For example, our diagnostics server computes compiler-syntax, vs compiler-semantics, versus 3rd-party analyzers, separately. The approach of all of this has several benefits. First, we can scale up with the capabilities of the machine. So if there are free cores, we can put them to work computing less relevant data concurrently. Second, as results are computed on some operation, it can be displayed to the user without having to wait for the rest to finish. Being fine-grained means the UI can appear crisp and responsive, while potentially slower operations take longer but eventually appear. For example, compiler syntax diagnostics generally take microseconds. While 3rd-party analyzer diagnostics might take seconds. No point in stalling the former while waiting for the latter to run. LSP makes multi-plexing this stuff easy
In Tree-sitter vs. Language Servers
C# Language Designer here, and one of the designers/architects of 'Roslyn', the semantic analysis engine that powers the C#/VB compilers, VS IDE experiences, and our LSP server. The original post conflates some concepts worth separating. LSP and language servers operate at an IDE/Editor feature level, whereas tree-sitter is a particular technological choice for parsing text and producing a syntax tree. They serve different purposes but can work together. What does a language server actually do? LSP defines features like: 1. Finding references (`textDocument/references`) 2. Go-to-definition (`textDocument/definition`) 3. Syntax highlighting (`textDocument/semanticTokens/...`) 4. Code completion, diagnostics, refactorings A language server for language X could use tree-sitter internally to implement these features. But it can us
Read the rest
e whatever technologies it wants. LSP is protocol-level; tree-sitter is an implementation detail. The article talks about tree-sitter avoiding the problem of "maintaining two parsers" (one for the compiler, one for the editor). This misunderstands how production compiler/IDE systems actually work. In Roslyn, we don't have two parsers. We have one parser that powers both the compiler and the IDE. Same code, same behavior, same error recovery. This works better, not worse. You want your IDE to understand code exactly the way the compiler does, not approximately. The article highlights tree-sitter being "error-tolerant" and "incremental" as key advantages. These are real concerns. If you're starting from scratch with no existing language infrastructure, tree-sitter's error tolerance is valuable. But this isn't unique to tree-sitter. Production compiler parsers are already extremely error-tolerant because they have to be. People are typing invalid code 99% of the time in an editor. Roslyn was designed from day one for IDE scenarios. We do incremental parsing (https://github.com/dotnet/roslyn/blob/main/docs/compilers/De...), but more importantly, we do incremental semantic analysis. When you change a file, we recompute semantic information for just the parts that changed, not the entire project. Tree-sitter gives you incremental parsing. That's good. But if you want rich IDE features, you need incremental semantics too. The article suggests language servers are inherently "heavy" while tree-sitter is "lightweight." This isn't quite right. An LSP server is as heavy or light as you make it. If all you need is parsing and there's no existing language library, fine, use tree-sitter and build a minimal LSP server on top. But if you want to do more, LSP is designed for that. The protocol supports everything from basic syntax highlighting to complex refactorings. Now, as to syntax highlighting. Despite the name, it isn't just syntactic in modern IDEs. In C#, we call this "classification," and it's powered by the full semantic model. A reference to a symbol is classified by what that symbol is: local, parameter, field, property, class, struct, type parameter, method, etc. Symbol attributes affect presentation. Static members are italicized, unused variables are faded, overwritten values are underlined. We classify based on runtime behavior: `async` methods, `const` fields, extension methods. This requires deep semantic understanding. Binding symbols, resolving types, understanding scope and lifetime. Tree-sitter gives you a parse tree. That's it. It's excellent at what it does, but it's fundamentally a syntactic tool. Example: in C#, `var x = GetValue();` is syntactically ambiguous. Is `var` a keyword or a type name? Only semantic analysis can tell you definitively. Tree-sitter would have to guess or mark it generically. Tree-sitter is definitely a great technology though. Want to add basic syntax highlighting for a new language to your editor? Tree-sitter makes this trivial. Need structural editing or code folding? Perfect use case. However, for rich IDE experiences, the kind where clicking on a variable highlights all its uses, or where hovering shows documentation, or where renaming a method updates all call sites across your codebase, you need semantic analysis. That's a fundamentally different problem than parsing. Tree-sitter definitely lowers the barrier to supporting new languages in editors. But it's not a replacement for language servers or semantic analysis engines. They're complementary technologies. For languages with mature compilers and semantic engines (C#, TypeScript, Rust, etc.), using the real compiler infrastructure for IDE features makes sense. For cases with simpler tooling needs, tree-sitter is an excellent foundation to build on.
In Tree-sitter vs. Language Servers
Yes if all the code was generated. The problem is when you want to modify the behavior of user-supplied code - Roslyn Source Generators are additive so you cannot make modifications directly to user-supplied code. You can read about how they work here: https://github.com/dotnet/roslyn/blob/main/docs/features/inc... Basically they get the files (and ambient metadata) that are part of the compilation, filter to the parts it depends on, transforms to a in-mem representation of the data needed for the code generation, and then finally adds new files to the compilation. Since they can only add new files they cannot e.g. add code to be executed before or after user code is executed like with AOP. Interceptors are a solution to that problem.
In The Princeton INTERCAL Compiler's source code
Roslyn language server is OSS too: https://github.com/dotnet/roslyn/tree/main/src/LanguageServe... There was never an issue with Omnisharp OSS-ness itself nor what replaced it. It was always about debugger and then "Dev Kit" extension which builds on top of the base one - "Dev Kit" is what isn't OSS and what requires an account. There is also an alternate open debugger: https://github.com/Samsung/netcoredbg / https://github.com/muhammadsammy/free-vscode-csharp (extension fork which swaps vsdbg out for this one)
In OpenVSX, which VSCode forks rely on for extensions, down for 24 hours
>> It is not a compiler error. It is never a compiler error (2017) No, not always true. Even in modern compilers -- as matured and as modern as VS 2022-- you would still get bug. I found one[0]. In my case it's easy to tell it's a compiler bug because the program just can't compile properly. But it's also not easy to reproduce, which just proves how well tested compilers usually are. 0: https://github.com/dotnet/roslyn/issues/74872
In It is not a compiler error. It is never a compiler error (2017)
C# extension works well and uses Roslyn Language Server that is part[0] of the Roslyn (C# compiler) itself - this is what the base C# extension[1] uses. Both of these are licensed under MIT. The closed-source part is 'vsdbg' which is Visual Studio's debugger shipped as a component that the extension uses. It, however, can be replaced with Samsung's 'NetCoreDbg' by using the extension fork[2]. [0]: https://github.com/dotnet/roslyn/tree/main/src/LanguageServe... [1]: https://github.com/dotnet/vscode-csharp [2]: https://github.com/muhammadsammy/free-vscode-csharp (please consider giving it a star, it's the only actively maintained alternative and other tools end up relying on it downstream to support debugging - VSCodium as well as Emacs and Neovim with VSC extension bridges)
In Visual Studio Code is designed to fracture (2022)

Showing the 15 most recent of 143 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.