Repository navigation
Refit 17.0.0 separates reflection-based clients from the core package, makes JSON behavior explicit, and moves modern .NET support to .NET 10 and .NET 11. This is a major release with framework, package and API changes. Rebuild all projects containing generated Refit clients after upgrading.
.NET 8 and .NET 9 removal
.NET 8 and .NET 9 reached Microsoft's end of support on 10 November 2026. Refit removes these targets so maintenance and dependency updates focus on supported modern runtimes. Retarget applications to .NET 10 LTS or .NET 11 before upgrading. See the .NET support policy.
.NET Framework 4.6.2 (net462) removal
Refit removes net462 ahead of Microsoft's 12 January 2027 end-of-support date. Combining this transition with the other breaking changes reduces the legacy build and dependency combinations we maintain. Remaining .NET Framework assets cover 4.7, 4.7.1, 4.7.2, 4.8 and 4.8.1; targets vary by package. Prefer 4.8 or 4.8.1 where supported. See the .NET Framework support policy.
Reflection and generated clients
RestService.For,RequestBuilder.ForTypeand reflection method metadata move to Refit.Reflection. Add that package to retain those APIs, or useRestService.ForGeneratedwith a source-generated JSON context.AddRefitClientandAddKeyedRefitClientmove to Refit.HttpClientFactory.Reflection. Generated client registration remains in Refit.HttpClientFactory.- Reflection, Newtonsoft.Json and XML integrations do not promise trimming or Native AOT compatibility. Use generated clients with System.Text.Json metadata for trimmed or Native AOT applications.
JSON defaults and API migration
- Default JSON uses numeric enums, rejects numbers encoded as strings, and reads
objectvalues asJsonElement. Configure converters, naming and number handling explicitly when an API requires another wire format. - JSON options require generated metadata or an explicitly registered reflection integration. Problem details use Refit's reader, including validation extensions.
- Custom URL formatters use
IParameterAttributeProvider. Custom content serializers must migrate from the removedGetFieldNameForPropertycontract. - Review the full Refit 17 migration guide for form bodies, enum formatting, generated code and reflection registration requirements.
Dependencies and examples
Updated ReactiveUI.Primitives to 10.0.0 and TUnit to 1.85.0. Microsoft dependencies retain separate .NET 10 and .NET 11 version bands, and deliberately bounded Roslyn versions remain unchanged. Removed the unused regular-expression package pin while retaining the documented cryptography security override. Retry examples use Refit's own HTTP retry handler, including server retry timing hints, without Polly dependencies. Documentation examples build for both modern runtimes and use generated metadata where required for trimming.
Upgrading
Package version numbers do not express the support lifecycle of the underlying runtime. Dependency majors and platform requirements can change independently. Check each package's target frameworks and dependencies before upgrading. If retargeting must wait, use a compatible Refit 16 release while planning the migration. Staying on an older package does not extend Microsoft's runtime support.
🗞️ What's Changed
💥 Breaking Changes
- 89779cd fix!: read problem details without a serializer, move reflection to Refit.Reflection, drop deprecated .NET 8/9 (#2374) @AtakanUk @glennawatson
🧹 General Changes
- b950c44 build(deps): refresh packages and use Refit retries @glennawatson
- f61f15a ci: simplify package publishing @glennawatson
- acfe9c9 build: drop net462 from the .NET Framework targets @glennawatson
- d400bc3 ci: use shared thread locking workflow @glennawatson
- be83d05 chore(deps): update NuGet packages (#2372) @glennawatson
- 092781b ci: align workflows with the shared actions-common layout @glennawatson
- 22d285b build: remove net8.0 and net9.0 leftovers, update packages @glennawatson
📝 Documentation
- df239ed docs: add V17 breaking changes (#2376) @glennawatson
📦 Dependencies
🔗 Full Changelog: v16.4.0...v17.0.0
🙌 Contributions
🌱 New contributors since the last release: @AtakanUk
💖 Thanks to all the contributors: @AtakanUk, @glennawatson
🤖 Automated services that contributed: renovate[bot]