Value cannot be null. (Parameter 'collection')

Dears,
When executing “Analyze Project” I goth the following error :


Knowing that, no error reported when using " Validate Project" and “Validate file”. Thx

Hi @hsendel

May be you have not passed the variables in invoke workflow file.

Regards,

1 Like

Thanks @Parvathy for quick reply, in fact I don’t have “invoke workflow file” activity in my workflow. Just to add and info that might help, that I’m using Form Activity.

@hsendel

Make sure you have the variables correctly for the activity.
If the variable is list or dictionary you can initliaze it this way

Str_list= New List(Of String)
Str_dict= New Dictionary(Of String, String)

Regards

1 Like

Hi @hsendel

If you have any collection variables in the project, make sure you have initialized the collection variable before using it.
Like this: listVar = New list(of String) and dataTable = New Datatable()

1 Like

Hi,

If possible, can you share your project? It’s no problem to delete unnecessary part if the issue is reproduced

Regards,

1 Like

Thanks @Parvathy and @supriya117 , is your recommendation will be applied for my below Assign ?
Directory.GetFiles(“MyFolder”).Select(Function(d) System.IO.Path.GetFileNameWithoutExtension(New FileInfo(d).ToString)).ToList()

I’ve checked all remaining defined variables, all starts with New (Of String)

Note : Above variable is to get the file names from MyFolder and save them into a list.

Hi @hsendel

Try with this syntax:

 fileNames = Directory.GetFiles("MyFolder").Select(Function(d) Path.GetFileNameWithoutExtension(d)).ToList()

Regards

1 Like

Seems I have issue as follows: my workflow is using file : project.json which is outside the main folder “MyFolder”, and when deleting that and using the one collocated with Main.xaml file,this error disappears

@Parvathy I notice that using your syntax is giving same result as mine

@hsendel

Can I know what is the exact process you are doing so that I can find a better solution.

Regards