ABP Framework — Core Skill
ABP Framework v10.x (10.4–10.6) (.NET 10) core reference. Opinionated, DDD-based, modular ASP.NET Core.
Trigger
"create ABP project", "ABP solution/template", "ABP module", "ABP architecture", "abp new", ABP best practices.
Solution Templates
| Template | Description |
|---|---|
| app | Layered (default) |
| app-nolayers | Single-layer |
| microservice | Microservice (Business+ license) |
| empty | Empty |
Modern Monolith / Modular Monolith can also be selected as a separate path in the ABP Studio wizard.
UI: mvc, angular, blazor-webapp, blazor (WASM), blazor-server, react (--modern), no-ui
DB: ef (default), mongodb
CLI (summary)
dotnet tool install -g Volo.Abp.Studio.Cli
abp new Acme.BookStore --template app # classic
abp new Acme.BookStore --template app --modern # React-first modern
abp new Acme.BookStore --template app --modern --modular # modular monolith
abp add-package Volo.Abp.EntityFrameworkCore
abp generate-proxy -t ng # ng | csharp | js
abp update
For details see CLI skill.
Layer Structure (Layered)
Domain.Shared → Domain → Application.Contracts → Application → HttpApi → Web/Host
↑ EntityFrameworkCore/MongoDB (only Host references it)
For dependency rules see Dependency Rules skill.
Module Class
[DependsOn(typeof(AbpAspNetCoreMvcModule), typeof(AbpEntityFrameworkCoreModule), typeof(AbpAutofacModule))]
public class BookStoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context) { } // DI + config
public override void OnApplicationInitialization(ApplicationInitializationContext context) { } // middleware (host only)
}
Lifecycle: PreConfigureServices → ConfigureServices → PostConfigureServices → OnApplicationInitialization (+ *Async versions).
DI (summary)
public class TaxCalculator : ITransientDependency { } // ISingletonDependency | IScopedDependency
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] public class X { }
[ExposeServices(typeof(ITaxCalculator))] public class TaxCalculator : ITaxCalculator, ITransientDependency { }
Base Class Pre-injected Services
ApplicationService / DomainService / AbpController provide these as properties — don't inject them:
| Property | Note |
|---|---|
| GuidGenerator | instead of Guid.NewGuid() |
| Clock | instead of DateTime.Now (test/timezone) |
| CurrentUser | user info |
| CurrentTenant | tenant context |
| L | localization (ApplicationService/AbpController) |
| AuthorizationService / FeatureChecker | permission/feature check |
| LazyServiceProvider | lazy resolution via LazyGetRequiredService<T>() |
| UnitOfWorkManager | UOW |
Async all-the-way — don't use .Result/.Wait(); methods should end with Async.
Pre-built Modules
Volo.Abp.Account, .Identity, .TenantManagement, .SettingManagement, .PermissionManagement, .FeatureManagement, .AuditLogging, .BackgroundJobs, .CmsKit, .OpenIddict (auth server, replacing IdentityServer from v6.0+).
Best Practices
- Define module dependencies with
[DependsOn] IGuidGenerator.Create()(sequential GUID),Clock(time)- Don't expose entities — use DTOs
- Mapperly (default since v10.4) object mapping
- Inject
IRepository<TEntity, TKey>, rely on UOW conventions
Version Detection & v10.5
Covers ABP 10.x (10.4–10.6, .NET 10). Detect the solution's version from the Volo.Abp.* package version in Directory.Packages.props / *.csproj; no solution → assume latest stable (v10.6). v10.5 has no breaking changes over 10.4. New in v10.5 (only suggest when version ≥ 10.5): S3-compatible blob storage (ServiceURL), background worker capability markers (ISupportsRuntimeRegistration/ISupportsCronScheduling), single-active identity token providers (AbpDefaultTokenProvider), opt-in OpenIddict default-scope fallback, MySQL ResourcePermissionGrant index fix, Blazorise 2.2.1 / MongoDB.Driver 3.9.0. Migration guide: https://abp.io/docs/latest/release-info/migration-guides/abp-10-5
New in v10.6 (only suggest when version ≥ 10.6; opt-in, no breaking changes for typical apps): background job dedicated workers / parallel execution / successful-job retention (AbpBackgroundJobWorkerOptions, EF CompletionTime column), API definition response ContentTypes + IsRemoteStream with multipart FormData upload proxies, Angular 22.0.x, antiforgery user-id claim issuer normalization (AbpAntiForgeryOptions.NormalizeUserIdClaimIssuer, default on), access-token forwarding for authenticated client requests, ThreadCurrentPrincipalAccessor returns an anonymous principal. Deps: MongoDB.Driver 3.10.0, Swashbuckle 10.2.3. Migration guide: https://abp.io/docs/latest/release-info/migration-guides/abp-10-6
Related
- DDD · Modularity · Dependency Injection · CLI · Dependency Rules · Microservices
- ABP Docs: https://abp.io/docs/latest