docs/en/framework/architecture/modularity/installer-projects.md
Each ABP module includes an .Installer project (e.g., Volo.Abp.Account.Installer) that serves as a Virtual File System container for module installation and resource management. These projects are essential for the ABP CLI to understand and install modules properly.
Installer projects have three main purposes:
.abpmdl and .abppkg) as embedded resources{ModuleName}.Installer.csproj: References Volo.Abp.VirtualFileSystem and embeds module metadata filesInstallationNotes.md: Documentation for the moduleVolo/Abp/{ModuleName}/Abp{ModuleName}InstallerModule.cs: The core module class that registers embedded resourcesusing Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.Account;
[DependsOn(typeof(AbpVirtualFileSystemModule))]
public class AbpAccountInstallerModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpAccountInstallerModule>();
});
}
}
The .csproj file embeds module metadata as content:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.VirtualFileSystem\Volo.Abp.VirtualFileSystem.csproj" />
</ItemGroup>
<ItemGroup>
<!-- Embed module definition file -->
<Content Include="..\..\Volo.Abp.Account.abpmdl">
<Pack>true</Pack>
<PackagePath>content\</PackagePath>
</Content>
<!-- Embed package definition files -->
<Content Include="..\..\**\*.abppkg*">
<Pack>true</Pack>
<PackagePath>content\</PackagePath>
</Content>
</ItemGroup>
</Project>
.abpmdl (Module Definition)The module definition file describes the module's structure and packages:
{
"folders": {
"items": {
"src": {},
"test": {}
}
},
"packages": {
"Volo.Abp.Account.Web": {
"path": "src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.abppkg",
"folder": "src"
},
"Volo.Abp.Account.Application": {
"path": "src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.abppkg",
"folder": "src"
}
}
}
.abppkg (Package Definition)Each package has a definition file that specifies its role:
{
"role": "lib.application"
}
Common roles:
lib.application: Application layer packagelib.mvc: MVC/Web layer packagelib.domain: Domain layer packagelib.domain-shared: Shared domain layer packagelib.efcore: Entity Framework Core packageWhen you run abp add-module Volo.Abp.Account:
Volo.Abp.Account.Installer from NuGet.abpmdl file to understand module structure.abppkg files to understand package rolesThe InstallerModule registers itself with the Virtual File System:
options.FileSets.AddEmbedded<AbpAccountInstallerModule>();
This makes embedded resources available at runtime and enables:
{ModuleName}.Installer.csprojAbp{ModuleName}InstallerModule.csInstallationNotes.md{ModuleName}.abpmdl (in module root){PackageName}.abppkg (in each package)modules/your-module/
├── src/
│ ├── Volo.Abp.YourModule.Installer/
│ │ ├── Volo.Abp.YourModule.Installer.csproj
│ │ ├── InstallationNotes.md
│ │ └── Volo/
│ │ └── Abp/
│ │ └── YourModule/
│ │ └── AbpYourModuleInstallerModule.cs
│ └── [other packages]/
├── Volo.Abp.YourModule.abpmdl
└── [other module files]
For different package types:
// Application package
{ "role": "lib.application" }
// MVC package
{ "role": "lib.mvc" }
// Domain package
{ "role": "lib.domain" }
// EF Core package
{ "role": "lib.efcore" }
Installer projects appear minimal because their primary function is infrastructure, not business logic:
{ModuleName}.Installer for the project nameInstallationNotes.md with module informationVolo.Abp.VirtualFileSystem.abpmdl and .abppkg filesabp add-module commanddotnet build.abpmdl and .abppkg files are embeddedabp add-module YourModuleThis installer system enables ABP's sophisticated module architecture, allowing for automated installation with proper dependency resolution and project type matching.