InfluxDB.Client C# library with .NET Framework 4.0/4.5

Hey,

I am trying to use the InfluxDB.Client library for a C#-project, that is targeting .NET framework 4.5.

Due to proprietary hardware/software I’ll have to target the old .NET framework 4.0 or 4.5, so it’s not possible to upgrade the target of the project. The program wouldn’t run correctly on the proprietary hardware that it locked on version 4.5.

I’ve found that the InfluxDB.Client library can run with .NET framework 4.6.1 (see here).

Is there a way to run this library with .NET framework 4.0 or 4.5?

If not:
Is there some kind of C#-library I could use for version 4.0 or 4.5, so that I can use this to write into InfluxDB v2.0?

Hi @DezzardHD,

Unfortunately we don’t support the framework 4.0 or 4.5. What do you want to do on your device? Queries or Writes?

Regards

1 Like

Hi @bednar,

thanks for responding!

I want to write measurements of some sensors in the data base.

On GitHub someone gave me the hint, that I could use a client library, that has been developed for InfluxDB 1.x and just change some settings in my InfluxDB v2.0, so the API is compatible with my write requests.

Documentation: 1.x-compatible authorizations

The following is a list of client libraries I’ve found in GnuPacket Manager, which could fulfill my needs in terms of .NET Framework version compatibility.

  1. GitHub - AdysTech/InfluxDB.Client.Net: A C# client object model to help integrate with InfluxDB with CLI languages. Supports both .Net traditional and .Net Core.
  2. githubDOTcom/MikaelGRA/InfluxDB.Client
  3. githubDOTcom/MikaelGRA/Tsdb
  4. nugetDOTorg/packages/InfluxDB.WriteOnly/
  5. githubDOTcom/danielwertheim/myinfluxdbclient
  6. githubDOTcom/danesparza/InfluxClient

Some are well and some are poorly documented. Any suggestions which one I should choose?

Or do you even have an better idea?

Glad that you are helping me out here!

Regards

If you want to only write data into InfluxDB than you can use GitHub - influxdata/influxdb-csharp: A .NET library for efficiently sending points to InfluxDB 1.x and configure your InfluxDB by following these instructions: InfluxDB 1.x compatibility API | InfluxDB OSS 2.0 Documentation

1 Like

Hey @bednar,
I wasn’t able to get it to work using GitHub - influxdata/influxdb-csharp: A .NET library for efficiently sending points to InfluxDB 1.x.
I didn’t managed to compile it while targeting .NET Framework 4.5.0.

Instead I chose this InfluxDB.Client library. It works with .NET Framework Version 4.5.0.
With that I managed to write data into InfluxDB using v1 compatibility layer.

I appreciate your help!

Regards