RavenDB 1.0 & Newtonsoft.Json 4.5.7
A common complaint that we hear about RavenDB 1.0 is that it depends on Newtonsoft.Json 4.0.8, while many libraries are already using 4.5.7. We already resolved the problem once and for all in the RavenDB 1.2 branch, but that is a few months from going live yet.
Therefor, we create a new nuget package: http://nuget.org/packages/RavenDB.Client/1.0.971
This nuget package is the exact same as 960, except that we compiled it against Newtonsoft.Json 4.5.7. Note that this is only supported for the client mode, if you want to run RavenDB Server or RavenDB Embedded, it is still going to require Newtonsoft.Json 4.0.8 in the 1.0 version.
The main idea is that you can get to run against RavenDB Server using Newtonsoft.Json 4.5.7 on the client side, which is the most common scenario for RavenDB.
Comments
That's great news Ayende, thanks!
/David
You can try with ILMerge with /internalize option to hide the json dependency and provide some wrappers if you already return objets of the Newtonsoft library.
Cheers
I would like to hear more about how you solved it in 1.2. I am about to release an update to Gallery Server Pro that includes this library, and I want to avoid the pitfalls.
They are using git subtree (https://github.com/ayende/ravendb/blob/1.2/Imports/Pull.ps1) to pull in the sources. After that they do a find&replace to prefix the namespace with Raven.Imports (https://github.com/ayende/ravendb/commit/d3ee433ab4e5a8871a2d5772b4634fef166b224b)
Roger, For 1.2, we internalized json.net
Ayende: What do you mean by "internalize"? Are you talking about embedding the json.net DLL inside another DLL?
Roger, See Louis' answer.
Are you planning on releasing a RavenDB Client MvcIntegration nuget package which depends on 1.0.971?
Damn... I would really like a similar version of RavenDB.Embedded :(
I'm guessing this is non-trivial for you guys to do?
LaptopHeaven & Dan, this is a interim release, and a small one at that, we don't want to do the full work required to move to 4.5.7 for the entire product. There are a LOT that is going on there. That is why we released just the stuff that is required to work with a remote server.
Fair enough mate!
Do you have any ETA on the next stable version of the embedded package that is compatible with Newtonsoft.Json 4.5.8?
Dan, A couple of months, I guess.
just moved a project and those dll issues were quite a pain. for some reason, the nuget kept referencing the dlls in the bin/ directory. it is a good thing you internalize and minimize dependencies. those dependencies woes have been around since the dark age of computing. i am dreaming of a definitive, bullet proof, and simple, solution to it.
I'm not totally convinced internalizing is good. I want to put my models in a common portable assembly between a web api (requires >= Json 4.5.8) server with ravendb client and a windows phone app. My models have json ignore attributes (to direct ravendb) but with the internalized json I would have to reference ravendb.client in my common assembly (which is not even possible).
Does that make sense or am I breaking any ground rules? Or should I be using linked files instead of common models?
Koen, You can customize the ravendb json serializer to ignore those attributes, but yes, that is the idea. Considering how many json.net version there are out there, there is really no other real choice for us.
Comment preview