gpt4 book ai didi

c# - 使用 Thrift 从 .NET 连接到 Cassandra

转载 作者:可可西里 更新时间:2023-11-01 13:28:28 25 4
gpt4 key购买 nike

我对 Cassandra 很感兴趣,我想在家里用我的 Windows XP 电脑测试一下。我找到了 instructions for install an run Cassandra in Windows ,并且它已经启动并运行;我还找到了 thrift executable for Windows并生成 C# 接口(interface),但是...当我尝试在 Visual Studio 中编译生成的代码时,我得到:“找不到类型或命名空间名称‘Thrift’(您是否缺少使用指令或程序集引用?)”,所以我还遗漏了其他东西,但我找不到什么……它是什么?它是一个dll吗?我查看了 thrift 代码,但找不到与 .net 相关的任何内容,所以我错过了什么?

提前致谢。

问候。

最佳答案

来自 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.

因此您只需将对 Thrift.dll 的引用添加到您的项目中。维基页面包含如何在必要时从源构建 Thrift.dll 的说明。

关于c# - 使用 Thrift 从 .NET 连接到 Cassandra,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2798547/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com