Differences between revisions 4 and 5
Revision 4 as of 2009-09-20 23:47:10
Size: 1199
Editor: localhost
Comment: converted to 1.6 markup
Revision 5 as of 2009-10-16 17:09:52
Size: 1239
Editor: moebius
Comment: Expressing links to 'ThriftUsageC#' in wiki markup can't be done without escaping. This is more straight forward.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from ThriftUsageC#

Getting started

The C# code generated by Thrift uses the Thrift namespace. To be able to use the code generated by Thrift you need to reference Thrift.dll in your project to gain access to the Thrift namespace. This is required for the Thrift generated C# code to compile.

Building Thrift.dll using Visual Studio

  1. If you haven't done so already download a snapshot of the Thrift source code and extract it. - Direct link to the snapshot

  2. Open the Thrift.sln solution file under thrift/lib/csharp/src

  3. Build Solution by pressing F7

You should now have the required Thrift.dll located under thrift/lib/csharp/src/bin/Debug/Thrift.dll

Reference Thrift.dll in your application (in Visual Studio)

  1. Open up your application solution in Visual Studio.
  2. Under the Project menu, click Add Reference

  3. Browse to and select the freshly built Thrift.dll

You can now use the Thrift namespace in your source code:

using Thrift;
using Thrift.Protocol;
using Thrift.Server;

ThriftUsageCSharp (last edited 2009-10-16 17:09:52 by moebius)