.Net/C# AMQP Client Library Build Instructions

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

Required Libraries and Tools

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

  • Microsoft's .NET 1.1, 2.0, 3.0 or 3.5 (versions older than 3.0 do not support WCF)
  • Microsoft Visual Studio® 2005 or later (optional)

Building the source

On Windows, with Visual Studio

To build the source with Visual Studio you need to:

  • Copy Local.props.example to Local.props and edit the <PropTargetFramework> value to the desired target framework version. If this is v3.0 or newer, the WCF bindings will also be built.
  • Open RabbitMQDotNetClient.sln in Visual Studio. That may fail if the version of Visual Studio used is different from the one that created the solution file. In most such cases this can be corrected by opening the solution file in a text editor and adjusting the Format Version number at the beginning.
  • Build the solution. As part of the build process, Visual Studio will also launch some unit tests. To disable these, change the build configuration to DebugNoTest.

On Windows, without Visual Studio

To build the source without Visual Studio you first need to make sure you have the .NET's framework directory in your path, which is usually DRIVE:\Windows\Microsoft.NET\Framework\v2.0.50727 for .NET 2.0 or DRIVE:\Windows\Microsoft.NET\Framework\v3.0 for .NET 3.0.

  • Copy Local.props.example to Local.props and edit the <PropTargetFramework> value to the desired target framework version. If this is v3.0 or newer, the WCF bindings will also be built.
  • Open the command prompt in the client directory, and type
    > msbuild.exe RabbitMQDotNetClient.sln
    For more information on msbuild.exe see the MSBuild command line reference.

On Linux

The library can be built on Linux with Mono, but only with Mono version 2.6 and later. 2.4.x versions, as included with most current Linux distributions, are not sufficient. You can obtain the latest versions of Mono at mono-project.com

Once you have installed a suitable version of Mono, and obtained the RabbitMQ .Net/C# AMQP client library source code, to build the library you should:

  • Copy Local.props.example to Local.props and edit the <PropUsingMono> value to be true.
  • At a command prompt, go into the library source directory, and do
    $ xbuild RabbitMQDotNetClient.sln
    For more information on xbuild see its man page.