0

I downloaded Visual Studio for Mac to give it a try. I am working with data and linq. When I try the following, AsEnumerable does not exist.

using System.Linq;
using System.Data;

namespace TestingDataTable2
{
    class Program
    {
        static void Main(string[] args)
        {
            DataTable dt = new DataTable();
            var query = from r in dt.AsEnumerable()

        }
    }
}

Has anyone else ran into this problem with VS for Mac. If I go into my References it is blank. This seems like a fairly important feature to leave out, and I am wondering if this is the case, or if I did something wrong when downloading.

Edit: Error Message is - 'DataTable' does not contain a definition for 'AsEnumerable' and no accessible extension method 'AsEnumerable' accepting a first argument of type 'DataTable' could be found (are you missing a using directive or an assembly reference?)

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Mwspencer
  • 1,142
  • 3
  • 18
  • 35

1 Answers1

3

Did you install the System.Data.DataSetExtensions package from NuGet?

https://www.nuget.org/packages/System.Data.DataSetExtensions/4.5.0

Moho
  • 15,457
  • 1
  • 30
  • 31