Running Raven DB Server from VS2012 Solution Explorer

I needed to run the full RavenDB Server as part of a development I’m currently working on. So, I knocked up a little powershell script to do that for me …

$path = (gci packages\RavenDB.Server.* | select -First 1).FullName
$exe = (gci $path -Recurse -Include Raven.Server.exe).FullName
cmd.exe /c start "$exe"

It assumes you’ve installed the nuget package into your solution. This shouldn’t be done via the package manager, as stated on the nuget page.

Use this package if you want to run RavenDB as a standalone application. This package is not intented to be used in Visual Studio. RavenDB is a document database for the .NET platform, offering a flexible data model design to fit the needs of real world systems.

PM> Install-Package RavenDB.Server

So, I added the script (at the top of this post) as a solution item. I also have an external tool defined like so …

Powershell External Tool in VS2012

So, to run my RavenDB Server I just highlight “Raven.ps1” in the solution explorer …

Solution Explorer - Solution Items - Raven.ps1

… and select Run Powershell (x64) Script (output window)

VS2012 Tools Menu

… and there you have it. Full RavenDB Server running.

I hope that helps someone else out there.

Have fun with RavenDB, it’s pretty awesome from what I’ve seen so far.

Advertisements

One response to “Running Raven DB Server from VS2012 Solution Explorer

  1. This post is irrelevant for me now, as I’ve switched to using the embedded version of RavenDB. It’s still valid in cases where I won’t be writing a windows service.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s