Skip to content

Feat/csharp playground#10189

Draft
JoshLove-msft wants to merge 4 commits intomicrosoft:mainfrom
JoshLove-msft:feat/csharp-playground
Draft

Feat/csharp playground#10189
JoshLove-msft wants to merge 4 commits intomicrosoft:mainfrom
JoshLove-msft:feat/csharp-playground

Conversation

@JoshLove-msft
Copy link
Copy Markdown
Contributor

No description provided.

JoshLove-msft and others added 2 commits March 27, 2026 16:51
…ble emitter and .NET server

Make the C# emitter loadable in browser environments by converting static
Node.js imports (child_process, fs, path, url) to dynamic imports. Add a
'playground-server-url' emitter option that, when set, POSTs the code model
to a remote .NET server instead of spawning a local dotnet process.

Create an ASP.NET Core playground server that accepts code model JSON and
configuration, runs the .NET generator, and returns the generated C# files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add @typespec/http-client-csharp and @azure-tools/typespec-client-generator-core
to the playground-website config and dependencies. The C# emitter now appears
in the emitter dropdown and its output files are shown in the file explorer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Mar 28, 2026
JoshLove-msft and others added 2 commits March 27, 2026 17:35
Set playground-server-url as a default emitter option for the C# emitter
in the playground. The URL defaults to localhost:5174 for local dev and
can be overridden via VITE_PLAYGROUND_SERVER_URL env var at build time.

Add dev:playground script to http-client-csharp package.json that runs
both the Vite playground and .NET server concurrently.

Fix generator DLL path resolution in playground server.

Verified end-to-end: server generates 18 C# files from a real TypeSpec
code model (authentication/api-key test fixture).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix the .NET server to actually bind to port 5174 (was using ASP.NET
default port 5000). Add @azure-tools/typespec-azure-core as a dependency
since TCGC has a peer dependency on it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant