开发者

Using Thrift to connect to Cassandra from .NET

I'm interested in Cassandra and I'd like to test it at home in my Windows XP computer. I've found instructions for install an run Cassandra in Windows, and it's already up and running; I've also found the thrift executable for Windows and generate the C# interfaces, but... when I try to compile that generated code in Visual Studio I got : "The type or namespace name 'Thrift' could not be found (are you missing a using d开发者_如何学Pythonirective or an assembly reference?)", so I'm missing something else, but I cannot find what... What is it? Is it a dll? I've looked in the thrift code and I cannot find anything related to .net , so what am I missing?

Thanks in advance.

Regards.


From Thrift Wiki:

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.

So you simply need to add a reference to Thrift.dll to your project. The wiki page contains instructions how to build Thrift.dll from source if necessary.


FluentCassandra is an option too, you can download it from http://github.com/managedfusion/fluentcassandra .


No need to generate thrift, just download hectorsharp, compile and reference in your .net project. It already have done all work required for .net to use cassandra

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜