Installation

edit

This page shows you how to install the .NET client for Elasticsearch.

The v8 client for .NET does not have complete feature parity with the v7 NEST client. It may not be suitable for for all applications until additional endpoints and features are supported. We therefore recommend you thoroughly review our release notes before attempting to migrate existing applications to the Elastic.Clients.Elasticsearch library. Until the new client supports all endpoints and features your application requires, you may continue to use the 7.17.x NEST client to communicate with v8 Elasticsearch servers using compatibility mode. Refer to the Connecting to Elasticsearch v8.x using the v7.17.x client documentation for guidance on configuring the 7.17.x client.

Installing the .NET client

edit

For SDK style projects, you can install the Elasticsearch client by running the following .NET CLI command in your terminal:

dotnet add package Elastic.Clients.Elasticsearch

This command adds a package reference to your project (csproj) file for the latest stable version of the client.

If you prefer, you may also manually add a package reference inside your project file:

<PackageReference Include="Elastic.Clients.Elasticsearch" Version="{latest-version}" />

NOTE: The version number should reflect the latest published version from NuGet.org. To install a different version, modify the version as necessary.

For Visual Studio users, the .NET client can also be installed from the Package Manager Console inside Visual Studio using the following command:

Install-Package Elastic.Clients.Elasticsearch

Alternatively, search for Elastic.Clients.Elasticsearch in the NuGet Package Manager UI.

To learn how to connect the Elasticsearch client, refer to the Connecting section.

Compatibility

edit

The Elasticsearch client is compatible with currently maintained .NET runtime versions. Compatibility with End of Life (EOL) .NET runtimes is not guaranteed or supported.

Language clients are forward compatible; meaning that the clients support communicating with greater or equal minor versions of Elasticsearch without breaking. It does not mean that the clients automatically support new features of newer Elasticsearch versions; it is only possible after a release of a new client version. For example, a 8.12 client version won’t automatically support the new features of the 8.13 version of Elasticsearch, the 8.13 client version is required for that. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.

Elasticsearch Version Elasticsearch-NET Branch Supported

main

main

8.x

8.x

8.x

7.x

7.x

7.17

Refer to the end-of-life policy for more information.

CI feed

edit

We publish CI builds of our client packages, including the latest unreleased features. If you want to experiment with the latest bits, you can add the CI feed to your list of NuGet package sources.

Feed URL: https://f.feedz.io/elastic/all/nuget/index.json

We do not recommend using CI builds for production applications as they are not formally supported until they are released.