Skip to content

Unify C# model base type provider resolution#11262

Draft
live1206 wants to merge 2 commits into
microsoft:mainfrom
live1206:cleanup/unify-csharp-base-type-provider
Draft

Unify C# model base type provider resolution#11262
live1206 wants to merge 2 commits into
microsoft:mainfrom
live1206:cleanup/unify-csharp-base-type-provider

Conversation

@live1206

Copy link
Copy Markdown
Contributor

Summary

  • make BaseTypeProvider the canonical base-provider resolution path for C# models
  • derive BaseModelProvider from the resolved provider so the two relationships cannot diverge
  • remove the obsolete empty SystemObjectTypeProvider fallback and use Roslyn-backed providers for external types
  • preserve mapped SystemObjectModelProvider support and generated-model resolution

Fixes #11261

Validation

  • dotnet test packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.sln --no-restore --nologo --verbosity quiet
  • pwsh packages/http-client-csharp/eng/scripts/Generate.ps1
  • npm run cop
  • pnpm format

Repository-wide pnpm lint remains blocked by pre-existing deprecation warnings in unrelated TypeScript packages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9767d3ab-bcc8-4717-a7a6-d5efb715989b
@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 Jul 15, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 5b41ad0

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9767d3ab-bcc8-4717-a7a6-d5efb715989b
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] SystemObjectTypeProvider looks unnecessary

1 participant