.netcore 2.0 console UseHangfireDashboard extension is not available

1.1k views Asked by At

enter image description here I created a new .net core 2.0 console project.

    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
            }
        }
    }

All examples mention to configure hangfire like above but I dont get those extension methods. Already gone through

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

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

Any idea?

1

There are 1 answers

0
Balvinder Singh On

Alright, after trial and error. I got it working by adding Hangfire.AspnetCore nuget and using IApplicationBuilder instead of IAppBuilder.