Provide C# formatting aligned with dotnet format / Roslyn conventions for the Monaco C# playground model.
Approach candidates
A.Roslyn formatter on existing backend compilation path — reuse same service that emits diagnostics (single round-trip). B. WASM-only path if Mono/.NET toolchain exposes Microsoft.CodeAnalysis.Formatting compatible API in WASM debug story — only if bundled cost acceptable. C. Degrade gracefully: formatter unavailable offline → tooltip explains.
Integration
Register provider for csharp (or our Monaco language id for .cs).
Preserve PDB line mapping / project layout context if formatting affects multi-file advanced sandbox (only format active file vs whole solution — specify behavior).
Dependency
Platform Format toolbar + Monaco #24 + #33 WASM/Roslyn context may intersect — coordinate breakpoints vs format ordering.
## Summary
Provide **C#** formatting aligned with **`dotnet format`** / **Roslyn** conventions for the Monaco C# playground model.
## Approach candidates
**A.** **Roslyn** formatter on **existing backend** compilation path — reuse same service that emits diagnostics (single round-trip).
**B.** WASM-only path if Mono/.NET toolchain exposes **`Microsoft.CodeAnalysis.Formatting`** compatible API in WASM debug story — only if bundled cost acceptable.
**C.** Degrade gracefully: formatter unavailable offline → tooltip explains.
## Integration
- Register provider for **`csharp`** (or our Monaco language id for `.cs`).
- Preserve **PDB line mapping** / project layout context if formatting affects multi-file advanced sandbox (only format active file vs whole solution — specify behavior).
## Dependency
Platform Format toolbar + Monaco `#24` + `#33` WASM/Roslyn context may intersect — coordinate breakpoints vs format ordering.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Provide C# formatting aligned with
dotnet format/ Roslyn conventions for the Monaco C# playground model.Approach candidates
A. Roslyn formatter on existing backend compilation path — reuse same service that emits diagnostics (single round-trip).
B. WASM-only path if Mono/.NET toolchain exposes
Microsoft.CodeAnalysis.Formattingcompatible API in WASM debug story — only if bundled cost acceptable.C. Degrade gracefully: formatter unavailable offline → tooltip explains.
Integration
csharp(or our Monaco language id for.cs).Dependency
Platform Format toolbar + Monaco
#24+#33WASM/Roslyn context may intersect — coordinate breakpoints vs format ordering.spikerj referenced this issue2026-04-28 23:49:11 +00:00