{"slug": "roslyn", "name": "Roslyn", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 3, "commenters": 8, "warners": 2, "score": 1.921, "rising": 1.67, "first": "2025-12-16", "latest": "2026-10-21", "why": "At work we've added multiple Roslyn analysers to our build pipeline", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 3, "compare": 0, "warn": 2}, "spark": [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1], "listed": true, "loved": [], "caveat": "", "short_quote": "At work we've added multiple Roslyn analysers to our build pipeline", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/dotnet/roslyn", "official_url": "https://github.com/dotnet/roslyn", "pricing": "", "aliases": ["Roslyn"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 802888336, "item_id": 50180521, "url": "https://news.ycombinator.com/item?id=50180521", "by": "actionfromafar", "date": "2026-10-21", "version": null, "stance": "recommend", "quote": "make compilation much stricter with Roslyn analyzers", "excerpt": "It has the verdict \"Best balance\" though. If you are doing greenfield, you can also make compilation much stricter with Roslyn analyzers and neutralize some of the bullet points here: https://yannickloth.github.io/independentvariation/software/design/languages/modern-mainstream/csharp.html", "context": "", "use_case": "stricter C# compile-time checks", "switched_from": "", "story": "C# now beats Rust on WASM size"}, {"id": 798475554, "item_id": 49904722, "url": "https://news.ycombinator.com/item?id=49904722", "by": "sreekanth850", "date": "2026-09-30", "version": null, "stance": "recommend", "quote": "With Roslyn APIs, strong typing, structured namespaces, and compiler level semantic information", "excerpt": "We use codex in vscode. Use agentic development but, agents only do things that We agree upon. Like We create impact study, proposals, feasibility and then implementation plan with full regresison, test coverage and end to end smoke test. A new fetaure will be given to front end only if it satisfy all our requirement in real API smoke test. It is not fast. but still we think we get 10X productivity gains and clean co", "context": "", "use_case": "agents navigating C# codebases", "switched_from": "", "story": "GPT 6.1 Sol: Near-Astra intelligence for a fifth of the price"}, {"id": 745518608, "item_id": 46594913, "url": "https://news.ycombinator.com/item?id=46594913", "by": "theshrike79", "date": "2026-01-12", "version": null, "stance": "recommend", "quote": "At work we've added multiple Roslyn analysers to our build pipeline", "excerpt": "It's not like testing code is a new thing. Junit is almost 30 years old today. For functionality: https://en.wikipedia.org/wiki/Unit_testing With robust enough test suites you can vibe code a HTML5 parser - https://ikyle.me/blog/2025/swift-justhtml-porting-html5-parser-to-swift - https://simonwillison.net/2025/Dec/15/porting-justhtml/ And code correctness: - https://en.wikipedia.org/wiki/Tree-sitter_(parser_generator", "context": "", "use_case": "Static analysis in CI", "switched_from": "", "story": "Don't fall into the anti-AI hype"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 742149569, "item_id": 46384348, "url": "https://news.ycombinator.com/item?id=46384348", "by": "torginus", "date": "2025-12-25", "version": null, "stance": "warn", "quote": "Roslyn API, setting up the project", "excerpt": "I used to think so too, but I do have to complain about Microsoft doing the Microsoft thing - they have a brilliant idea (and execution), but they bury it in so much boilerplate that 99% of people who would use it are put off by it. The amount of stuff you have to wade through here compared to something like comptime in Zig (Roslyn API, setting up the project, having VS recognize it and inject it in the compiler, deb", "context": "", "use_case": "C# compiler API", "switched_from": "", "story": "Comptime \u2013 C# meta-programming with compile-time code generation and evaluation"}, {"id": 742114352, "item_id": 46382147, "url": "https://news.ycombinator.com/item?id=46382147", "by": "daeken", "date": "2025-12-24", "version": null, "stance": "warn", "quote": "Working with the raw Roslyn types is painful at best", "excerpt": "I love (and heavily use) source generators, but the development experience is godawful. Working with the raw Roslyn types is painful at best and this is compounded by them having to be written against .NET Standard, severely limiting the use of newer .NET functionality. Eventually I want to write a good baseline library to use for my source generators -- simplifying finding definitions with attributes, mapping types ", "context": "", "use_case": "C# compiler APIs", "switched_from": "", "story": "Comptime \u2013 C# meta-programming with compile-time code generation and evaluation"}]}], "who": [], "tags": [], "use_cases": ["stricter c# compile-time checks", "agents navigating c# codebases", "finding floating-point hotspots", "c# custom lint rules", "static analysis in ci", "c# compiler api"], "compared": [{"slug": "visual-studio", "name": "Visual Studio", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [{"id": 747675520, "item_id": 46729720, "url": "https://news.ycombinator.com/item?id=46729720", "by": "Metasyntactic", "date": "2026-01-22", "version": null, "stance": "compare", "quote": "In Roslyn the design is a highly concurrent, multi-threaded feature-set that wants to share immutable data.", "excerpt": "I wrote several of typescript's initial compilers. We didn't use red/green for a few reasons: 1. The js engines of the time were not efficient with that design. This was primarily testing v8 and chakra (IE/edge's prior engine). 2. 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 ", "context": "wrote several of TypeScript's initial compilers", "use_case": "", "switched_from": "", "story": "Tree-sitter vs. Language Servers"}, {"id": 747612784, "item_id": 46725799, "url": "https://news.ycombinator.com/item?id=46725799", "by": "Metasyntactic", "date": "2026-01-22", "version": null, "stance": "recommend", "quote": "The approach of all of this has several benefits.", "excerpt": "> 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 ", "context": "", "use_case": "C# compiler and IDE analysis", "switched_from": "", "story": "Tree-sitter vs. Language Servers"}, {"id": 747610080, "item_id": 46725630, "url": "https://news.ycombinator.com/item?id=46725630", "by": "Metasyntactic", "date": "2026-01-22", "version": null, "stance": "recommend", "quote": "Roslyn was designed from day one for IDE scenarios.", "excerpt": "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 dif", "context": "C# language designer and Roslyn architect", "use_case": "C# compiler and IDE analysis", "switched_from": "", "story": "Tree-sitter vs. Language Servers"}], "threads": [{"url": "https://news.ycombinator.com/item?id=46719899", "title": "Tree-sitter vs. Language Servers", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=46339532", "title": "Comptime \u2013 C# meta-programming with compile-time code generation and evaluation", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=50175510", "title": "C# now beats Rust on WASM size", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49896586", "title": "GPT 6.1 Sol: Near-Astra intelligence for a fifth of the price", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47585469", "title": "Herbie: Automatically improve imprecise floating point formulas", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46737447", "title": "Banned C++ Features in Chromium", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"neutral": 1, "warn": 2}, "2026-01": {"recommend": 1, "neutral": 1}, "2026-02": {}, "2026-03": {}, "2026-04": {"neutral": 1}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {"recommend": 1}, "2026-10": {"recommend": 1}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 802888336, "item_id": 50180521, "url": "https://news.ycombinator.com/item?id=50180521", "by": "actionfromafar", "date": "2026-10-21", "version": null, "stance": "recommend", "quote": "make compilation much stricter with Roslyn analyzers", "excerpt": "It has the verdict \"Best balance\" though. If you are doing greenfield, you can also make compilation much stricter with Roslyn analyzers and neutralize some of the bullet points here: https://yannickloth.github.io/independentvariation/software/design/languages/modern-mainstream/csharp.html", "context": "", "use_case": "stricter C# compile-time checks", "switched_from": "", "story": "C# now beats Rust on WASM size"}, {"id": 798475554, "item_id": 49904722, "url": "https://news.ycombinator.com/item?id=49904722", "by": "sreekanth850", "date": "2026-09-30", "version": null, "stance": "recommend", "quote": "With Roslyn APIs, strong typing, structured namespaces, and compiler level semantic information", "excerpt": "We use codex in vscode. Use agentic development but, agents only do things that We agree upon. Like We create impact study, proposals, feasibility and then implementation plan with full regresison, test coverage and end to end smoke test. A new fetaure will be given to front end only if it satisfy all our requirement in real API smoke test. It is not fast. but still we think we get 10X productivity gains and clean co", "context": "", "use_case": "agents navigating C# codebases", "switched_from": "", "story": "GPT 6.1 Sol: Near-Astra intelligence for a fifth of the price"}, {"id": 762206913, "item_id": 47637932, "url": "https://news.ycombinator.com/item?id=47637932", "by": "summarity", "date": "2026-04-04", "version": null, "stance": "neutral", "quote": "instruments Roslyn to find FP and FP-in-loop hotspots across the codebase.", "excerpt": "I posted this and it picked up steam over night, so I thought I'd add how I'm using it: I work on 3D/4D math in F#. As part of the testing strategy for algorithms, I've set up a custom agent with an F# script that instruments Roslyn to find FP and FP-in-loop hotspots across the codebase. The agent then reasons through the implementation and writes core expressions into an FPCore file next to the existing tests, runni", "context": "", "use_case": "Finding floating-point hotspots", "switched_from": "", "story": "Herbie: Automatically improve imprecise floating point formulas"}, {"id": 747843520, "item_id": 46740220, "url": "https://news.ycombinator.com/item?id=46740220", "by": "oldmanhorton", "date": "2026-01-23", "version": null, "stance": "neutral", "quote": "you would normally implement rules like this with a custom Roslyn Analyzer", "excerpt": "In C#, you would normally implement rules like this with a custom Roslyn Analyzer or with https://github.com/dotnet/roslyn/blob/main/src/RoslynAnalyzers/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md. It\u2019s fair to say C# projects tend to have smaller denylists than mature C++ projects, but banned APIs definitely exist in mature C# projects.", "context": "", "use_case": "C# custom lint rules", "switched_from": "", "story": "Banned C++ Features in Chromium"}, {"id": 745518608, "item_id": 46594913, "url": "https://news.ycombinator.com/item?id=46594913", "by": "theshrike79", "date": "2026-01-12", "version": null, "stance": "recommend", "quote": "At work we've added multiple Roslyn analysers to our build pipeline", "excerpt": "It's not like testing code is a new thing. Junit is almost 30 years old today. For functionality: https://en.wikipedia.org/wiki/Unit_testing With robust enough test suites you can vibe code a HTML5 parser - https://ikyle.me/blog/2025/swift-justhtml-porting-html5-parser-to-swift - https://simonwillison.net/2025/Dec/15/porting-justhtml/ And code correctness: - https://en.wikipedia.org/wiki/Tree-sitter_(parser_generator", "context": "", "use_case": "Static analysis in CI", "switched_from": "", "story": "Don't fall into the anti-AI hype"}, {"id": 742149569, "item_id": 46384348, "url": "https://news.ycombinator.com/item?id=46384348", "by": "torginus", "date": "2025-12-25", "version": null, "stance": "warn", "quote": "Roslyn API, setting up the project", "excerpt": "I used to think so too, but I do have to complain about Microsoft doing the Microsoft thing - they have a brilliant idea (and execution), but they bury it in so much boilerplate that 99% of people who would use it are put off by it. The amount of stuff you have to wade through here compared to something like comptime in Zig (Roslyn API, setting up the project, having VS recognize it and inject it in the compiler, deb", "context": "", "use_case": "C# compiler API", "switched_from": "", "story": "Comptime \u2013 C# meta-programming with compile-time code generation and evaluation"}, {"id": 742114352, "item_id": 46382147, "url": "https://news.ycombinator.com/item?id=46382147", "by": "daeken", "date": "2025-12-24", "version": null, "stance": "warn", "quote": "Working with the raw Roslyn types is painful at best", "excerpt": "I love (and heavily use) source generators, but the development experience is godawful. Working with the raw Roslyn types is painful at best and this is compounded by them having to be written against .NET Standard, severely limiting the use of newer .NET functionality. Eventually I want to write a good baseline library to use for my source generators -- simplifying finding definitions with attributes, mapping types ", "context": "", "use_case": "C# compiler APIs", "switched_from": "", "story": "Comptime \u2013 C# meta-programming with compile-time code generation and evaluation"}, {"id": 740741136, "item_id": 46296321, "url": "https://news.ycombinator.com/item?id=46296321", "by": "bob1029", "date": "2025-12-16", "version": null, "stance": "neutral", "quote": "combining Roslyn analyzers with an LLM and a human in the loop could be game changing", "excerpt": "I don't know if it's \"formal\", but I think combining Roslyn analyzers with an LLM and a human in the loop could be game changing. The analyzers can enforce intent over time without any regressions. The LLM can write and modify analyzers. Analyzers can constrain the source code of other analyzers. Hypothetically there is no limit to the # of things that could be encoded this way. I am currently working on a few protot", "context": "", "use_case": "C# code analysis", "switched_from": "", "story": "AI will make formal verification go mainstream"}]}