techtalk / JiraRestClient

A simple client for Atlassian JIRA service REST API
Other
65 stars 80 forks source link

trouble adding attachments - #29

Closed nlarson closed 7 years ago

nlarson commented 8 years ago

I updated a previously working application to JIRA REST Client 2.3.0.1 / RestSharp 105.1.0 and now CreateAttachment fails - Popup says "JIRA Integration Error" - Creation of the JIRA issue failed: Method not found: "RestSharp.IRestRequestRestSharp.RestRequest.AddFile(System.String, System.Action1, System.String)".

I changed the reference to the .NET 4.0 RestSharp, as suggested in https://github.com/restsharp/RestSharp/issues/690 as a work around, but still no joy.

Using the .NET 4.0 client version on the Jira Rest Client side.

Anyone else seen this problem?

Code: foreach (FileInfo issueAttachment in IssueAttachments) { using (FileStream ss = new FileStream(issueAttachment.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { client.CreateAttachment(issue, ss, issueAttachment.Name); } }

bhosalesantosh commented 7 years ago

Hi Neil, I am facing same issue, please update me if you got the fix.

quexy commented 7 years ago

try reverting to RestSharp v104.1 it seems to me, they aren't struggling for backwards compatibility (missing method)

bhosalesantosh commented 7 years ago

Hi.. I used Restsharp version 104.1.0.0 and Jira TechTalk rest client 2.5.0.0 with dot net 4.5 and works shoothly.