Skip to content

Could not load Hangfire.Core when using Sentry.Hangfire. A strongly-named assembly is required. #4082

Closed

Description

@RudeySH

Package

Other

.NET Flavor

.NET Framework

.NET Version

4.8

OS

Windows

OS Version

No response

Development Environment

Visual Studio v17.x

SDK Version

9.11.0

Self-Hosted Sentry Version

No response

Workload Versions

N/A

UseSentry or SentrySdk.Init call

this.sentrySdk = SentrySdk.Init(options =>
{
    options.Dsn = "...";
    options.Environment = "Production";

    options.CaptureFailedRequests = true;
    options.FailedRequestStatusCodes.Add((400, 499));
    options.SendDefaultPii = true;
    options.TracesSampleRate = 0.1;

    options.AddEntityFramework();
    options.AddAspNet(RequestSize.Always);
});

Steps to Reproduce

  • Install Hangfire.Core (1.8.12), Sentry (5.5.0) and Sentry.Hangfire (5.5.0)
  • Hangfire.GlobalConfiguration.Configuration.UseSentry()
  • Start debugging

Expected Result

Application should start without exceptions.

Actual Result

Application throws exception.

Could not load file or assembly 'Hangfire.Core, Version=1.8.12.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 4, 2025
  2. aritchie commented on Apr 7, 2025

    @aritchie
    Contributor

    Thank you for reporting this. We'll see what we can do here.

    @jamescrosswell we would need to disable strong naming on this lib where we're using netfx. Not ideal.

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Apr 7, 2025
  4. jamescrosswell commented on Apr 8, 2025

    @jamescrosswell
    Collaborator

    @jamescrosswell we would need to disable strong naming on this lib where we're using netfx. Not ideal.

    Indeed. A bit of a catch 22... I think your suggestion makes sense though. There's no scenario in which a signed Sentry.Hangfire packages can be used on NetFx... As long as an unsigned Sentry.Hangfire package is fine depending on a signed Sentry package, we should be OK.

  5. self-assigned this
    on Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions