简体   繁体   English

如何修复 Microsoft Botframework v4 中的“DataTable”不包含“AsEnumerable”错误的定义?

[英]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.

相关问题 DataTable不包含“ AsEnumerable”的定义 - DataTable does not contain a definition for 'AsEnumerable' DataTable 不包含 AsEnumerable 的定义 - DataTable does not contain definition for AsEnumerable dt.AsEnumerable()上的错误-&#39;System.Data.DataTable&#39;不包含&#39;AsEnumerable&#39;的定义 - Error on dt.AsEnumerable() - 'System.Data.DataTable' does not contain a definition for 'AsEnumerable' 如何修复错误:“ Microsoft.Devices.PhotoCamera”不包含“ IsFocusAtPointSupported”的定义…在Windows Phone 7.1应用程序中 - How to fix error: 'Microsoft.Devices.PhotoCamera' does not contain a definition for 'IsFocusAtPointSupported' … in windows phone 7.1 application Microsoft BotFramework v4任务计划和状态 - Microsoft BotFramework v4 Task schedule and States 如何在botframework v4中重新提示? - How to reprompt in botframework v4? 如何使用 c# 在 microsoft botframework sdk V4 中获取异常的堆栈跟踪以及默认错误消息 - How can I get stack trace of an exception along with the default error message in microsoft botframework sdk V4 using c# 如何解决“不包含定义”错误? - How do I fix this “Does Not Contain Definition” Error? 如何在 Botframework V4 中触发对话结束? - How to Trigger End of Conversation in Botframework V4? 如何使用c#发送microsoft botframework sdk v4中本地文件夹中的图像 - how to send images which are in local folder in microsoft botframework sdk v4 using c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM