IndexField could not be found

Back in Sitecore 7, this attribute was found in the Sitecore.ContentSearch assembly, as of Sitecore 8 it was moved to Sitecore.ContentSearch.Linq, it is used to map an index field to a POCO property where the names are different, and the default provider cannot automatically map them. For more information about its use in Sitecore 9, have a read of the LINQ to Sitecore documentation.

Issue:

The type or namespace name 'IndexField' could not be found (are you missing a using directive or an assembly reference?)

Solution:

Install Sitecore.ContentSearch.Linq.NoReferences NuGet package.

IExecutionContext assembly not imported

Issue:

The type 'IExecutionContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'Sitecore.ContentSearch.Linq, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null'.

Solution:

Install Sitecore.ContentSearch.Linq.NoReferences NuGet package.