Skip to main content
Polly is available as a collection of NuGet packages. Install the packages you need based on your requirements.

Package Overview

Polly v8 is distributed across multiple NuGet packages:

Polly.Core

Core abstractions and built-in resilience strategies

Polly.Extensions

Dependency injection and telemetry support

Polly.RateLimiting

Integration with System.Threading.RateLimiting APIs

Polly.Testing

Testing utilities for resilience pipelines

Polly.Core

The core package provides the fundamental abstractions and built-in resilience strategies including Retry, Circuit Breaker, Hedging, Timeout, Chaos, and Fallback.
Minimum Requirements: .NET Standard 2.0, .NET Framework 4.6.2+, .NET 6+, .NET 8+
1

Install via .NET CLI

dotnet add package Polly.Core
2

Or use NuGet Package Manager Console

Install-Package Polly.Core
3

Or add to your .csproj file

<ItemGroup>
  <PackageReference Include="Polly.Core" Version="8.*" />
</ItemGroup>

Target Frameworks

Polly.Core supports multiple target frameworks:
  • .NET 8.0+
  • .NET 6.0+
  • .NET Standard 2.0
  • .NET Framework 4.7.2
  • .NET Framework 4.6.2
For .NET 8.0 and later, Polly.Core is AOT (Ahead-of-Time) compatible, making it suitable for native compilation scenarios.

Polly.Extensions

Provides integration with Microsoft.Extensions.DependencyInjection for managing resilience pipelines and adds telemetry support with built-in logging and metrics.
dotnet add package Polly.Extensions
Install this package if you’re using ASP.NET Core or any application that uses IServiceCollection for dependency injection.

Polly.RateLimiting

Integrates Polly with .NET’s System.Threading.RateLimiting APIs, providing concurrency limiters and sliding window rate limiters.
dotnet add package Polly.RateLimiting

Polly.Testing

Provides utilities for testing resilience pipelines, allowing you to assert on pipeline composition and strategy configuration.
dotnet add package Polly.Testing
This package is intended for test projects only. Do not include it in production code.

Complete Installation

For a full-featured installation with all capabilities, install both Polly.Core and Polly.Extensions:
dotnet add package Polly.Core
dotnet add package Polly.Extensions

Legacy Polly Package

The Polly package (without .Core suffix) contains the legacy v7 API. If you’re starting a new project, use the v8 packages listed above.
For migration from v7 to v8, see the migration guide.

Verify Installation

After installation, verify that Polly is available by adding this using statement to your code:
using Polly;

Next Steps

Now that you have Polly installed, proceed to the Quickstart guide to build your first resilience pipeline.

Build docs developers (and LLMs) love