MissingMethodException: Hangfire.Common.GlobalJobFilterCollection Hangfire.GlobalJobFilters.get_Filters()

I’m trying to use the batches feature from Hangfire.Pro and receive an method not found error (MissingMethodException):

"Hangfire.Common.GlobalJobFilterCollection Hangfire.GlobalJobFilters.get_Filters()"

upon initialization with

GlobalConfiguration.Configuration.UseBatches();

Hangfire Pro was added via package manager console ( Install-Package Hangfire.Pro). I’m not using an IoC or sorts.

The stacktrace is:

[MissingMethodException: Methode nicht gefunden: "Hangfire.Common.GlobalJobFilterCollection Hangfire.GlobalJobFilters.get_Filters()".]
   Hangfire.BatchExtensions.UseBatches(IGlobalConfiguration configuration) +0
   FOO.HangfireStartup.Configuration(IAppBuilder app) in C:\Users\FOO\App_Start\HangfireStartup.cs:17

[TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +136
   Owin.Loader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder) +66
   Owin.Loader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder) +123
   Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass2.<InitializeBlueprint>b__0(IAppBuilder builder) +71
   Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup) +462
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup) +40
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +70
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +115
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +106
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +534
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +352
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Ein Aufrufziel hat einen Ausnahmefehler verursacht.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9924184
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261

What am I missing here? Thanks!

Marc.

It’s probably worth mentioning that I’m using the current 1.5.0-beta3 ("-pre"). Maybe that’s incompatible with Hangfire Pro? (no -pre release available there).

Yep, previous version is incompatible with 1.5.0. I’ve just released Hangfire Pro 1.4.0-beta1 with all the required changes, please upgrade.

1 Like

Great! Really appreciate. Thanks. Everything working as expected after the update. :smile:

1 Like