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 assembly Newtonsoft.JSON #9

Closed
dude111115 opened this issue Nov 15, 2015 · 3 comments
Closed

Could not load assembly Newtonsoft.JSON #9

dude111115 opened this issue Nov 15, 2015 · 3 comments

Comments

@dude111115
Copy link

I'm using VS Express 2015, and I'm trying to utilize Margiebot UI.

When I input my bot key and press connect, an exception is thrown at -
await _Margie.Connect(AuthKeySlack);

Detailed error message -
An unhandled exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'Newtonsoft.Json, Version=8.0.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)

@StivOstenberg
Copy link

Ditto with VS Pro. Even tried removing and adding the reference, but it still is not happy.

@StivOstenberg
Copy link

OK. Have the solution. The problem is that NUGET downloaded the shiny new Newtonsoft.Json (8.02) whereas the project had internal references that I thought should work to the 7.x version. I went through each module of the project and deleted the reference to the Newtonsoft.Json, then added a new reference pointing to the new version dll and Margiebot is now running.

@jammerware
Copy link
Owner

Sounds like you have this under control - sorry for not being responsive earlier this year, as I had to take a break from MargieBot due to life stuff.

I just wanted to post here to let you know, partially in response to dependency awkwardness that stemmed from me having a pretty loose understanding of good Nugetting and partially because it's the new hotness, I'm currently in the process of porting MargieBot to .NET Core. Once I get her stabilized, it should prevent situations like the one you had from occurring. The work is actually mostly done, although I'm still struggling to get her working in the UI sample app. In any case, feel free to check out the latest version if you're curious. Thanks for your patience, and thanks for checking out MargieBot!

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

3 participants