|
2 | 2 |
|
3 | 3 | The source tree is laid out as follows:
|
4 | 4 |
|
5 |
| - - configs - contains NAnt property definition XML files, for individual build and deployment configurations, selectable via inclusion from [code default.build] and [code local.build] |
6 |
| - - dotnet-1.1.build - configuration for Microsoft .NET v1.1 |
7 |
| - - dotnet-2.0.build - configuration for Microsoft .NET v2.0 |
8 |
| - - default.build - the main NAnt build script |
9 |
| - - docs - contains both external documentation and the project's own documentation |
10 |
| - - namespaces.xml - Per-namespace documentation, for feeding into NDocProc |
11 |
| - - specs - AMQP specification documents and XML files |
12 |
| - - amqp-xml-doc0-9.pdf |
13 |
| - - amqp0-9.pdf |
14 |
| - - amqp0-9.xml |
15 |
| - - qpid-amqp.0-8.xml |
16 |
| - - amqp0-8.xml |
17 |
| - - wikipages - RabbitMQ .NET client library documentation in Pyle Wiki markup format |
18 |
| - - local.build.example - Sample [code local.build] file; used to select a configuration from the [code configs] directory |
19 |
| - - src - Source code to the various parts of the system |
20 |
| - - apigen - Source code for the XML specification parser and code generator |
21 |
| - - client |
22 |
| - - api - C# client public API interfaces and classes |
23 |
| - - content - C# QPid-compatible JMS message body codecs |
24 |
| - - events - C# event handler delegates and event classes |
25 |
| - - exceptions - C# API-visible exception definitions |
26 |
| - - impl - C# client internal/private implementation classes |
27 |
| - - v0_8 - AMQP 0-8 specific code |
28 |
| - - v0_8qpid - AMQP 0-8 code specific to QPid's M1 implementation |
29 |
| - - v0_9 - AMQP 0-9 specific code |
30 |
| - - messagepatterns - Implementation of common patterns in using AMQP; see the chapter on MessagePatterns |
31 |
| - - examples - simple AMQP client example programs in C# |
32 |
| - - unit - NUnit unit-tests |
33 |
| - - nunit - a copy of NUnit compiled for .NET 1.1, unpacked for convenience |
34 |
| - - util - Utility classes, compiled in to the client assembly |
35 |
| - - wcf - WCF binding source code, project files, and build products |
36 |
| - - RabbitMQ.ServiceModel.sln - Visual Studio solution file |
37 |
| - - RabbitMQ.ServiceModel - WCF binding library |
38 |
| - - RabbitMQ.ServiceModel.csproj - Visual Studio/MSBuild project file |
39 |
| - - RabbitMQ/ServiceModel/*.cs - code for the WCF binding |
40 |
| - - Test - WCF example programs |
41 |
| - - RabbitMQ.ServiceModel.Test.csproj - Visual Studio/MSBuild project file |
42 |
| - |
43 |
| - - tools - Third-party tools, such as NAnt, NUnit, NDocProc, and Pyle Wiki, as well as utility scripts |
| 5 | + - [code docs] - Contains the AMQP specification XML files, used to generate code in [code projects/client/Apigen] project |
| 6 | + - [code lib] - Third-party libraries and programs referenced by the code or used during the build |
| 7 | + - [code projects] - Source code to the various parts of the system |
| 8 | + - [code client] - Source code and project files for building the client |
| 9 | + - [code Apigen] - Project for the XML specification parser and code generator application |
| 10 | + - [code ApigenBootstrap] - Project for creating a library out of some parts of RabbitMQ.Client's source code that are used in Apigen |
| 11 | + - [code RabbitMQ.Client] - The client library project |
| 12 | + - [code Unit] - Unit tests for the client library |
| 13 | + - [code wcf] - WCF binding source code and project files |
| 14 | + - [code RabbitMQ.ServiceModel] - The WCF binding project |
| 15 | + - [code examples] - Example projects |
| 16 | + - [code client] - Example code and projects for using the client library |
| 17 | + - [code wcf] - Example code and projects for using the WCF binding |
| 18 | + - [code Local.props] - Local customizations for the build process. Copy the contents of [code Local.props.example] in this file, to start with |
| 19 | + - [code RabbitMQDotNetClient.sln] - The Visual Studio solution file which contains all the projects |
44 | 20 |
|
45 | 21 | ** Build Prerequisites
|
46 | 22 |
|
47 | 23 | To compile the RabbitMQ .NET client library, you will need
|
48 | 24 |
|
49 |
| - - a .NET development environment. Environments tested include |
50 |
| - - Microsoft .NET 1.1 on Windows XP |
51 |
| - - Microsoft .NET 2.0 on Windows XP |
52 |
| - |
53 |
| - - NAnt v0.85 or compatible (http://nant.sourceforge.net/); see the [code tools] directory |
54 |
| - |
55 |
| -To build the Javadoc-style documentation, you will need |
56 |
| - |
57 |
| - - NDocProc; see the [code tools] directory |
| 25 | + - a .NET development environment: |
| 26 | + - Microsoft .NET 2.0 (or later) |
| 27 | + - Microsoft .NET 3.0 (or later) if you want to build the WCF binding too |
| 28 | + - Microsoft Visual Studio 2005 or later (optional) |
58 | 29 |
|
59 | 30 | To run the unit tests, you will need
|
60 | 31 |
|
61 |
| - - NUnit 2.4.3; see the [code tools] directory |
62 |
| - |
63 |
| -See BuildingTheWcfBinding for more information about the WCF binding. |
| 32 | + - NUnit 2.4.3; included in the [code lib] directory |
64 | 33 |
|
65 | 34 | ** Configuring Your Tree
|
66 | 35 |
|
67 |
| -Copy [code local.build.example] to [code local.build], and edit it so that it points to one of the build configuration files in the [code configs/] directory. |
68 |
| - |
69 |
| -For instance, a [code local.build] that contains the text |
| 36 | +Copy [code Local.props.example] to [code Local.props], and edit it if necessary (the properties in this file have suggestive names). Set [code PropTargetFramework] to [code v1.1], [code v2.0], [code v3.0] or [code v3.5]. If you would like to build under Mono, only [code v1.1] and [code v2.0] are supported; also set [code PropUsingMono] to [code true] in this case. |
70 | 37 |
|
71 |
| -@code |
72 |
| - <project> |
73 |
| - <property name="config.name" value="dotnet-1.1" /> |
74 |
| - </project> |
| 38 | +** Building |
75 | 39 |
|
76 |
| -will use the [code configs/dotnet-1.1.build] file to control the build configuration. |
| 40 | +*** On Windows, with Visual Studio |
77 | 41 |
|
78 |
| -** Available Build Targets |
| 42 | +Simply open [code RabbitMQDotNetClient.sln] with Visual Studio and build. |
79 | 43 |
|
80 |
| -To run a particular build target, run |
| 44 | +If you are using a version of Visual Studio later than Visual Studio 2005, you will have to convert the solution to make it compatible with your version of Visual Studio. This process is automated and you are presented with a wizard when you first open the solution file. |
81 | 45 |
|
82 |
| -@code sh |
83 |
| - NAnt.exe [targetname] |
| 46 | +The projects in the RabbitMQ .NET client contain some customizations in order to allow generating source files and running NUnit tests as part of the build process. You might be presented with warnings claiming that the projects might be unsafe. You will have to instruct Visual Studio to open all projects normally. |
84 | 47 |
|
85 |
| -*** clean |
| 48 | +To skip running the NUnit tests as part of the build, select the [code DebugNoTest] build configuration. |
86 | 49 |
|
87 |
| -Removes the [code build/] directory, which contains all binaries, generated sources and generated documentation. |
| 50 | +Note: If you change a property in [code Local.props] while the solution is loaded in Visual Studio, you will have to close the solution and reopen it, for the changes to take effect. |
88 | 51 |
|
89 |
| -*** build (default) |
| 52 | +*** On Windows, without Visual Studio |
90 | 53 |
|
91 |
| -Builds the main client DLL. Runs ApiGen as part of the process, if necessary. |
| 54 | +To build the client library without Visual Studio, first you need to make sure you have the .NET's framework directory in your [code PATH] environment variable. The .NET framework directory can usually be found at [code %WINDIR%\Microsoft.NET\Framework\v2.0.50727] for .NET 2.0 or [code %WINDIR%\Microsoft.NET\Framework\v3.0] for .NET 3.0. |
92 | 55 |
|
93 |
| -*** doc |
| 56 | +Open the Command Prompt (Start -> Run -> cmd) or Cygwin (if you have it installed) and change to the client's directory. Now type [code msbuild.exe] and hit return to start building the solution. |
94 | 57 |
|
95 |
| -Generates the Javadoc-like HTML code documentation, using NDocProc. The included binary version of NDocProc is compiled for .NET 1.1. |
| 58 | +Refer to MSBuild's documentation for information on valid command line switches for [code msbuild.exe]. |
96 | 59 |
|
97 |
| -*** examples |
| 60 | +*** On Linux, using Mono |
98 | 61 |
|
99 |
| -Generates the example AMQP clients included in the [code src/examples/] directory, like [code SendString.exe] and [code LogTail.exe]. |
| 62 | +For building under Mono, please refer to [link http://www.rabbitmq.com/build-dotnet-client.html#building-on-linux]. |
100 | 63 |
|
101 |
| -*** unit |
| 64 | +** Building the WCF binding |
102 | 65 |
|
103 |
| -Runs the included unit tests. (.NET 1.1 and compatible only.) |
| 66 | +Building the WCF binding is enabled by default in [code Local.props] if the target framework is [code v3.0] or later (only on Windows). |
104 | 67 |
|
105 |
| -*** stamp |
| 68 | +To disable building the WCF binding, set [code PropBuildWcf] to [code false]. |
106 | 69 |
|
107 |
| -Removes the preprocessed generated [code AssemblyInfo.cs], so that on a subsequent build, a fresh one will be generated from [code AssemblyInfo.cs.in] with a fresh build identifier. |
| 70 | +Building the WCF binding under Mono is currently unsupported due to limitations of Mono. |
108 | 71 |
|
109 | 72 | ** Build Products
|
110 | 73 |
|
111 |
| -The build products available after a successful [code nant examples] are: |
| 74 | +The build products available after a successful build are: |
112 | 75 |
|
113 |
| - - [code build/bin/RabbitMQ.Client.dll] - The final client assembly |
114 |
| - - Example client programs, like [code build/bin/SendString.exe] and [code build/bin/LogTail.exe] |
| 76 | + - [code projects/client/RabbitMQ.Client/build/bin/RabbitMQ.Client.dll] - The final client assembly |
| 77 | + - Example client programs, like [code projects/examples/client/SendString/build/bin/SendString.exe] and [code projects/examples/client/LogTail/build/bin/LogTail.exe] |
115 | 78 |
|
116 |
| -Other files in the [code build/bin/] directory: |
| 79 | +If building the WCF binding is enabled, there will also be: |
117 | 80 |
|
118 |
| - - [code apigen-bootstrap.dll] - fed into ApiGen |
119 |
| - - [code rabbitmq-dotnet-apigen.exe] - the ApiGen tool itself |
120 |
| - - [code unit-tests.dll] - contains NUnit unit-tests |
| 81 | + - [code projects/wcf/RabbitMQ.ServiceModel/build/bin/RabbitMQ.ServiceModel.dll] - The WCF binding library |
| 82 | + - Example programs for the WCF binding, like [code projects/examples/wcf/Test/build/bin/RabbitMQ.ServiceModel.Test.exe] |
121 | 83 |
|
122 | 84 | Other build products:
|
123 | 85 |
|
124 |
| - - [code build/gensrc/*.cs] - Protocol-specific autogenerated code, produced by ApiGen |
125 |
| - - [code build/doc/RabbitMQ.Client.xml] - [code csc]-generated XML documentation excerpt file, used as input to NDocProc |
126 |
| - - [code build/doc/xml/] - XML documentation files as generated by NDocProc |
127 |
| - - [code build/doc/html/] - HTML documentation as generated by NDocProc's stylesheets from the XML files |
128 |
| - |
129 |
| -** Assembly Versioning |
130 |
| - |
131 |
| -As part of the build process, the source file [code AssemblyInfo.cs.in] is copied to |
132 |
| -[code AssemblyInfo.cs], and the token [code @VERSION@] is replaced with value specified by |
133 |
| -the property [code version.major.minor.release] in the [code local.build] NAnt script. |
134 |
| - |
135 |
| -The assembly version number is of the form |
136 |
| - |
137 |
| -@code java |
138 |
| - "1.2.0" |
139 |
| - |
140 |
| -or more generally |
141 |
| - |
142 |
| -@code java |
143 |
| - "Major.Minor.Release" |
144 |
| - |
145 |
| -that represents major, minor and release client version numbers, respectively. |
| 86 | + - [code gensrc/RabbitMQ.Client/autogenerated-api-*.cs] - Protocol-specific autogenerated code, produced by Apigen |
| 87 | + - [code projects/client/RabbitMQ.Client/build/bin/RabbitMQ.Client.xml] - [code csc]-generated XML documentation of the client assembly |
| 88 | + - [code projects/wcf/RabbitMQ.ServiceModel/build/bin/RabbitMQ.ServiceModel.xml] - [code csc]-generated XML documentation of the WCF binding |
146 | 89 |
|
147 |
| -To force an update to the version number, the [code nant stamp] target deletes [code AssemblyInfo.cs], forcing its regeneration in subsequent builds. |
0 commit comments