Error invoking activity from custom library

Hi,
I have problem with invoking my custom activity from my API JIRA library in process.
Activity with C# code run and works fine in library workflow.

Code in library:
image

When I add library to new Robotic Process and I do test run of the activity I have this message:

Method 'UiPath.CodeRunner.UiPathCodeRunner_dc3658ebc1034030a8281c0362fd914c.Run' not found

When I had this code in library:

and when I do test run of the activity I have this message:

A value of type 'RestSharp.RestResponse' cannot be set to the location with name 'response' because it is a location of type 'RestSharp.IRestResponse'.

Library and processs project have the same RestSharp package v. 106.11.7:
image

In both scenarios, the test flow in the process has a RestSharp namespace added to the “Imports” tab.

What’s wrong with this activity or project? Where to look for the cause?

Hey, facing the same issue
Did you find a solution?

Hi,
I am currently using System.Net.HttpClient to communicate with JIRA.

Code example:


    Dim client As System.Net.Http.HttpClient = New System.Net.Http.HttpClient()
	client.BaseAddress = New Uri(uri)
	client.DefaultRequestHeaders.Accept.Clear()
	client.DefaultRequestHeaders.Accept.Add(New System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"))
	client.DefaultRequestHeaders.Authorization = New System.Net.Http.Headers.AuthenticationHeaderValue("Basic", token)
	
	Dim request As System.Net.Http.HttpRequestMessage = New System.Net.Http.HttpRequestMessage(HttpMethod.Post, "rest/api/2/issue")

	'Body
	request.Content = New StringContent(JsonString, System.Text.Encoding.UTF8, "application/json")

	response = client.SendAsync(request).Result

Examples of working code here:

If I create solutions on RestSharp, I use the library version 106.15.0