You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于更新Hangfire Dashboard的jQuery依赖:需创建PR还是可通过已装NuGet包操作?

Updating Hangfire Dashboard's jQuery Dependency: NuGet Workaround vs. Pull Request

Great question! Let’s break this down based on your end goal:

If you only need the updated jQuery for your own project

You absolutely don’t need to tweak Hangfire’s source code or submit a Pull Request—you can override the default jQuery reference directly in your project’s configuration. Hangfire Dashboard is built to let you customize its loaded resources easily.

Here’s a straightforward approach:

  • When setting up the Hangfire Dashboard in your startup code, use the DashboardOptions to replace the default jQuery script with your desired version. Just remember to include Hangfire’s core JavaScript file after your custom jQuery, otherwise the Dashboard’s core functionality will break.

Example code snippet:

app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
    JavaScript = new[]
    {
        // Replace with your target jQuery version (local path example)
        "/js/jquery-3.7.1.min.js",
        // Keep Hangfire's core JS to maintain dashboard functionality
        "/hangfire/js/hangfire.js"
    }
});

This workaround lets you use the updated jQuery immediately in your own instance without touching the official NuGet package at all.

If you want Hangfire’s official NuGet package to include the updated jQuery

In this case, you’ll need to create a Pull Request to the official Hangfire repository. The NuGet package’s bundled resources (including the default jQuery) are defined directly in Hangfire’s source code. To push this update for all users, you’ll need to:

  • Fork the official Hangfire repository
  • Update the jQuery reference in the Dashboard’s resource configuration files
  • Submit a Pull Request with your changes for the project maintainers to review and merge
    Once merged, the next official NuGet release will ship with the updated jQuery version included.

内容的提问来源于stack exchange,提问作者Willian Andrade

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 06:38:04