microsoft / microsoft/typespec

Consistency between C# client and server emitters

Open
#8,478 4 comments 0 reactions 0 assignees View on GitHub
design:needed emitter:client:csharp emitter:service:csharp needs-area triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

### Current Behavior

When you invoke the @typespec/http-server-csharp emitter, a new C# project is created in the configured emitter-output-dir

However, when you invoke the @typespec/http-client-csharp, a new solution (.sln) gets created in the configured emitter-output-dir, and the actual C# client project gets created in a "src" sub directory.

### Desired Behavior

Ideally, both the client and server would behave similarly. I looked into the client and server packages, and they have a completely different structure, with the client having a generator which generates a fresh solution (packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs line 22) and the server not

Personally, I don't see the value in the solution (.sln file) being generated, but perhaps I am missing something?

I'd rather see the client emitter create a C# project in the specified emitter-output-dir - either directly or through a configuration option - similarly to the server emitter

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.