Nager.Country 4.0.0

The ID prefix of this package has been reserved for one of the owners of this package by Prefix Reserved
.NET 6.0 .NET Standard 2.0 .NET Framework 4.8
dotnet add package Nager.Country --version 4.0.0
NuGet\Install-Package Nager.Country -Version 4.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nager.Country" Version="4.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nager.Country --version 4.0.0
#r "nuget: Nager.Country, 4.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Nager.Country as a Cake Addin
#addin nuget:?package=Nager.Country&version=4.0.0

// Install Nager.Country as a Cake Tool
#tool nuget:?package=Nager.Country&version=4.0.0


The Worldwirde Country Informations are available over the nuget package. The collection contains the Informations for 250 Countries.

If you need the translations of the countries you will find in the further nuget package Nager.Country.Translation

Code Examples

Get CountryInfo - Germany via Alpha2Code

ICountryProvider countryProvider = new CountryProvider();
var countryInfo = countryProvider.GetCountry(Alpha2Code.DE);
//countryInfo.CommonName -> Germany
//countryInfo.Alpha3Code -> DEU
//countryInfo.NumericCode -> 276
//countryInfo.Region -> Europe
//countryInfo.SubRegion -> WesternEurope

Get CountryInfo - Germany via CommonName

ICountryProvider countryProvider = new CountryProvider();
var countryInfo = countryProvider.GetCountryByName("Germany");
//countryInfo.Alpha2Code -> DE
//countryInfo.Alpha3Code -> DEU
//countryInfo.NumericCode -> 276
//countryInfo.Region -> Europe
//countryInfo.SubRegion -> WesternEurope
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Nager.Country:

Package Downloads

Virto Commerce is a flexible B2B ecommerce solution that offers powerful tools for enterprise business users.

Nager.Country.Translation The ID prefix of this package has been reserved for one of the owners of this package by

Get country translations and language translations for Nager.Country


Package Description


A NetTools extension for localization


Package Description

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Nager.Country:

Repository Stars
VirtoCommerce Platform repository
Blazor admin template based on Tabler UI
FreakyControls is a free OSS UI Kit for .NET MAUI which provides a set of controls and utilities to build modern mobile apps.
Version Downloads Last updated
4.0.0 12,428 4/11/2023
3.1.1 597,828 9/30/2021
3.1.0 27,391 7/20/2021
3.0.3 4,470 7/14/2021
3.0.1 99,449 1/27/2021
3.0.0 804 1/26/2021
2.0.0 12,522 12/29/2020
1.0.10 14,867 12/13/2020
1.0.9 331 12/9/2020
1.0.8 382 12/3/2020
1.0.4 134,060 6/25/2019
1.0.3 2,449 2/10/2019
1.0.2 555 1/31/2019
1.0.1 550 1/30/2019
1.0.0 623 1/29/2019

Change failure handling of GetCountry add new method TryGetCountry, some small fixes