Hangfire: Cannot use Hangfire 1.6.22 with Dapper version >= 1.50.1

Created on 17 Feb 2019  路  4Comments  路  Source: HangfireIO/Hangfire

Steps:

  1. Open aspnet core 2.2 project
  2. Install Dapper v1.50.7 (latest) via nuget
  3. Install Hangfire v1.6.22 (latest) via nuget
  4. Run and you will get this error:
    FileLoadException: Could not load file or assembly 'Dapper, Version=1.50.1.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
question

All 4 comments

Same here

Hm, but it works with Dapper 1.50.5 and below just fine. I could recommend you to try using Hangfire 1.7.0-beta4 as Dapper package is internalized there or downgrade Dapper.

I was also having an issue using Hangfire with Dapper 1.50.7, but I noticed that there is now an update for Dapper to version 1.60.1, which works fine with Hangfire 1.6.22.

<PackageReference Include="Dapper" Version="1.60.1" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.6.22" />
<PackageReference Include="Hangfire.SqlServer" Version="1.6.22" />

@mustex Confirmed, updating to the latest version of Dapper helped me as well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dbones picture dbones  路  3Comments

cbmek picture cbmek  路  3Comments

abdelrady picture abdelrady  路  4Comments

odinserj picture odinserj  路  4Comments

vikramjb picture vikramjb  路  3Comments