Skip to content

chore(http-client-csharp): bump TCGC to 0.74.0 and TypeSpec to 1.18.0 - #12552

Open
JoshLove-msft wants to merge 2 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft-upgrade-csharp-typespec-tcgc
Open

JoshLove-msft wants to merge 2 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft-upgrade-csharp-typespec-tcgc

Conversation

@JoshLove-msft

@JoshLove-msft JoshLove-msft commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Updates the C# HTTP client emitter to TCGC 0.74.0 and the matching TypeSpec release.

  • Dependencies: @azure-tools/typespec-client-generator-core and @azure-tools/typespec-azure-core 0.74.0; TypeSpec packages 1.18.0/0.88.0; @typespec/http-client 0.17.1; @typespec/tspd 0.78.0; Spector and spec packages bumped. Peer ranges and lockfile are updated.
  • Generated fixtures: Reran Generate.ps1. Explicitly excluded the uncompilable type/union/discriminated/extends Spector scenario and dropped encode: base64 from one bytes type in the response-replacement code model.
  • Tests: Regenerated fixtures and built the generator solution. Emitter tests: 424 passed, 2 skipped; Generator.Tests: 3265 passed; ClientModel.Tests: 2748 passed; Input.Tests: 332 passed; Local.Tests: 832 passed; Spector.Tests: 15 passed, 961 skipped.

--generated by Copilot

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 22:42
@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 Nov 11, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 3bc7275

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The upgrade includes a newly discovered scenario whose generated fixture cannot compile due to duplicate PetBase methods and an undeclared kind, requiring exclusion or a generation fix with compilation coverage.

1 open issue
1 file not reviewed
  • packages/http-client-csharp/package-lock.json: Generated file
What changed in this PR

Aligns the C# HTTP client emitter with TCGC 0.74.0 and TypeSpec 1.18.0, updating dependencies and generated fixtures.

Changes:

  • Updates dependency versions, peer ranges, and the package-local npm lockfile.
  • Adds generated stubs, project scaffolding, and a launch profile for the discriminated-union inheritance scenario.
  • Removes explicit base64 encoding from the response-replacement bytes code model.

Paths below are relative to packages/http-client-csharp/. extends/ denotes generator/TestProjects/Spector/http/type/union/discriminated/extends/.

File Description
package.json Updates dependencies and compatible peer ranges.
package-lock.json Locks the updated dependency graph.
extends/​Type.Union.Discriminated.Extends.slnx Adds the scenario solution.
extends/​Type.Union.Discriminated.Extends.NuGet.targets Adds configuration-schema packaging integration.
extends/​tests/​Type.Union.Discriminated.Extends.Tests.csproj Adds test-project scaffolding.
extends/​src/​Type.Union.Discriminated.Extends.csproj Defines the generated client project.
extends/​src/​Generated/​TypeUnionDiscriminatedExtendsModelFactory.cs Adds model-factory stubs.
extends/​src/​Generated/​schema/​ConfigurationSchema.json Adds the client configuration schema.
extends/​src/​Generated/​Recursive.cs Adds recursive-union operation stubs.
extends/​src/​Generated/​Models/​UnknownPetBase.Serialization.cs Adds fallback-model serialization stubs.
extends/​src/​Generated/​Models/​UnknownPetBase.cs Adds the fallback model.
extends/​src/​Generated/​Models/​PetKind.cs Defines enum discriminator values.
extends/​src/​Generated/​Models/​PetBase.Serialization.cs Adds base-model serialization stubs.
extends/​src/​Generated/​Models/​PetBase.cs Adds the enum-discriminated base model.
extends/​src/​Generated/​Models/​Mammal.Serialization.cs Adds intermediate-model serialization stubs.
extends/​src/​Generated/​Models/​Mammal.cs Adds the intermediate inheritance model.
extends/​src/​Generated/​Models/​Dog.Serialization.cs Adds dog serialization stubs.
extends/​src/​Generated/​Models/​Dog.cs Adds the dog model.
extends/​src/​Generated/​Models/​Cat.Serialization.cs Adds cat serialization stubs.
extends/​src/​Generated/​Models/​Cat.cs Adds the cat model.
extends/​src/​Generated/​Models/​_TypeUnionDiscriminatedExtendsContext.cs Registers models for reader/writer generation.
extends/​src/​Generated/​InjectedDiscriminatorOperations.cs Adds injected-discriminator operation stubs.
extends/​src/​Generated/​InjectedDiscriminator.cs Adds the injected-discriminator subclient.
extends/​src/​Generated/​ExtendsClientSettings.cs Adds client-settings stubs.
extends/​src/​Generated/​ExtendsClientOptions.cs Adds client-options stubs.
extends/​src/​Generated/​ExtendsClient.cs Adds the scenario’s root client.
extends/​src/​Generated/​ExplicitDiscriminatorOperations.cs Adds explicit-discriminator operation stubs.
extends/​src/​Generated/​ExplicitDiscriminator.cs Adds the explicit-discriminator subclient.
extends/​src/​Generated/​EnumDiscriminatorOperations.cs Adds enum-discriminator operation stubs.
extends/​src/​Generated/​EnumDiscriminator.cs Adds the enum-discriminator subclient.
extends/​src/​Generated/​CustomDiscriminatorOperations.cs Adds custom-discriminator operation stubs.
extends/​src/​Generated/​CustomDiscriminator.cs Adds the custom-discriminator subclient.
extends/​Configuration.json Sets the scenario package name.
generator/​TestProjects/​Spector/​http/​azure/​client-generator-core/​response-replacement/​tspCodeModel.json Removes explicit base64 encoding metadata.
generator/​Microsoft.TypeSpec.Generator/​src/​Properties/​launchSettings.json Adds the scenario’s stub-generation launch profile.

Review effort: Balanced

Exclude the nested discriminated union scenario from Spector discovery and remove its generated fixture and launch profile.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 23:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review reports no active issues requiring resolution.

No open issues 🎉

1 resolved since last review
1 file not reviewed
  • packages/http-client-csharp/package-lock.json: Generated file

Review effort: Balanced

This branch has not been deployed

No deployments
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.

3 participants