[英]How to fix 'DataTable' does not contain a definition for 'AsEnumerable' Error in Microsoft Botframework v4?
Hi i'm doing a chatBot project with Microsoft Botframework V4 in c# with VS.嗨,我正在使用带有 VS 的 c# 中的 Microsoft Botframework V4 做一个聊天机器人项目。 Actually the project is a migration from Botframework v3 to V4.
实际上,该项目是从 Botframework v3 到 V4 的迁移。 In v4, how to use DataTable extensions.
在 v4 中,如何使用 DataTable 扩展。 Like CopytoDataTable works only in v3 and not in v4.
像 CopytoDataTable 仅在 v3 中有效,在 v4 中无效。
The Usings for datatable extensions like 'using system.data.datasetextensions'数据表扩展的使用,例如“使用 system.data.datasetextensions”
DataTable ResultTable = new DataTable(); DataTable TempTable = query.CopyToDataTable<DataRow>(); ResultTable.Merge(TempTable); ResultTable = ResultTable.DefaultView.ToTable()
Error is 'DataTable' does not contain a definition for 'AsEnumerable' and the best extension method overload 'ConfigurationExtensions.AsEnumerable(IConfiguration)' requires a receiver of type 'IConfiguration'错误是“DataTable”不包含“AsEnumerable”的定义,并且最佳扩展方法重载“ConfigurationExtensions.AsEnumerable(IConfiguration)”需要“IConfiguration”类型的接收器
DataTable.AsEnumerable()
is an extension-method defined in System.Data.DataSetExtensions
. DataTable.AsEnumerable()
是在System.Data.DataSetExtensions
中定义的扩展方法。
If you're targeting .NET Framework 4.x then in your project add a reference to that framework assembly ( System.Data.DataSetExtensions.dll
).如果您的目标是 .NET Framework 4.x,那么在您的项目中添加对该框架程序集的引用(
System.Data.DataSetExtensions.dll
)。
If you're targeting .NET Core, add a NuGet package reference to System.Data.DataSetExtensions
( https://www.nuget.org/packages/System.Data.DataSetExtensions ) If you're targeting .NET Core, add a NuGet package reference to
System.Data.DataSetExtensions
( https://www.nuget.org/packages/System.Data.DataSetExtensions )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.