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
If you haven't done so already download a snapshot of the Thrift source code and extract it. - Direct link to the snapshot
Open the Thrift.sln solution file under thrift/lib/csharp/src
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)
- Open up your application solution in Visual Studio.
Under the Project menu, click Add Reference
- 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;