Skip to content
Edward Garson edited this page May 21, 2015 · 7 revisions

This article will show you how you can include the Riak .NET Client in your project in preparation for communicating with your Riak cluster.

Dependencies

The Riak .NET Client uses two other librarires behind the scenes:

These libraries will be included, in one way or another, with the Riak .NET Client distribution.

Note: Please use the --recursive git option or run git submodule update --init after cloning as a couple submodules are used.

NuGet

The easiest way to install libraries in your project is to use NuGet. The Riak .NET Client has a NuGet package package available which can be installed directly into your project by opening up the Package Manager Console and typing:

PM> Install-Package RiakClient

You can also use the NuGet GUI to search for and install the package.

You will notice that using this method of installation results in both protobuf-net and Json.NET being installed via NuGet as well, and each of the libraries has been added as a reference to your project. This method also makes modifications to either the web.config or app.config for you so that the bulk of the configuration work is already done.

If you don't have either an app.config or a web.config in your project then you can create a custom configuration file and use this file instead. All you need to do is make sure that the Riak .NET Client knows which file to use when you're loading the configuration. There is an API overload available for when you need to do this.

GitHub

All of the binary releases, along with the dependencies, are available directly from the GitHub releases download page. Download the most recent version of the Riak .NET Client and extract the entire contents of the archive to a folder which is accessible to your solution. At this point, open up your development environment (be it Visual Studio or MonoDevelop) and each assembly from the archive to your project as a reference.

Source Code

If you're doing this, you're a developer who probably doesn't need much hand-holding, so we'll keep this bit brief. Get yourself a git client and type:

git clone --recursive git://github.com/basho/riak-dotnet-client.git

This will pull down the source and update your working folder to the latest development code.

Build from Source

GUI

Note: git must be in your PATH when doing a Release-configuration build.

Open RiakClient.sln and build. This will generate the required src/CommonAssemblyInfo.cs file.

Command Line

Note: git must be in your PATH when doing a Release-configuration build.

  • Windows
  • Execute make.cmd either via double-click in the file explorer, or by opening a shell in your cloned repository and running .\make.cmd. This will use powershell.exe to run make.ps1 and create a Debug build. Running make.ps1 has much more flexibility. Use the Get-Help .\make.ps1 -Full command in Powershell for more information.
  • Mono
  • Execute make (GNU Make required)

Next Step

Connecting to Riak

Clone this wiki locally