Exploring all things .NET and beyond...

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.

6 comments:

Anonymous said...

Thanks so much!
Just what i needed.

Anonymous said...

Thanks man !!!
My code works again !

Anonymous said...

Thanks alot

Anonymous said...

Thank you!
It's help me.

Anonymous said...

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.

Anonymous said...

Thank you! It's resolved my issue.

Post a Comment