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

Newtonsoft.Json dependency trouble #56

Closed
pavel-khritonenko opened this issue Jul 30, 2015 · 7 comments
Closed

Newtonsoft.Json dependency trouble #56

pavel-khritonenko opened this issue Jul 30, 2015 · 7 comments

Comments

@pavel-khritonenko
Copy link

I have an issue when I want to stick Newtonsoft.Json to ~6.0 version

An unhandled exception of type 'System.IO.FileLoadException' occurred in FsPickler.dll

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

https://github.com/pavelhritonenko/fspickler-newtonsoft - repository for reproduce issue

@eiriktsarpalis
Copy link
Member

You need to specify a binding redirect for Newtonsoft.Json if you are using a version different than 7.0.

@pavel-khritonenko
Copy link
Author

@eiriktsarpalis I have one default generated by Packet, but it strange for me that FsPickler compiled with version higher than minimal supported. What do you think, should I address this issue to Paket developers?

@eiriktsarpalis
Copy link
Member

Yes I've seen this. Not sure if bug or by design.

On Fri, 31 Jul 2015 at 10:57 pavelhritonenko notifications@github.com
wrote:

@eiriktsarpalis https://github.com/eiriktsarpalis I have one
https://github.com/pavelhritonenko/fspickler-newtonsoft/blob/master/fspickler-newtonsoft/App.config#L11-L14
default generated by Packet, but it strange for me that FsPickler compiled
with version higher than minimal supported. What do you think, should I
address this issue to Paket developers?


Reply to this email directly or view it on GitHub
#56 (comment).

@mvkara
Copy link

mvkara commented Nov 12, 2015

Bit late to the party - just trying this framework now and with a dependency on another version of Newtonsoft in my code out this is causing me headaches. Is it possible to just remove the dependency of Newtonsoft.Json from the codebase? Maybe a stupid question. Newtonsoft is MIT licensed; doesn't that mean worse comes to worse you can just use the JsonWriter and BsonWriter's as code inside the library? I know RavenDB has done this for their JSON serialisation. Not sure if you are relying on any functionality to help with F# types for example; it would simplify things a lot.

@eiriktsarpalis
Copy link
Member

@mvkra I once tried doing that, but the JsonWriter/Reader types depend on a significant segment of the Json.Net library. I would like to write my own JsonWriter/Reader implementations using F# at some point, I'm sure it would benefit deserialization performance. Haven't found the time to do this yet.

Does adding a binding redirect not fix your problem?

@mvkara
Copy link

mvkara commented Nov 13, 2015

It does if I play with it right but I would rather just use Json.net then
most of the time (would rather just use one library rather than two). Keeps
it simple. Of course that means I don't use this library hence the
suggestion.
On 13 Nov 2015 9:40 AM, "Eirik Tsarpalis" notifications@github.com wrote:

@mvkra https://github.com/mvkra I once tried doing that, but the
JsonWriter/Reader types depend on a significant segment of the Json.Net
library. I would like to write my own JsonWriter/Reader implementations
using F# at some point, I'm sure it would benefit deserialization
performance. Haven't found the time to do this yet.

Does adding a binding redirect not fix your problem?


Reply to this email directly or view it on GitHub
#56 (comment).

@dsyme
Copy link
Contributor

dsyme commented Jun 7, 2017

Closing this old discussion/question

@dsyme dsyme closed this as completed Jun 7, 2017
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