Skip to content

[http-client-csharp] Switch scaffolding to generate .slnx instead of .sln#10234

Open
Copilot wants to merge 5 commits intomainfrom
copilot/http-client-csharp-switch-scenx
Open

[http-client-csharp] Switch scaffolding to generate .slnx instead of .sln#10234
Copilot wants to merge 5 commits intomainfrom
copilot/http-client-csharp-switch-scenx

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

Fixes #4065
Fixes #10233

Per latest .NET guidelines, new projects should use the XML-based .slnx solution format rather than the legacy .sln format.

Changes

  • NewProjectScaffolding.cs: Replace .sln generation with .slnx. The verbose GUIDs-and-config .sln content is replaced with the minimal XML format. Cleanup in Execute() now handles both .sln (backward compat) and .slnx.
  • CommandLineOptions.cs: Updated help text to reference slnx.
  • Test projects: Regenerated all 72 test project solution files as .slnx.

Generated .slnx output:

<Solution>
  <Project Path="src\PackageName.csproj" />
</Solution>

Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/cdbacd32-d08e-436b-b54f-b117d2ad257b

Co-authored-by: ArcturusZhang <10554446+ArcturusZhang@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 Apr 1, 2026
Copilot AI changed the title [WIP] Switch scaffolding to create slnx instead of sln [http-client-csharp] Switch scaffolding to generate .slnx instead of .sln Apr 1, 2026
Copilot AI requested a review from ArcturusZhang April 1, 2026 04:37
@ArcturusZhang ArcturusZhang marked this pull request as ready for review April 3, 2026 00:16
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 3, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@10234

commit: 2e4a9b4

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

No changes needing a change description found.

@ArcturusZhang
Copy link
Copy Markdown
Member

@copilot fix the spell check issue.

Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/2418706f-1368-4179-9e6a-d2905f32142b

Co-authored-by: ArcturusZhang <10554446+ArcturusZhang@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 3, 2026

@copilot fix the spell check issue.

Added slnx to the cspell dictionary in cspell.yaml (79fb070).

Add a protected virtual WriteAdditionalFiles() method that subclasses can
override to emit custom files (ci.yml, .targets, etc.) during new project
scaffolding. Called from Execute() after solution and project files are written.

Fixes #4065

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.

[http-client-csharp] switch the scaffolding to create slnx instead of sln Add extensibility to new project scaffolding

2 participants