Error using CopyToDataTable Method

Hello!

I’ve just downloaded Studio 2020.3.0-beta.84 | Community License.

I’m having problem to using the CopyToDataTable method in the code below:

baseDT.Select(“[Nome]='gabriel”).CopyToDataTable()

The error is:
“‘CopyToDataTable’ is not a member of ‘System.Array’”.

I’ve already tried to import System.Data.DataSetExtensions package from “Manage Packages” and it returns an error. I’ve tried also directly through “Imports” on Studio and returns nothing.

I’ve already searched on this forum and didn’t get anything to solve this problem.

Is the problem due to a beta version?

Could you please help me?

Thanks in advance.

2 Likes

@gabriel.novo
have a look here

1 Like

I’ve already check this topic but it didn’t solve.

Maybe because I’m not inserting the line correctly.

Above it can be noticed the code in the .json file:
{
“name”: “TesteDataTable”,
“description”: “Blank Process”,
“main”: “Main.xaml”,
“dependencies”: {
“UiPath.Excel.Activities”: “[2.8.2-preview]”,
“UiPath.Mail.Activities”: “[1.8.2-preview]”,
“UiPath.System.Activities”: “[20.3.0-preview]”,
“UiPath.UIAutomation.Activities”: “[20.3.0-alpha]”
},
“webServices”: ,
“schemaVersion”: “4.0”,
“studioVersion”: “20.3.0.84”,
“projectVersion”: “1.0.0”,
“runtimeOptions”: {
“autoDispose”: false,
“isPausable”: true,
“requiresUserInteraction”: true,
“supportsPersistence”: false,
“excludedLoggedData”: [
“Private:*”,
password
],
“executionType”: “Workflow”
},
“designOptions”: {
“projectProfile”: “Developement”,
“outputType”: “Process”,
“libraryOptions”: {
“includeOriginalXaml”: false,
“privateWorkflows”:
},
“fileInfoCollection”:
},
“expressionLanguage”: “VisualBasic”
}

Where exactly should I insert the information ( System.Data.DataSetExtensions) mentioned in the post?

Thanks!

@gabriel.novo
its not the project.json. It is the XAML file in that you are working where you have to add <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>

4 Likes

@gabriel.novo

As @ppr said, you need to open Main.xaml in Notepad and add that line and save it. Once done refresh the project.

Nice, guys!

It’s worked perfectly!

Thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.