.netcore 2.0控制台UseHangfireDashboard扩展名不可用

时间:2018-05-15 01:46:27

标签: hangfire .net-core-2.0 hangfire-console

enter image description here我创建了一个新的.net核心2.0控制台项目。

    using Hangfire;
    using Microsoft.Owin;
    using Owin;
    [assembly: OwinStartup(typeof(Test.WorkerHost))]
    namespace Test.worker
    {
        public class WorkerHost
        {
            public void Configuration(IAppBuilder app)
            {
                app.UseHangfireDashboard(); // This is not available
            }
        }
    }

所有示例都提到如上所述配置hangfire但我没有获得这些扩展方法。已经完成了

http://docs.hangfire.io/en/latest/configuration/using-dashboard.html

How to configure "Hangfire.Net" in .NET Core console application?

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

好吧,经过反复试验。我通过添加Hangfire.AspnetCore nuget并使用IApplicationBuilder而不是IAppBuilder来实现它。