Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,007 | Comments: 44,761

filter by tags archive

RavenDB 1.0 & Newtonsoft.Json 4.5.7

time to read 1 min | 133 words

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.



That's great news Ayende, thanks!



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.



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)

Ayende Rahien

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?


Are you planning on releasing a RavenDB Client MvcIntegration nuget package which depends on 1.0.971?

Dan Turner

Damn... I would really like a similar version of RavenDB.Embedded :(

I'm guessing this is non-trivial for you guys to do?

Ayende Rahien

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.

Dan Turner

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?

Ayende Rahien

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.

Koen Verheyen

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?

Ayende Rahien

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

Comments have been closed on this topic.


No future posts left, oh my!


  1. Speaking (3):
    23 Sep 2015 - Build Stuff 2015 (Lithuania & Ukraine), Nov 18 - 24
  2. Production postmortem (11):
    22 Sep 2015 - The case of the Unicode Poo
  3. Technical observations from my wife (2):
    15 Sep 2015 - Disk speeds
  4. Find the bug (5):
    11 Sep 2015 - The concurrent memory buster
  5. Buffer allocation strategies (3):
    09 Sep 2015 - Bad usage patterns
View all series



Main feed Feed Stats
Comments feed   Comments Feed Stats