.net 连接TDengine时报错 返回
安装了TDengine容器版(截止2024年11月27最新版)
报错信息为:System.DllNotFoundException:“Unable to load DLL 'taos' or one of its dependencies: 找不到指定的模块。 (0x8007007E)”
根据要求安装:
SqlSugar.TDengineCore 4.1.4+
SqlSugarCore 5.1.4.129 +
输入以下代码
//程序启动时加入(这个只要执行一次)InstanceFactory.CustomAssemblies = new System.Reflection.Assembly[] { typeof(TDengineProvider).Assembly };
//创建 db对象 var db = new SqlSugarClient(new ConnectionConfig() { DbType = SqlSugar.DbType.TDengine, ConnectionString = Config.ConnectionString, IsAutoCloseConnection = true, ConfigureExternalServices = new ConfigureExternalServices() { EntityService= (property, column) => { if (column.SqlParameterDbType == null) { //需要给列加上通用转换,这样实体就不需要一个一个转了 column.SqlParameterDbType = typeof(CommonPropertyConvert); } } } });
热忱回答(7)
-
fate sta VIP0
2024/11/27没有安装SDK
0 回复 -
fate sta VIP0
2024/11/27看一下文档如何安装SDK
0 回复 -
pop/star VIP0
2024/11/27@fate sta:你说的是安装客户端SDK到docker容器内是吧?安装包是TDengine-client-3.3.4.3,
执行命令
# ./install_client.sh
There are already installed TDengine server, so don't need install client!
这是文件夹下的文件

同时我这边参考文档为https://docs.taosdata.com/develop/connect/#!
同时Nuget已经安装了TDengine.Connector了。
0 回复 -
pop/star VIP0
2024/11/27其实为啥不开发websocket的连接,感觉这个还是不错的
0 回复 -
fate sta VIP0
2024/11/27@pop/star:websocket用的HTTP性能不好,我这个原生访问要装SDK
0 回复 -
fate sta VIP0
2024/11/27
多看文档
0 回复 -
pop/star VIP0
2024/11/27@fate sta:看了,你这个文档是失效的,所以我才提问题
0 回复