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;
  • No labels