Analysis updated 2026-05-18
Write component-style UI markup directly inside C# code using JSX-like tags.
Explore the sample apps to see factory, direct-call, and fluent translation modes.
Get syntax highlighting and completion for .csmx files in Visual Studio Code.
Learn how a Roslyn source generator can extend C# with a custom file type.
| akeit0/csharp-markup-extension | cws6206/easynetworkscanner | davidichalfyorov-wq/project-sirius | |
|---|---|---|---|
| Stars | 14 | 14 | 14 |
| Language | C# | C# | C# |
| Setup difficulty | moderate | easy | moderate |
| Complexity | 3/5 | 2/5 | 4/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires .NET and Node.js to build both the compiler and the VS Code extension, plus a git submodule checkout.
JSX is a syntax feature from the React JavaScript ecosystem that lets developers write HTML-like markup directly inside their code. Instead of building a button with function calls, you write a tag like <button>Click</button> and a build tool transforms it into the actual function calls. CSMX is a proof-of-concept that brings that same idea to C#, the programming language commonly used with Microsoft tools like .NET, Unity, and Blazor. The project introduces a new file type.csmx, which is ordinary C# code that also allows JSX-like tag expressions wherever a normal C# expression would fit. A tag like <stack><text>Hello</text></stack> gets translated into a chain of function calls in plain C# before the regular C# compiler ever sees it. Developers write familiar-looking component syntax and the tool handles the translation step automatically during the build. The translation is handled by a Roslyn source generator, which is the official Microsoft mechanism for generating extra C# code at build time. The .csmx files are treated as additional inputs to the build, and the generated C# appears as part of the normal compilation process. This means the rest of the project's C# files can reference names and types defined in .csmx files without any workarounds. Editor support currently covers Visual Studio Code only. A custom language server provides syntax highlighting, error checking, hover information, and code completion for tag names and attributes inside .csmx files. For ordinary C# features like go-to-definition, the extension forwards requests to the existing C# extension already installed in the editor. The project ships with sample applications demonstrating three different ways to translate tags to code: factory mode, where tags become calls to a generic element function, direct-call mode, where component tags call a function directly, and fluent mode, where tags build up an object through method chaining. The README notes that JSX fragments and spread attributes are not yet supported, and describes the whole project as a minimal proof of concept rather than a production-ready tool.
A proof-of-concept that brings JSX-like tag syntax from React into C#, letting developers write HTML-like markup that a build-time tool turns into normal C# code.
Mainly C#. The stack also includes C#, .NET, Roslyn.
The explanation does not state the project's license.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.