Auto* Suite
Roslyn-powered .NET productivity suite

The Auto* Suite

Compile-time .NET source generators that eliminate boilerplate — zero reflection, AOT-safe, IDE-first.

By Justin Bannister · LinkedIn · GitHub

One attribute. Generated at build time. No runtime overhead.

A cohesive generator-first product suite

Purpose-built packages for dependency injection, mapping, validation, result handling, queries, CQRS, logging, and HTTP clients — all sharing the same compile-time, zero-reflection approach.

Dependency injection

AutoWire

Compile-time DI registration — decorate your services and AutoWire generates AddAutoWireServices() at build time.

[Scoped] / [Singleton] / [Transient]
AutoWire NuGet version badge
$ dotnet add package AutoWire copy
Object mapping

AutoMap.Generator

Compile-time object mapping — generates strongly-typed ToDto() extension methods. No AutoMapper, no reflection.

[Map(typeof(OrderDto))]
AutoMap.Generator NuGet version badge
$ dotnet add package AutoMap.Generator copy
Validation wiring

AutoValidate.Generator

Compile-time FluentValidation wiring — discovers all AbstractValidator<T> subclasses and generates AddValidators().

Convention-based discovery, no attribute needed
AutoValidate.Generator NuGet version badge
$ dotnet add package AutoValidate.Generator copy
Result handling

AutoResult.Generator

Compile-time Result<T> monad — [TryWrap] generates Try*() wrappers for every public method. Zero-ceremony error handling.

[TryWrap]
AutoResult.Generator NuGet version badge
$ dotnet add package Swevo.AutoResult copy
Query specifications

AutoQuery.Generator

Compile-time LINQ query specs — generates a strongly-typed Apply(IQueryable<T>) method from a plain query class.

[QuerySpec(typeof(Product))]
AutoQuery.Generator NuGet version badge
$ dotnet add package AutoQuery.Generator copy
CQRS dispatch

AutoDispatch.Generator

Compile-time CQRS dispatcher — generates a strongly-typed IDispatcher from [Handler] classes. No MediatR, no IRequest<T>.

[Handler]
AutoDispatch.Generator NuGet version badge
$ dotnet add package AutoDispatch.Generator copy
Logging

AutoLog.Generator

Compile-time high-performance logging — generates LoggerMessage.Define calls from a simple attribute. AOT-safe, zero boilerplate.

[Log(LogLevel.Information, "Order {OrderId} created")]
AutoLog.Generator NuGet version badge
$ dotnet add package AutoLog.Generator copy
HTTP clients

AutoHttpClient.Generator

Compile-time typed HTTP client generation — annotate an interface with [HttpClient] and HTTP verb attributes, get a strongly-typed implementation. AOT-safe Refit alternative.

[HttpClient] / [Get] / [Post]
AutoHttpClient.Generator NuGet version badge
$ dotnet add package AutoHttpClient.Generator copy

Why compile-time?

The Auto* ecosystem leans on source generators so your architecture stays explicit, traceable, and production-ready without reflection-heavy frameworks.

Performance

Zero runtime overhead

Registration, mapping, and dispatch happen at build time. Your app starts faster.

Developer experience

IDE-first

Navigate to generated code with F12. Roslyn diagnostics appear as squiggles. Lightbulb fixes available.

Deployment

AOT-safe

No reflection means full compatibility with .NET Native AOT, Blazor WebAssembly, and trimmed deployments.

Replacing familiar libraries

Each Auto* package is a focused, drop-in alternative to a well-known library — same job, zero reflection, AOT-safe.

If you use… Switch to… Why
AutoMapper AutoMap.Generator No profiles, no IMapper, no DI — just [Map(typeof(Dto))]
MediatR AutoDispatch.Generator No IRequest<T> markers, no reflection, build-time generated dispatch
Scrutor AutoWire ∼19× faster startup, 65% less memory — registration generated at build time
Refit AutoHttpClient.Generator Fully typed HTTP clients generated at compile time, no runtime IL emit

More free, MIT tools

Beyond the generator suite: free, MIT-licensed alternatives to commercially-licensed dev tools — PDF generation, messaging, architecture testing, bulk EF Core operations, test assertions, Roslyn resilience analyzers, and a CI retry Action.

PDF generation

FluentPdf

Free, MIT-licensed fluent PDF generation — alternative to IronPDF/Aspose.PDF's commercial license.

FluentPdf NuGet version badge
$ dotnet add package Swevo.FluentPdf copy
Messaging

AutoBus

Free, MIT-licensed message bus — alternative to MassTransit's paid tiers.

AutoBus NuGet version badge
$ dotnet add package Swevo.AutoBus copy
Architecture testing

AutoArchitecture

Free Roslyn analyzers enforcing architecture rules — alternative to NetArchTest/ArchUnitNET.

AutoArchitecture NuGet version badge
$ dotnet add package AutoArchitecture copy
EF Core

EFCore.BulkOperations

Free bulk insert/update/delete for EF Core — alternative to EFCore.BulkExtensions' commercial features.

EFCore.BulkOperations NuGet version badge
$ dotnet add package Swevo.EFCore.BulkOperations copy
Testing

AutoAssert

Free, MIT-licensed fluent assertions — alternative to FluentAssertions' commercial license.

AutoAssert NuGet version badge
$ dotnet add package Swevo.AutoAssert copy
Resilience analyzers

PollyAnalyzers

Free Roslyn analyzers for async/resilience anti-patterns — blocking calls, async void, fire-and-forget tasks, swallowed exceptions.

PollyAnalyzers NuGet version badge
$ dotnet add package Swevo.PollyAnalyzers copy
GitHub Action

PollyAction

Free retry/backoff wrapper for any CI step — exponential backoff, zero config, MIT licensed.

PollyAction release badge
$ uses: Swevo/PollyAction@v1 copy
Image processing

AutoImage

Free, MIT-licensed fluent image resize/crop/rotate/grayscale wrapper around SkiaSharp — alternative to ImageSharp's Six Labors Split License (paid above $1M revenue).

AutoImage NuGet version badge
$ dotnet add package Swevo.AutoImage copy

Full catalog (60+ packages)

Every package below is free and MIT-licensed. Most Polly* packages add drop-in resilience (retry/timeout/circuit-breaker) for a specific library or service; EFCore.* packages are compile-time EF Core extensions in the same zero-reflection style as the generator suite.

Polly resilience integrations (31 packages) — retry/timeout/circuit-breaker for your stack
PollyAzureBlobRetry/timeout/circuit-breaker for Azure Blob Storage (BlobClient)
PollyAzureEventHubResilience for Azure Event Hubs (EventHubProducerClient)
PollyAzureKeyVaultResilience for Azure Key Vault (SecretClient)
PollyAzureQueueStorageResilience for Azure Queue Storage (QueueClient)
PollyAzureServiceBusResilience for Azure Service Bus sender/receiver
PollyAzureTableStorageResilience for Azure Table Storage (TableClient)
PollyBackoffBackoff delay strategies — decorrelated jitter, exponential, linear, constant
PollyChaosChaos engineering / fault-injection strategies for Polly v8
PollyCosmosDbResilience for Azure Cosmos DB container operations
PollyDapperResilient Dapper decorator — QueryAsync/ExecuteAsync with retry/timeout/circuit-breaker
PollyEFCoreResilience for every EF Core query and SaveChanges via one DI line
PollyElasticsearchResilience for Elastic.Clients.Elasticsearch operations
PollyGrpcResilience for gRPC .NET clients via Interceptor
PollyHangfireResilience for Hangfire's IBackgroundJobClient
PollyHealthChecksASP.NET Core health checks for Polly v8 circuit breakers
PollyKafkaResilience for Confluent.Kafka producers and consumers
PollyMailKitResilience for MailKit SMTP sending
PollyMassTransitProducer-side resilience for MassTransit IBus.Publish/Send
PollyMediatRResilience pipelines for any MediatR request handler
PollyMongoResilient MongoDB.Driver decorator for common IMongoCollection calls
PollyNpgsqlResilience for Npgsql (PostgreSQL) with transient-error predicate
PollyOpenAIResilience for OpenAI/Azure OpenAI calls — 429 + Retry-After aware
PollyRabbitMQResilience for RabbitMQ.Client's IChannel
PollyRateLimiterFixed-window, token-bucket, sliding-window rate limiting for Polly v8
PollyRedisResilience for StackExchange.Redis with DI integration
PollySendGridResilience for SendGrid with 429/500/503 detection
PollySignalRExponential back-off reconnect policy for SignalR, drop-in for WithAutomaticReconnect
PollySqlClientResilience for SQL Server / Azure SQL SqlConnection
Polly.Contrib.BulkheadBulkhead isolation strategy for Polly v8 pipelines
Polly.Contrib.CachingCaching resilience strategy for Polly v8 pipelines
Polly-Contrib-OpenTelemetryOpenTelemetry instrumentation for Polly v8 pipelines
EF Core extensions (8 packages) — compile-time, zero-reflection
EFCore.JsonColumn[JsonColumn] generates OwnsOne(...ToJson()) configuration automatically
EFCore.MultiTenant[Tenant] source generator + save interceptor + automatic query filters
EFCore.OutboxTransactional outbox pattern for EF Core + MassTransit
EFCore.PaginationOffset and cursor (keyset) pagination — ToPageAsync / ToCursorPageAsync
EFCore.RowVersion[Optimistic] generates RowVersion + client-wins/database-wins conflict handlers
EFCore.SeedingFluent, idempotent, dependency-ordered seed data via IEntitySeed<T>
EFCore.SoftDelete[SoftDelete] generates IsDeleted/DeletedAt, interceptor, and global query filter
EFCore.StronglyTyped[StronglyTypedId] generates value types with EF Core converter + System.Text.Json support
More Auto* utilities & test kits (7 packages)
AutoAuthFluent configuration wrapper around OpenIddict — a Duende IdentityServer alternative
AutoAudit[Auditable] generates CreatedAt/UpdatedAt/CreatedBy/UpdatedBy + EF Core interceptor
AutoFeatureFlag[FeatureFlags] on an enum generates a strongly-typed flags interface. No strings.
AutoGuardCompile-time guard clauses from primary constructor parameters — [NotNull]/[InRange]/[NotEmpty]/[Matches]
FluentExcelFree, MIT-licensed fluent Excel generation — alternative to EPPlus's commercial subscription
HttpClient.TestKitFakeHttpMessageHandler for unit-testing HttpClient calls, zero dependencies
MassTransit.RequestClient.TestKitFakeRequestClient<T> / FakePublishEndpoint for unit-testing MassTransit without a real bus

Browse all repositories on GitHub →