dotnetcore/HttpReports

Use PgSql Get Error Method not found

wadereye opened this issue · 1 comments

Env:
.netcore 3.1
pgsql

File startup.cs:
public void ConfigureServices(IServiceCollection services)
{
//APM API监控
services.AddHttpReportsDashboard().AddPostgreSQLStorage();
.....

public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
//APM API监控
app.UseHttpReportsDashboard();
.........

Appsetting:
"HttpReportsDashboard": {
"ExpireDay": 3,
"Storage": {
"ConnectionString": "User ID=xxx;Password=xxx;Host=xxx;Port=5432;Database=xxx;Pooling=true;",
"DeferSecond": 10,
"DeferThreshold": 100
},
.........

When Run,Get the follow error:

System.MissingMethodException:“Method not found: 'System.Threading.Tasks.Task1<Boolean> FreeSql.ISelect02.AnyAsync()'.”

ex.message:
"Method not found: 'System.Threading.Tasks.Task1<Boolean> FreeSql.ISelect02.AnyAsync()'."

ex.StackTrace:
" at HttpReports.Storage.Abstractions.BaseStorage.b__14_0()\r\n at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)\r\n at HttpReports.Storage.Abstractions.BaseStorage.b__14_0()\r\n at System.Threading.Tasks.Task`1.InnerInvoke()\r\n at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)\r\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at HttpReports.Storage.Abstractions.BaseStorage.InitAsync() in

I can't reproduce this problem, please provide your package version, Including HttpReports.Dashboard, HttpReports.PostgreSQL..

I guess, it may conflict with your local freesql package version inconsistency, and you should use HttpReports.Dashboard in an empty project