RavenDB version 2.5. Other versions:

Adding RavenDB to your application

There are two flavors of RavenDB available:

  • RavenDB Client: this is a lightweight library enabling you to connect to any RavenDB server; it exposes all RavenDB's strengths to your .NET or Silverlight application.

  • RavenDB Embedded: this is a full-blown RavenDB server ready to be embedded in your application.

If you are not sure which to choose, go with the RavenDB Client. Only use Embedded if you are certain this is indeed what you need.

{NOTE RavenDB Embedded cannot be run on the Client Profile}

Either of these can be added to your project by either using NuGet or extracting the contents of a build package.

Installing using NuGet

You can consume RavenDB through NuGet. Follow this article for instructions on how to do this.

Manually adding RavenDB using the build package

Grab a stable build from the downloads page, and extract the required files to a new "RavenDB" folder in your application. You'll then need to update your project with references to them.

Here's how to know which of the files you are going to need:

The folder structure in a RavenDB build package
  • /Client - Lightweight RavenDB client for .NET 4.0. This is the recommended client to use.

  • /Silverlight - A lightweight Silverlight 5 client for RavenDB and its dependencies.

  • /EmbeddedClient - The files required to run the RavenDB client, in server or embedded mode.

Whichever client version you choose to use, reference all the assemblies in the corresponding folder to your project.

As for the rest of the folders in the package, here's a brief description of what they contain:

  • /Backup - Standalone backup tool, for performing backup operations using a user with admin privileges.

  • /Bundles - Bundles that extend RavenDB in various ways.

  • /Samples - Some sample applications for Raven. Under each sample application folder there is a "Start Raven.cmd" file which will starts Raven with all the data and indexes required to run the sample successfully.

  • /Smuggler - The Import/Export utility for RavenDB.

  • /Server - The files required to run RavenDB in server / service mode. Execute /Server/Raven.Server.exe /install to register and start the RavenDB service.

  • /Web - The files required to run RavenDB under IIS. Create an IIS site in the /Web directory to start the RavenDB site.

For more information on the various deployment options for RavenDB, see in the Deployment section of the chapter on the Server side.

Comments add new comment

The comments section is for user feedback or community content. If you seek assistance or have any questions, please post them at our support forums.

PedroArvy
REPLY Posted by PedroArvy on

Where is the next part to this Quickstart?

Itamar Syn-Hershko
REPLY Posted by Itamar Syn-Hershko on

This is all the "adding ravendb to your application" tutorial. There will be more quickstart tutorials here soon.

amiralles
REPLY Posted by amiralles on

Hope so! )

Lucas
REPLY Posted by Lucas on

Which configuration would you recommend in a hosted environment?

Ayende Rahien
REPLY Posted by Ayende Rahien on

I am assuming you are talking about shared hosting here. If so, I would recommend running this as an IIS application inside your hosted env.

Pharmg116
REPLY Posted by Pharmg116 on

Hello! decdeke interesting decdeke site! I'm really like it! Very, very decdeke good!

caduser
REPLY Posted by caduser on

"RavenDB Embedded can't run on the Client Profile." - Why is not possible?

Ayende Rahien
REPLY Posted by Ayende Rahien on

There are required components that we need that are not present there.

CoffeeAddict
REPLY Posted by CoffeeAddict on

So is there any reason one would want to download the entire source and add it to whatever the solution is for the app you're building? I tend to want to add project references to the full source when I use Open source just because it allows me to add stuff or tweak stuff but not sure if I wanna mess with things with a core DB library like this....but if it is common to do so I'd like to know and prefer going that route rather than NuGet and only referencing binaries.

SUBMIT COMMENT