The actual fix is in cpp/CMakeLists.txt. The modification of csharp/CMakeLists.txt is just to remove a useless dependency.