-
Notifications
You must be signed in to change notification settings - Fork 35
Installation
This article will show you how you can include the Riak .NET Client in your project in preparation for communicating with your Riak cluster.
The Riak .NET Client uses two other librarires behind the scenes:
- protobuf-net by Marc Gravell (license)
- Json.NET by James Newton-King (license)
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.
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.
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.
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.
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.
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 usepowershell.exe
to runmake.ps1
and create a Debug build. Runningmake.ps1
has much more flexibility. Use theGet-Help .\make.ps1 -Full
command in Powershell for more information. - Mono
- Execute
make
(GNU Make required)
General
Usage
- Installing the Riak .NET Client
- Connecting to Riak
- Taste of Riak
- Querying:
- Other Query Types:
- API Reference