SplatDev.Umbraco.Plugins.Countries
2.2.1
dotnet add package SplatDev.Umbraco.Plugins.Countries --version 2.2.1
NuGet\Install-Package SplatDev.Umbraco.Plugins.Countries -Version 2.2.1
<PackageReference Include="SplatDev.Umbraco.Plugins.Countries" Version="2.2.1" />
<PackageVersion Include="SplatDev.Umbraco.Plugins.Countries" Version="2.2.1" />
<PackageReference Include="SplatDev.Umbraco.Plugins.Countries" />
paket add SplatDev.Umbraco.Plugins.Countries --version 2.2.1
#r "nuget: SplatDev.Umbraco.Plugins.Countries, 2.2.1"
#:package SplatDev.Umbraco.Plugins.Countries@2.2.1
#addin nuget:?package=SplatDev.Umbraco.Plugins.Countries&version=2.2.1
#tool nuget:?package=SplatDev.Umbraco.Plugins.Countries&version=2.2.1
Countries


Umbraco countries data plugin — seeds and maintains a countries database table with ISO country codes, names, and nationality data. Supports Umbraco 13 (net8.0) and Umbraco 17 (net10.0).
Compatibility
| Umbraco | .NET | Package Version |
|---|---|---|
| 13.x | 8.0 | 2.2.1 |
| 17.x | 10.0 | 2.2.1 |
Installation
dotnet add package SplatDev.Umbraco.Plugins.Countries
Quick Start
No registration call is needed. The package ships Umbraco composers, so the AddComposers() already in the default Program.cs picks the plugin up as soon as the package is referenced.
On first startup, the plugin runs an Umbraco migration that creates the countries table and bulk-inserts country data from a CSV file.
Configuration
The migration expects a CSV file at C:\Temp\countries.csv. Supply your own country data or pre-seed with a file containing these columns (matching the Country model):
| Column | Type | Example |
|---|---|---|
numCode |
int | 76 |
alpha2Code |
string | BR |
alpha3Code |
string | BRA |
enShortName |
string | Brazil |
nationality |
string | Brazilian |
If the countries table already exists (e.g., after deployments), the migration skips creation silently.
Usage
Querying Countries
The Country entity is mapped via NPoco. Query it from any Umbraco service or directly via the IUmbracoDatabase:
using SplatDev.Umbraco.Plugins.Countries.Models;
using Umbraco.Cms.Infrastructure.Persistence;
public class CountryService(IUmbracoDatabaseFactory dbFactory)
{
public IEnumerable<Country> GetAll()
{
using var db = dbFactory.CreateDatabase();
return db.Fetch<Country>("SELECT * FROM countries ORDER BY enShortName");
}
}
Common Queries
// Find by alpha-2 code
var br = db.FirstOrDefault<Country>("WHERE alpha2Code = @0", "BR");
// Search by name
var results = db.Fetch<Country>("WHERE enShortName LIKE @0", $"%{query}%");
Architecture
| Component | Role |
|---|---|
Country (NPoco entity) |
Maps to countries table — id, numCode, alpha2Code, alpha3Code, enShortName, nationality |
CountryMigration |
Creates table and bulk-inserts from CSV (skips if exists) |
CountrySchemaMigrationComposer |
Registers the migration plan via Umbraco's Upgrader |
Changelog
2.2.1 — 2026-08-25
Documentation only, no code change. The README's Quick Start told you to call a registration method that does not exist in this package — following it produced a compile error on the first build. There is nothing to register: the package ships Umbraco composers and the AddComposers() already in the default Program.cs finds it. The Compatibility table also now shows the version actually being shipped instead of the one it was written at.
2.2.0 — 2026-08-23
The property editor can now be used. Its manifest declared a property editor schema with no server-side editor behind it, so Umbraco refused to create a data type for it with "The targeted property editor was not found". It now stores its value with a schema the server actually provides.
The Umbraco Marketplace listing now carries this plugin's screenshots. The listing keeps its own screenshot list rather than reading the README, and this one was empty — so the entry showed no images at all.
2.1.0 — 2026-08-23
- The country list is actually populated. The migration read from
C:\Temp\countries.csv— a hardcoded absolute path on someone's machine. No install has that file, and on Linux the drive letter is not even meaningful, so the read threw, the migration never completed, and Umbraco retried and failed it on every boot with the table left empty. - The CSV that ships beside the code was never referenced by the project either, so pointing at it on disk would not have helped: it was not in the package. The list now travels inside the assembly.
- There is a Country property editor. The plugin created a countries table and gave nobody a way to use it — no controller, no UI, no data type — so editors typed country names by hand, which is how a site ends up with USA, U.S.A. and United States in one field.
- Which code is stored is configurable: two-letter, three-letter, numeric or the name.
License
MIT © SplatDev
Architecture
This is a headless data plugin — no backoffice dashboard, property editors, or UI components. It operates as a database seeding service with NPoco query helpers, registered via DI composition.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CsvHelper (>= 33.1.0)
- Microsoft.Extensions.FileProviders.Embedded (>= 10.0.6)
- Umbraco.Cms.Core (>= 17.3.4)
- Umbraco.Cms.Infrastructure (>= 17.3.4)
- Umbraco.Cms.Web.Common (>= 17.3.4)
-
net8.0
- CsvHelper (>= 33.1.0)
- Microsoft.Extensions.FileProviders.Embedded (>= 8.0.11)
- Umbraco.Cms.Core (>= 13.12.0)
- Umbraco.Cms.Infrastructure (>= 13.12.0)
- Umbraco.Cms.Web.Common (>= 13.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.1 | 0 | 8/25/2026 |