Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load Newtonsoft.json #7

Closed
noodlescb opened this issue Jan 18, 2013 · 7 comments
Closed

Could not load Newtonsoft.json #7

noodlescb opened this issue Jan 18, 2013 · 7 comments
Milestone

Comments

@noodlescb
Copy link

Hi I am trying to implement some automatic zendesk ticket logging in a C# app using this implementation.

I downloaded the package and added a reference to the net40/ZendeskApi_v2.dll . This is the code I placed, which is copy/pasted from your readme.

ZendeskApi zd = new ZendeskApi("https://{mysite}.zendesk.com/api/v2", "myusername", "mypassword");

zd.Tickets.CreateTicket(new ZendeskApi_v2.Models.Tickets.Ticket() {
Subject = "TestTicket",
Description = "test description",
Priority = TicketPriorities.Urgent
});

It compiles and seems to make sense but I am getting the following error:
FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Do I need to have an explicit reference in my project to the json dll? What else could cause the error?

Thanks,
Caleb

@noodlescb
Copy link
Author

Nevermind. I found the dll in your package. Don't know how I missed it. Works like a charm thank you!

@eneifert
Copy link
Contributor

Great glad to hear it!

@Jon-Blackburn
Copy link

I'm still getting this same error what exactly did you do with the dll to fix it?

@mozts2005
Copy link
Member

What version of the ZendeskApi_v2 and Newtonsoft is in your bin directory?

@mozts2005 mozts2005 reopened this Jul 28, 2017
@Jon-Blackburn
Copy link

Jon-Blackburn commented Jul 28, 2017 via email

@mozts2005
Copy link
Member

@Jon-Blackburn looks like an issue with the NuGet package. the 3.6.2 needs Newtonsoft.Json Version 10.0 but I list the 9.0.1 in the dependencies. Try install version 10. I will be doing a release this weekend I will make sure to think this with it.

@Jon-Blackburn
Copy link

Jon-Blackburn commented Jul 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants