What is the difference between the nuget packages hangfire.aspnetcore and hangfire and hangfire.core?
Asked Answered
O

1

13

What is the difference between the nuget packages HangFire.AspNetCore and HangFire and HangFire.core?

It seems I am able to use hangfire with a ASP .NET MVC Core project with only the HangFire 1.6.21 package alone. See below packages used in my project:

enter image description here

What is then the package HangFire.AspNetCore for?

I am working with Visual Studio Code on Ubuntu, and I added the packages using :

dotnet add package Hangfire

dotnet add package Hangfire.AspNetCore
Oestrogen answered 8/12, 2018 at 12:49 Comment(1)
Links added, thanks for the head up.Oestrogen
W
10

It's the usual naming convention for NuGet packages:

  • HangFire is the package name and the main package which includes all dependencies needed. This main package targets .NET framework in this case.
  • HangFire.Core is package that includes the core components, to which all variants of the package will probably be dependent on.
  • HangFire.AspNetCore is extension to support .NET Core
Weightless answered 8/12, 2018 at 13:45 Comment(5)
Thanks. Any idea how come I can use hangfire jobs with .NET Core without HangFire.AspNetCore?Oestrogen
It's not possible. Why wouldn't you use AspNetCore package?Weightless
As far as I can tell, I am able to schedule and run background jobs using hangfire 1.6.21 without HangFire.AspNetCore on my ASP Core project on Visual Studio Code on Ubuntu. This is why I am asking what are the specificities of this package? Maybe it is an obsolete one?Oestrogen
It was automatically downloaded, check your packages.Weightless
That is correct, thanks. Based on nuget, the Hangfire package's dependencies include Hangfire.AspNetCore (= 1.6.21) and Hangfire.Core (= 1.6.21) and Hangfire.SqlServer (= 1.6.21)Oestrogen

© 2022 - 2024 — McMap. All rights reserved.