RabbitMQ


This section describes the process for obtaining a copy of the RabbitMQ .Net/C# AMQP client library source code, as well as instructions for building the .Net/C# client libraries from source.

Obtaining the source

  • Either download a released source code distribution from the download page, or
  • Check the code out directly from our mercurial repositories:
    $ hg clone http://hg.rabbitmq.com/rabbitmq-dotnet-client
    $ cd rabbitmq-dotnet-client
    $ cp local.build.example local.build
    $ nant dist

Required Libraries and Tools

To build the .NET/C# client libraries, you will need

  • a .NET runtime:
    • Microsoft's .NET 1.1, 2.0, 3.0 or 3.5 (versions older than 3.0 do not support WCF), or
    • Mono 1.2.5 or newer (does not support WCF)
  • NAnt v0.85 or newer

Building the source

Building the .NET/C# client libraries

Ensure that PATH variable contains path to NAnt. Change to the rabbitmq-dotnet-client directory, copy local.build.example to local.build and change config.name property to one of the build configuration files in the configs directory. Type NAnt.exe in Windows environment, or nant in Linux/UNIX/Cygwin one.

Other interesting default.build targets include:

build
The default target. Builds the main client DLL into build/bin and generates API (if necessary) into build/gensrc.
clean
Removes the entire build directory, including compiled DLL, generated API, and any files placed under build.
doc
Generates the Javadoc-like HTML code documentation, using NDocProc. The included binary version of NDocProc is compiled for .Net 1.1.
examples
Compiles the examples included in the src/examples directory.
stamp
Removes the preprocessed generated AssemblyInfo.cs, so that on a subsequent build, a fresh one will be generated from AssemblyInfo.cs.in with a fresh build identifier.
unit
Runs the included unit tests.

Building the WCF bindings

Ensure that PATH variable contains path to NAnt and to msbuild.exe, or use Visual Studio directly.

Targets in default.build for building WCF bindings:

clean-wcf
Removes the WCF build products.
build-wcf
Builds the WCF binding DLL, by calling out to msbuild.
wcf-examples
Generates the example WCF clients and servers.

For further information, please see the "Building the Client" section of the RabbitMQ .NET Client Library User Guide, available from the .NET client download page.