Open Closed

Adding hang fire, missing some dependencies #1722


User avatar
0
spassalacqua@itelinc.com created

Hello

I am having issues using hangfire when creating the project and adding the module using the CLI. I followed the instructions here I created my solution using this CLI command

abp new MyOrg.MyProject -t app --ui none -d ef -dbms SqlServer

Then added the package using abp add-package Volo.Abp.BackgroundJobs.HangFire

Opened MyOrg.MyProject.HttpApi.Host.MyProjectHttpApiHostModule

And was trying to add context.Services.AddHangfire(config => { config.UseSqlServerStorage(configuration.GetConnectionString("Default")); });

However, "context.Services.AddHangfire" is not available.

Am I missing a step or dependency?


5 Answer(s)
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi,

    Which project did you installed Volo.Abp.BackgroundJobs.HangFire package?

  • User Avatar
    0
    spassalacqua@itelinc.com created

    Hi Here

    I instlled it on MyOrg.MyProject.HttpApi.Host

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Have you added Hangfire namespace to MyProjectHttpApiHostModule file?

    using Hangfire;
    
  • User Avatar
    0
    spassalacqua@itelinc.com created

    Oh boy...don't I feel silly now. Added it and of course I'm all set. Sorry for the inconvenience.

  • User Avatar
    0
    spassalacqua@itelinc.com created

    Corrected issue by adding Hangfire namespace as avdised.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09