Namespace or type 'System.Collections.ObjectModel' has already been imported

I attempted to utilize the Invoke Code Activity but encountered an error.


And I attempted to delete the NameSpace, but I was unsuccessful.

“Please, could you help me?”

@Cuong_Nguyen1

can you share the code which you have used in invoke code activity

It’s here, but I don’t think it matters because I only invoked an empty activity and it still resulted in an error.

Dim sortedRows = dtaListCancel.Rows.Cast(Of DataRow)().OrderBy(Function(x) x(“full_doc.type”).ToString).ThenBy(Function(x) CInt(x(“folio_number”)))
Dim sortedDataTable As DataTable = dtaListCancel.Clone()
For Each row In sortedRows
sortedDataTable.ImportRow(row)
Next
dtaResult = sortedDataTable.Copy()

I have run it in another project and it works.

Hi @Cuong_Nguyen1 ,

Could you let us know if you have transferred that activity or workflow from a different project to this project ?

in general we could avoid the invoke Code Blackbox as we can model it directly with essential activities

Hi,

I’m facing same issue in Windows-legacy project ,Studio 2023.10.0. As workaround, can you try to migrate your project to Windows, if possible?

image

Regards,

@Cuong_Nguyen1 ,

Could also check with the below which indicates the same problem but for a different namespace :

Let us know if you are unable to solve it with the same procedure. (Do take a backup of project before performing this step)