Code Invoke issue for C# and Vb.Net - HyperScience SaaS API

Hello Everyone,

I’m trying to make a call to HyperScience API to do healthcheck of application. HyperScience is set up on vendor SaaS while UiPath is on Premises (V 2019.10.4 studio).

Pre-requisite to call API for HS SaaS is to create a API account and then make a ApiController call. Now problem is when I’m trying to make a call and run GET method to check health of application I’m getting below error.

C# Invoke code: No compiled code to run
error CS1704: An assembly with the same simple name 'Nito.AsyncEx.Coordination, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side. At line -18
error CS1704: An assembly with the same simple name 'Nito.AsyncEx.Tasks, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side. At line -18
error CS1704: An assembly with the same simple name 'Nito.Collections.Deque, Version=1.0.4.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side. At line -18
error CS1704: An assembly with the same simple name 'Nito.Disposables, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side. At line -18


C# Code

ApiController apiController = new ApiController(configuration, credentials);
var httpResponseMessage = apiController.Get(“/api/v5/healthcheck”);
Console.WriteLine(httpResponseMessage);
Console.WriteLine(httpResponseMessage.Content.ReadAsStringAsync().Result);

P.S. I have selected Language as C# for Code Activity. Also in configuration I have domain url and credentials has ID and Password for API.

I tried changing code to Vb.net as well but In that case my process get stuck in code stage.

If anyone can share insight on issue or has any idea how can I resolve this would be great help.

Thank You,
Vir

HI

It seems package (assembly) matter. Did you add any extra package?
or if it’s unnecessary to use Mail package, can you try to uninstall UiPath.Mail.Activities package via package manager because it includes the above dlls?

Regards,

Hi Yoichi,

I tried uninstalling Mail as well as other unnecessary packages. I’m not getting any error now however, my code stage is stuck again. Process is not moving further neither it’s throwing any error.

any idea?

Thank you,
Vir