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
Yahia
  • 805
  • 7
  • 25

1 Answers1

8

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
nemanja228
  • 556
  • 2
  • 16
  • Thanks. Any idea how come I can use hangfire jobs with .NET Core without **HangFire.AspNetCore**? – Yahia Dec 08 '18 at 13:49
  • It's not possible. Why wouldn't you use AspNetCore package? – nemanja228 Dec 08 '18 at 13:54
  • 1
    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? – Yahia Dec 08 '18 at 14:02
  • It was automatically downloaded, check your packages. – nemanja228 Dec 08 '18 at 14:05
  • 4
    That is correct, thanks. Based on [nuget](https://www.nuget.org/packages/Hangfire/), the **Hangfire** package's dependencies include Hangfire.AspNetCore (= 1.6.21) and Hangfire.Core (= 1.6.21) and Hangfire.SqlServer (= 1.6.21) – Yahia Dec 08 '18 at 14:16