Migration: Introduction to 3.x to 4.0 Migration
RavenDB Client 4.0 is a major upgrade. It's not backward compatible and the API has a lot of breaking changes.
This section discusses the changes that you need to be aware of when migrating your application using 3.x DLLs, and the recommended actions you need to take.
Please remove the following 3.x packages:
Please install the RavenDB.Client package from NuGet. See what .NET targets are supported by RavenDB Client.
Internalized Json.NET Usage
RavenDB Client doesn't use a customized Json.NET any longer. Replace all references to RavenDB Json.NET, like
Please use the latest version of Json.NET for good performance.
RavenJObject is no longer available. Instead, documents are kept internally in blittable format - native, efficient way to represent JSON. You might encounter it when dealing
with low-level stuff in the client as
Documents don't have etags. Instead, since documents can be stored in a cluster environment that is on different nodes, they use a change vector to reflect changes on particular cluster nodes.
The change vector is composed of list of node IDs and a sequential number (per node). The sequential number, still named as the etag, is represented by
The entity identifier can only be
string. Value types identifiers (
Guid etc.) are no longer supported.
Document metadata is no longer sent via HTTP headers. It's part of JSON document under
List of changed metadata properties:
RavenDB.Client doesn't have RavenDB.Abstractions dependency. Please remove all usings of
Marking Documents as Read-only
Documents no longer cannot be marked as read-only. The metadata entry
Raven-Read-Only is no longer supported and all of the Client API methods e.g.
session.Advanced.MarkReadOnly were deleted.
EmbeddableDocumentStore your tests should use RavenDB.TestDriver package. See the dedicated article.
There is no support for DTC transactions.