# 'IElasticClient' does not contain a definition for 'CreateIndex' Error

**URL:** https://discuss.elastic.co/t/ielasticclient-does-not-contain-a-definition-for-createindex-error/191472
**Category:** Elasticsearch
**Created:** [July 20, 2019, 8:01am UTC](https://discuss.elastic.co/t/ielasticclient-does-not-contain-a-definition-for-createindex-error/191472 "2019-07-20T08:01:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ilyoskhuja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilyoskhuja/32/47524_2.png) [@Ilyoskhuja](https://discuss.elastic.co/u/Ilyoskhuja)
#### Post date: [July 20, 2019, 8:01am UTC](https://discuss.elastic.co/t/ielasticclient-does-not-contain-a-definition-for-createindex-error/191472/1 "2019-07-20T08:01:07Z")

</div>

I removed my nest 6.5 from [asp.net](http://asp.net) core project , and add nest 7.1.0 ( package "[Elasticsearch.Net/7.1.0](http://Elasticsearch.Net/7.1.0)")but i have error like ( 'IElasticClient' does not contain a definition for 'CreateIndex' ) . How Fix this error?

---

<div class="post-metadata">

### Author: ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)
#### Post date: [July 21, 2019, 11:12pm UTC](https://discuss.elastic.co/t/ielasticclient-does-not-contain-a-definition-for-createindex-error/191472/2 "2019-07-21T23:12:46Z")

</div>

API methods have been namespaced on the client. For example,

in NEST 6.x

```auto
client.CreateIndex(...)

```

becomes the following in NEST 7.x

```auto
client.Indices.Create(...)

```

Check out the [release notes](https://github.com/elastic/elasticsearch-net/releases/tag/7.0.0) and [blog post](https://www.elastic.co/blog/nest-and-elasticsearch-net-7-0-now-ga) on NEST 7.0.0 for more details. Whilst migrating to 7.x, the [NEST.7xUpgradeAssistant](https://www.nuget.org/packages/NEST.7xUpgradeAssistant) nuget package can help, by providing the old API method names that will invoke the new namespaced methods, providing a compiler warning to allow you to migrate over.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 18, 2019, 11:12pm UTC](https://discuss.elastic.co/t/ielasticclient-does-not-contain-a-definition-for-createindex-error/191472/3 "2019-08-18T23:12:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
