Hey everyone, I’m having a tough time connecting to JIRA using the Atlassian .NET SDK. I found an example online that shows how to connect, but when I try to use it, I’m getting some weird errors. Here’s what I’m doing:
JiraManager jiraInstance = new JiraManager(serverAddress, "administrator", "secretPassword");
But I’m getting these errors:
- Can’t change ‘string’ to ‘Atlassian.Jira.ServiceLocator’
- Can’t change ‘string’ to ‘Atlassian.Jira.JiraCredentials’
- Can’t change ‘string’ to ‘Atlassian.Jira.JiraCache’
I’ve looked everywhere for help on these errors, but I can’t find anything useful. The SDK documentation is also blocked at my work, so I can’t check there. Has anyone run into this before? How did you fix it? I’m totally stuck and could really use some advice. Thanks in advance!
I’ve encountered similar issues when working with the Atlassian .NET SDK. The problem likely stems from using an outdated version of the SDK or incorrect method signatures. Try updating your NuGet packages first. If that doesn’t work, the correct syntax for establishing a connection is typically:
var jira = Jira.CreateRestClient("serverAddress", "username", "password");
This approach uses the REST API client, which is more reliable and well-documented. Make sure you’ve properly imported the necessary namespaces too. If you’re still facing issues, consider using a HTTP client like RestSharp as an alternative to directly interact with JIRA’s REST API. It offers more flexibility and easier troubleshooting.
I understand your frustration with the JIRA SDK. In my experience, I had similar issues and eventually found that bypassing the SDK in favor of using the REST API was not only simpler but also provided greater control over error handling and debugging.
Instead of following outdated examples, I switched to using a lightweight HTTP client to make direct API calls. Although this approach requires manual handling of JSON serialization, the improved reliability and ease of debugging made the transition worthwhile.
If you are committed to using the SDK, ensure that you’re working with the latest version and that your method signatures conform to the current API standards.
hey mate, i’ve dealt with this before. sounds like ur using an old version of the sdk. try upgrading it thru NuGet. if that doesnt work, you might wanna try using the REST API directly. its a bit more work but way more reliable. good luck!