【问题标题】:There is no metadata information for provider 'npgsql'提供者“npgsql”没有元数据信息
【发布时间】:2019-07-10 13:54:24
【问题描述】:

下面是我使用 Asp.net Core 使用 Quartz 连接数据库的配置。

 ["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz",
                ["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz",
                ["quartz.jobStore.dataSource"] = "default",
                ["quartz.dataSource.default.connectionString"] = "Server=202.131.112.197;Port=5434;Database=Quartzdb;User Id=postgres;Password=Cygnet@123;",
                ["quartz.dataSource.default.provider"] = "Npgsql"

【问题讨论】:

    标签: c# asp.net-core quartz


    【解决方案1】:

    我不知道你的 Quartz 版本,但我使用的是 2.2.4 和 .net 4.5 和

    ["quartz.dataSource.default.provider"] = "Npgsql-20"
    

    为我工作。

    详情可以查看https://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/job-stores.html

    您还可以在您的应用程序或网络配置文件中使用 bindingRedirect,例如;

    <dependentAssembly>
        <assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.2.7.0" newVersion="3.2.7.0" />
    </dependentAssembly>
    

    通过绑定重定向,您可以使用所需版本的 Npgsql

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-02
      • 2023-03-22
      • 1970-01-01
      • 2017-08-13
      • 2017-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多