Wednesday, April 7, 2010

Resolving The: 'AsEnumerable' is not a member of 'System.Data.DataTable' Runtime Error

If you begin writing some LINQ to DataSet queries, and try to find the .AsEnumerable function exposed on a DataTable, you will see the following design time error occur:

'AsEnumerable' is not a member of 'System.Data.DataTable'

This is because this functionality exists in the System.Data.DataSetExtensions namespace. Add a reference to this .dll and the error will resolve, and this functionality will become available.


  1. Thanks so much!
    Just what i needed.

  2. Thanks man !!!
    My code works again !

  3. Thank you!
    It's help me.

  4. Another reason can be that the dataset is out of date. Use Run Custom Tool to make it up to date and add reference to System.Data.DataSetExtensions as this article says.
    Thank you for guide.

  5. Thank you! It's resolved my issue.