build thrift-0.11.0 from source on ubuntu 17

  •  On office 190 ubuntu machine ,  9900


  • tar xvzf thrift-0.11.0.tar.gz
  • install pre – requirements modules  , because 190 is ubantu machine , so following these steps

  • CSharp additonal need following modules :    mono-gmcs mono-devel libmono-system-web2.0-cil nunit nunit-console

Now will install them one by one


a)  install mono complete by

only exec first 5 steps

b) install nunit by this command :  sudo apt-get install nunit nunit-console


Now all the pre-requirement are installed .

  • Build 


goto /home/liuyang/thrift-0.11.0/

run command one by one :


    • Make a test c# project

  A cSharp project which use thrift should add reference to “Thrift.dll”

goto folder :   /home/liuyang/thrift-0.11.0/tutorial

run command :  rm -r csharp    ,   delete  existing csharp folder

then run command :   thrift -r –gen csharp tutorial.thrift

there will be a new folder named  “gen-csharp” ,  and here is the file will be used as server and client ,But no .sln file .  

Thrift will gen both server and client side code  , Now try to make a server side project ,  it need these files :

then change server side ‘s Program.cs to


For client side , need same cs files with server ,  only it ‘s Program.cs file content is :



  • If anyone can call the remote procedure , No any permission limit ?  or any anthentication ?
  • How server know how many client connect to it ?

Thrift script analyze