Skip to content

Add support for building on .NET 9#3222

Merged
jar-stripe merged 15 commits intomasterfrom
jar/dotnet-nine
Oct 21, 2025
Merged

Add support for building on .NET 9#3222
jar-stripe merged 15 commits intomasterfrom
jar/dotnet-nine

Conversation

@jar-stripe
Copy link
Copy Markdown
Contributor

@jar-stripe jar-stripe commented Oct 14, 2025

Why?

As per https://docs.stripe.com/sdks/versioning?lang=dotnet#language-policies, we are supporting .NET 9 in Stripe.net. This PR migrates our builds and tests to use .NET 9. Additionally, to support our updated version policy, we needed to refactor our github workflow files to make it easier to update our supported versions.

What?

  • moves list of supported versions out of ci.yml and adds step to set supported versions and latest supported version (for use in downstream jobs)
  • updates test project TargetFrameworks to include net9.0 and just test to use net9.0 target
  • adds conditional compilation flag to SystemNetHttpClient to not use deprecated pattern in .net 9.0
  • adds just install and just print-supported-versions and just print-latest-supported-version commands and dotnet-install.sh script to help with set up and with reporting supported versions
  • updates just test and just test-one to always test against the latest supported version
  • removes global.json; instead, dotnet will use the latest version installed in the just install command

See Also

Changelog

  • Adds support for building Stripe.net on .NET 9.

@jar-stripe jar-stripe requested a review from a team as a code owner October 14, 2025 23:03
@jar-stripe jar-stripe requested review from mbroshi-stripe and removed request for a team October 14, 2025 23:03
@jar-stripe jar-stripe enabled auto-merge (squash) October 15, 2025 00:35
Comment thread scripts/dotnet-install.sh
Comment thread justfile Outdated
@jar-stripe jar-stripe merged commit 8dcb3d3 into master Oct 21, 2025
8 checks passed
@jar-stripe jar-stripe deleted the jar/dotnet-nine branch October 21, 2025 18:48
jar-stripe added a commit that referenced this pull request Oct 21, 2025
* update doc link (#3212)

* Improve event notification example (#3217)

* improve events example

* update docs

* added .net 9 to target frameworks
excluded deprecated code in SystemNetHttpClient for .net 9 and above
added justfile and script to install required sdk versions
updated test commands to use .net 9 target (in justfile)
deleted global.json
updated build step in ci to read target frameworks from the project file

* Revert "added .net 9 to target frameworks"

This reverts commit 26a197a.

* fixed STJDefaultConverter to advance the reader even if the property is not known (#3223)

changed loop to a filter call for clarity

* Added STJ tests for deserializing null values (#3224)

* Add support for building on .NET 9 (#3222)

---------

Co-authored-by: David Brownman <109395161+xavdid-stripe@users.noreply.github.com>
Co-authored-by: Prathmesh Ranaut <165320323+prathmesh-stripe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants