Quote:System.IO.FileLoadException Message : Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) StackTrace : at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit) at DevExpress.DataAccess.ObjectBinding.ObjectMember..ctor(MemberInfo memberInfo) at DevExpress.DataAccess.Native.ObjectBinding.ObjectDataSourceFillHelper.<>c.<getitemmemberscore>b__24_5(MemberInfo info) at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at DevExpress.DataAccess.Native.Web.ObjectDataSourceWizardService.GetMemberInfo(Type type, IObjectDataSourceMemberFilterService filterMemberService) at DevExpress.DataAccess.Native.Web.ObjectDataSourceWizardService.GetAvailableObjectDescriptions(String context) at lambda_method(Closure , IQueryBuilderRequestController , String ) at DevExpress.XtraReports.Web.Native.ClientControls.Services.RequestManagerBase`2.WrapWithTryCatchAction(String controllerTypeName, String methodName, String webActionName, ControllerFunc invoker, TController controller, String json)
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using InfluxDB.Client; using InfluxDB.Client.Api.Domain; using InfluxDB.Client.Api.Service; using InfluxDB.Client.Core; namespace ServerSide { public class ReadInfluxDB { private readonly string Token = "TestTokenWEBICC"; public async Task Main() { var client = new InfluxDBClient("http://localhost:8086", Token); var flux = "from(bucket:\"TestDB\") |> range(start: 0)"; var queryApi = client.GetQueryApi(); // // QueryData // var tables = await queryApi.QueryAsync(flux);//, "org_id" var id = tables[0].Records; var measure = tables[1].Records; var val = tables[3].Records; var time = tables[4].Records; var count = id.Count(); List<Value> Values = new List<Value>(); tables.ForEach(table => { table.Records.ForEach(record => { Console.WriteLine($"{record.GetTime()}: {record.GetValueByKey("_value")}"); }); }); for (int i = 0; i < count; i++) { Value _value = new Value(); _value.DateAndTime = Convert.ToDateTime(time[i].GetTimeInDateTime()); _value.Measure = Convert.ToString(measure[i].GetValue()); _value.Val = Convert.ToDouble(val[i].GetValue()); Values.Add(_value); } client.Dispose(); } } public class Value { public DateTime DateAndTime { get; set; } public string Measure { get; set; } public double Val { get; set; } } }
InfluxDB.Client.Api.*
InfluxDB.Client
DevExpress.DataAccess
The located assembly's manifest definition does not match the assembly reference.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)